all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#45944: 28.0.50; Mailabbrev sometimes hangs
@ 2021-01-18  0:10 Katsumi Yamaoka
  2021-01-18 23:39 ` Katsumi Yamaoka
  0 siblings, 1 reply; 7+ messages in thread
From: Katsumi Yamaoka @ 2021-01-18  0:10 UTC (permalink / raw)
  To: 45944

Hi,

When expanding a mail abbrev in the message header of a message-
mode buffer, it sometime hangs like it goes into an infinite loop.
It's ok for Emacs on the Linux platform because I can break it by
C-g.  However, on Cygwin, only I can do is to kill Emacs, as C-g
doesn't break a Lisp infinite loop on Emacs built on that platform.

Though I haven't found out the cause of the problem so far, it seems
to happen when there are some kinds of contents in the message body,
and seems not to happen if the body is empty.  So, a workaround I'm
using now is as follows:

(defadvice abbrev--default-expand (around my-narrow-to-head activate)
  "Narrow the messge buffer to the headers when expanding an abbrev."
  (save-restriction
    (when (message-point-in-header-p)
      (let ((cur (point)))
        (message-narrow-to-headers)
        (goto-char cur)))
    ad-do-it))

Thanks.





^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-01-19 21:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-18  0:10 bug#45944: 28.0.50; Mailabbrev sometimes hangs Katsumi Yamaoka
2021-01-18 23:39 ` Katsumi Yamaoka
2021-01-19  4:47   ` Lars Ingebrigtsen
2021-01-19  8:30     ` Andreas Schwab
2021-01-19 11:07       ` Katsumi Yamaoka
2021-01-19 15:09         ` Lars Ingebrigtsen
2021-01-19 21:50           ` Katsumi Yamaoka

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.