all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: bruce.connor.am@gmail.com
Cc: 15907-done@debbugs.gnu.org
Subject: bug#15907: 24.3; Emacs crash due to substitute-command-keys and after-change-functions
Date: Sat, 16 Nov 2013 12:29:36 +0200	[thread overview]
Message-ID: <83r4aghc6n.fsf@gnu.org> (raw)
In-Reply-To: <83siuwhevv.fsf@gnu.org>

> Date: Sat, 16 Nov 2013 11:31:16 +0200
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 15907@debbugs.gnu.org
> 
> > 1. Start `emacs -Q';
> > 2. Evaluate the following two statements:
> >        (add-hook 'after-change-functions (lambda (&rest a) (format "%s" 1)))
> >        (substitute-command-keys "\\{emacs-lisp-mode-map}")
> > 3. That's it. Emacs crashes.
> > 
> > The crash doesn't happen if you replace the number 1 with a string or
> > a symbol, but it does also happen if you replace it with a list.
> 
> It no longer crashes after changes in trunk revision 115119.
> 
> > This is most annoying as it causes a crash whenever `describe-mode' is
> > invoked.
> 
> Since you didn't show any real-life use cases, I'm not sure that the
> result is what you wanted, please do check.

Actually, I think you will like revision 115120 much better.  The
underlying problem was that substitute-command-keys sometimes uses an
internal buffer, whose changes would trigger your after-change
function, which would invoke 'format', which uses the same internal
buffer...

As I now think I know what was your real-life problem, and it is now
fixed, I'm closing this bug report.  Feel free to re-open if there are
some leftovers.

Thanks.





  reply	other threads:[~2013-11-16 10:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-15 21:23 bug#15907: 24.3; Emacs crash due to substitute-command-keys and after-change-functions Artur Malabarba
2013-11-16  9:31 ` Eli Zaretskii
2013-11-16 10:29   ` Eli Zaretskii [this message]
     [not found]   ` <CAAdUY-KGJ++9D8uY8dK-R0_FPw1=XfHgQZkf+WuT2SwwVYGo7A@mail.gmail.com>
2013-11-16 12:37     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r4aghc6n.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=15907-done@debbugs.gnu.org \
    --cc=bruce.connor.am@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.