unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Katsumi Yamaoka <yamaoka@jpl.org>
To: 45944@debbugs.gnu.org
Subject: bug#45944: 28.0.50; Mailabbrev sometimes hangs
Date: Mon, 18 Jan 2021 09:10:31 +0900	[thread overview]
Message-ID: <b4m35yznlzc.fsf@jpl.org> (raw)

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.





             reply	other threads:[~2021-01-18  0:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  0:10 Katsumi Yamaoka [this message]
2021-01-18 23:39 ` bug#45944: 28.0.50; Mailabbrev sometimes hangs 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

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=b4m35yznlzc.fsf@jpl.org \
    --to=yamaoka@jpl.org \
    --cc=45944@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).