djcb / mu

maildir indexer/searcher + emacs mail client + guile bindings
http://www.djcbsoftware.nl/code/mu
GNU General Public License v3.0
1.61k stars 389 forks source link

"Match data clobbered by buffer modification hooks" #1427

Closed mpomeran closed 4 years ago

mpomeran commented 5 years ago

Expected or desired behavior

When I am sending mail.

Actual behavior

Please describe the behavior you are actually seeing.

I receive the following error message: mu4e~draft-insert-mail-header-separator: match data clobbered by buffer modification hooks

Steps to reproduce

Send message with C-c C-c Debugger entered--Lisp error: (error "Match data clobbered by buffer modification hooks") replace-match("")I mu4e~draft-remove-mail-header-separator() run-hooks(before-save-hook) basic-save-buffer(nil) save-buffer()

f(compiled-function () #<bytecode 0x4be180dd>)()

run-hooks(message-send-hook) message-send(nil) message-send-and-exit(nil) funcall-interactively(message-send-and-exit nil) call-interactively(message-send-and-exit nil nil) command-execute(message-send-and-exit)

Versions of mu, mu4e/emacs, operating system etc.

mu4e 1.2.0; emacs 26.2

Any other detail

+BEGIN_SRC emacs-lisp :tangle yes

(use-package mu4e :load-path "/Users/mauricea.pomerantz/Dropbox/3RESOURCES/6WORKFLOW/mu/mu4e" :config (setq mu4e-maildir (expand-file-name "~/Maildir/")) ;;command used to get mail (defvar mu4e-update-mail-and-index "mbsync nyu") ;; use this to sync with mbsync (setq mu4e-get-mail-command "mbsync nyu") ;;rename files when moving ;;NEEDED FOR MBSYNC (setq mu4e-change-filenames-when-moving t) ;;set up queue for offline email ;;use mu mkdir ~/Maildir/queue to set up first (setq smtpmail-queue-mail nil ;; start in normal mode smtpmail-queue-dir "~/Maildir/queue/cur") (setq mu4e-compose-format-flowed t) (setq mu4e-headers-skip-duplicates t) (setq mu4e-drafts-folder "/drafts") (setq mu4e-sent-folder "/sent") (defvar mu4e-archive-folder "/archive") (setq mu4e-update-interval 300)

;; Start the hydra (add-hook 'mu4e-headers-mode-hook 'hydra-mu4e-headers/body)

(add-hook 'message-send-hook (lambda () (unless (yes-or-no-p "Sure you want to send this?") (signal 'quit nil))))

(setq mu4e-headers-fields '( (:date . 40) ;; alternatively, use :human-date (:flags . 6) (:from . 22) (:subject . nil))) ;; alternatively, use :thread-subject

;;show date and addresses (setq mu4e-headers-date-format "%Y-%m-%d %H:%M")

;;show full addresses in view message (instead of just names) (setq mu4e-view-show-addresses 't)

;; shortcuts '(("/inbox" . ?i) ("/archive" . ?a) ("/drafts" . ?l) ("/sent" . ?s)) ;; something about ourselves

;; enable inline images (setq mu4e-view-show-images t) (setq mu4e-view-image-max-width 800) ;; use imagemagick, if available (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) ;; html2text is obsolete--use mu4e-shr2text (setq mu4e-html2text-command 'mu4e-shr2text) ;; spell check (add-hook 'mu4e-compose-mode-hook (defun my-do-compose-stuff () "My settings for message composition." (set-fill-column 72) (flyspell-mode))))

+END_SRC

*** ORG Capture MU4E

+BEGIN_SRC emacs-lisp :tangle yes

(require 'org-mu4e)

+END_SRC

*** SMTPMAIL (for outgoing messages)

+BEGIN_SRC emacs-lisp :tangle yes

(setq message-send-mail-function 'smtpmail-send-it smtpmail-starttls-credentials '(("smtp.gmail.com" 587 nil nil)) smtpmail-auth-credentials (expand-file-name "~/.authinfo") smtpmail-default-smtp-server "smtp.gmail.com" smtpmail-smtp-server "smtp.gmail.com" smtpmail-smtp-service 587 smtpmail-debug-info t) (require 'smtpmail)

+END_SRC

*** MU4E-Alert

+BEGIN_SRC emacs-lisp :tangle yes

(use-package mu4e-alert :init (add-hook 'after-init-hook #'mu4e-alert-enable-mode-line-display) )

+END_SRC

djcb commented 5 years ago

There are some changes which hopefully address this in git master... does that help?

mpomeran commented 5 years ago

Thanks. I'll check if it works. I ended up solving my problem by restoring a previous commit of my .emacs file in git. So I might not be able to reproduce the error...

djcb commented 4 years ago

Thanks. Closing this for now