I'm running into the error "Marker does not point anywhere" when I try to print a message both in after-change-functions and buffer-list-update-hook. Curiously if only one hook or the other is active the error does not occur, you have to have both! Precise code and steps to reproduce are below. Any advice on how to fix while keeping the message?

Tested on emacs 24.4.1 with -Q flag, on Ubuntu.

;; To reproduce:
;; 1. emacs -Q
;; 2. Have your frame display the scratch buffer, eval the code below in it
;; 3. Create a second frame (C-x,5,2)
;; 4. Have the second frame display the *Messages* buffer.
;; 5. Rapidly switch focus between the two frames
;; You should get the error: (error "Marker does not point anywhere")
;; Why? How do I prevent?

(setq-default debug-on-error t) ;; so you notice the error

(defun common-test (&optional a b c)
  (message "test"))

(add-hook 'after-change-functions #'common-test)
(add-hook 'buffer-list-update-hook #'common-test)

Also here is an example backtrace:

Debugger entered--Lisp error: (error "Marker does not point anywhere")
  handle-switch-frame((switch-frame #<frame *Backtrace* 0x1218168>))
  call-interactively(handle-switch-frame nil nil)

Sounds like a bug to me. Consider reporting it: M-x report-emacs-bug.

  • Hmm, tried it but the mail bounced, "550-Callout verification failed: 550 550 Unrouteable address". I tried sending to bugs-gnu-emacs@gnu.org, I had to paste into gmail though since email within emacs isn't setup. – Joseph Garvin Jan 24 '15 at 6:23
  • Sending mail to bugs-gnu-emacs@gnu.org is sufficient, however you do it. Note that you can use report-emacs-bug with an external mailer (e.g. Outlook, Thunderbird). I do that. You can also use report-emacs-bug to compose your bug report and then just copy it manually into an external mail message, if you don't want to have report-emacs-bug automatically open your external mailer. An advantage of report-emacs-bug is that it captures your Emacs build information. – Drew Jan 24 '15 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.