From: Klaus Zeitler <kzeitler@lucent.com>
Subject: Re: dabbrev in minibuffer
Date: 10 Jul 2002 09:51:30 +0200 [thread overview]
Message-ID: <q5gfzysc96l.fsf@lucent.com> (raw)
In-Reply-To: buoofdgcldt.fsf@mcspd15.ucom.lsi.nec.co.jp
>>>>> "Miles" == Miles Bader <miles@lsi.nec.co.jp> writes:
Miles>
Miles> TBABIN@nortelnetworks.com (Tim Babin) writes:
>> Running dabbrev-expand in the minibuffer starts an infinite loop.
Miles>
Miles> Not for me; please give a precise test-case.
Miles>
I've reported this problem in February and RMS sent me the following patch
that IMHO only partially fixed it (the problem only occurred with the
inviolable option set for the minibuffer).
-------------------- snip ------------------------
*** dabbrev.el.~1.61.~ Thu Nov 8 12:56:42 2001
--- dabbrev.el Sat Feb 2 20:09:49 2002
***************
*** 599,605 ****
(progn
(forward-char -1)
(while (and (looking-at dabbrev--abbrev-char-regexp)
! (not (bobp)))
(forward-char -1))
(or (looking-at dabbrev--abbrev-char-regexp)
(forward-char 1))))
--- 599,605 ----
(progn
(forward-char -1)
(while (and (looking-at dabbrev--abbrev-char-regexp)
! (not (= (point) (field-beginning (point)))))
(forward-char -1))
(or (looking-at dabbrev--abbrev-char-regexp)
(forward-char 1))))
-------------------- snip ------------------------
Here's what I wrote in one of my mails to RMS:
-------------------- snip ------------------------
Originally I ran in to this problem cause I wanted to change a
set-face-background call to a set-face-foreground in one of my el files (and
I'm an avid user of dynamic abbrev). So here's how I reproduce this bug.
1. start emacs with -q --no-site-file
2. (the original dabbrev package that comes with 21.1 is used)
3. M-x customize-variable minibuffer-prompt-properties
turn on the Inviolable option and set for current session
4. load a file with e.g. the following contents
----- cut -----
(set-face-background 'trailing-whitespace "Gray25")
----- cut -----
5. M-x query-replace
and now enter as regexp "s" followed by "M-/"
=> emacs loops on HP-UX 10.20, Solaris 5.8 and GNU/Linux but
- on HP-UX 10.20 C-g does not work
- on Solaris 5.8 C-g does work (most of the time), but when I open a 2nd
frame (C-x 5 2) before I try the query replace, C-g doesn't interrupt
anymore
- on GNU/Linux C-g always works
now I perform the same steps but first I load your patched dabbrev file
1. start emacs with -q --no-site-file
2. load-library <patched-dabbrev.elc>
3. M-x customize-variable minibuffer-prompt-properties
turn on the Inviolable option and set for current session
4. load a file with e.g. the following contents
----- cut -----
(set-face-background 'trailing-whitespace "Gray25")
----- cut -----
5a. M-x query-replace
and now enter as regexp "s" followed by "M-/", this works
5b. press return and now try to enter as replacement string again
"s" followed by "M-/"
=> emacs loops on HP-UX 10.20 and Solaris 5.8 but not on GNU/Linux
as I said in one of my previous posts XTread_socket never gets called
once emacs loops. Could it be that one of the lisp functions/macros, e.g.
save-match-data or unwind-protect disables/postpones interrupts?
-------------------- snip ------------------------
ever since then it's been on my low priority todo list to investigate,
but haven't had time yet.
I think it gets stuck in the while loop in dabbrev--search.
But what worries me more is that I can't interrupt it on Solaris and HP.
Klaus
--
------------------------------------------
| Klaus Zeitler Lucent Technologies |
| Email: kzeitler@lucent.com |
------------------------------------------
---
What garlic is to food, insanity is to art.
next prev parent reply other threads:[~2002-07-10 7:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-09 15:41 dabbrev in minibuffer Tim Babin
2002-07-10 3:27 ` Miles Bader
2002-07-10 7:51 ` Klaus Zeitler [this message]
2002-07-10 10:43 ` Richard Stallman
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=q5gfzysc96l.fsf@lucent.com \
--to=kzeitler@lucent.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 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).