all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* dabbrev in minibuffer
@ 2002-07-09 15:41 Tim Babin
  2002-07-10  3:27 ` Miles Bader
  2002-07-10 10:43 ` Richard Stallman
  0 siblings, 2 replies; 6+ messages in thread
From: Tim Babin @ 2002-07-09 15:41 UTC (permalink / raw)


This bug report will be sent to the Free Software Foundation,
not to your local site managers!
Please write in English, because the Emacs maintainers do not have
translators to read other languages for them.

Your bug report will be posted to the bug-gnu-emacs@gnu.org mailing list,
and to the gnu.emacs.bug news group.

In GNU Emacs 21.1.1 (i386-msvc-nt5.0.2195)
 of 2001-10-22 on buffy
configured using `configure --with-msvc (12.00)'
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENU
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

Running dabbrev-expand in the minibuffer starts an infinite loop.
It seems that after I upgraded my emacs dabbrev-expand quit working in
the mini-buffer.

Any clues?

Tim


Recent input:
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p 
C-p C-p C-p C-p C-p <f1> k <S-down> C-x o C-x k <return> 
n n n n <escape> C-k <escape> C-k <f1> k <escape> C-k 
k <f1> k k <escape> k C-x k <return> C-x o <f1> k d 
n n n n n n n n n n n SPC n n n k n n n n n n n k n 
n n n n n n n n n n n n n n C-g <help-echo> <help-echo> 
q q y <menu-bar> <help-menu> <report-emacs-bug>

Recent messages:
Scoring...done
Generating summary...done
No more unread articles (Type n for comp.emacs [24])
gnus-summary-next-article: Quit

Wrote d:/tbabin/.newsrc
Saving d:/tbabin/.newsrc.eld...
Wrote d:/tbabin/.newsrc.eld
Saving d:/tbabin/.newsrc.eld...done
Loading c:/opt/emacs-21.1/lisp/mail/emacsbug.elc...done

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

* Re: dabbrev in minibuffer
  2002-07-09 15:41 dabbrev in minibuffer Tim Babin
@ 2002-07-10  3:27 ` Miles Bader
  2002-07-10  7:51   ` Klaus Zeitler
  2002-07-10 10:43 ` Richard Stallman
  1 sibling, 1 reply; 6+ messages in thread
From: Miles Bader @ 2002-07-10  3:27 UTC (permalink / raw)


TBABIN@nortelnetworks.com (Tim Babin) writes:
> Running dabbrev-expand in the minibuffer starts an infinite loop.

Not for me; please give a precise test-case.

-Miles
-- 
80% of success is just showing up.  --Woody Allen

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

* Re: dabbrev in minibuffer
  2002-07-10  3:27 ` Miles Bader
@ 2002-07-10  7:51   ` Klaus Zeitler
  2002-07-12 11:13     ` Richard Stallman
  0 siblings, 1 reply; 6+ messages in thread
From: Klaus Zeitler @ 2002-07-10  7:51 UTC (permalink / raw)


>>>>> "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.

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

* Re: dabbrev in minibuffer
  2002-07-09 15:41 dabbrev in minibuffer Tim Babin
  2002-07-10  3:27 ` Miles Bader
@ 2002-07-10 10:43 ` Richard Stallman
  1 sibling, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2002-07-10 10:43 UTC (permalink / raw)
  Cc: bug-gnu-emacs

    Running dabbrev-expand in the minibuffer starts an infinite loop.

It works when I try it.

Please read the Bugs section in the Emacs manual, which provides
guidelines on how to write a bug report to give us the
necessary information so we can fix the bug.

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

* Re: dabbrev in minibuffer
  2002-07-10  7:51   ` Klaus Zeitler
@ 2002-07-12 11:13     ` Richard Stallman
  0 siblings, 0 replies; 6+ messages in thread
From: Richard Stallman @ 2002-07-12 11:13 UTC (permalink / raw)
  Cc: emacs-devel

    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

Since it does not fail on GNU/Linux, I can't debug it.
Can you run Emacs under GDB and see where the loop starts and ends?
Follow the advice in etc/DEBUG as regards "when Emacs is looping".
With that info, we can perhaps fix the bug that makes it impossible
to quit from a certain primitive, as well as the bug that makes
dabbrev loop.

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

* dabbrev in minibuffer
@ 2006-09-06 16:00 Dan Nicolaescu
  0 siblings, 0 replies; 6+ messages in thread
From: Dan Nicolaescu @ 2006-09-06 16:00 UTC (permalink / raw)



When editing in the minibuffer it would be nice if dabbrev-expand
would be able to use the minibuffer history as a source for
expansions. 
dabbrev only looks in buffers for expansions. So one way to solve this
would be to create a buffer that contains the minibuffer history and
put it at the beginning of the list of buffers.

I post the (very simple) code, maybe someone can figure out an elegant
way to integrate such a feature in emacs...

(defun minibuffer-setup-dabbrev-buffers ()
  (let ((buf (get-buffer-create " *dabbrev history* ")))
	(save-excursion 
	  (set-buffer buf)
	  (erase-buffer)
	  (mapc (lambda (arg) 
		  (insert arg "\n")) 
		(if minibuffer-history-variable 
		    (eval minibuffer-history-variable)
		  minibuffer-history)))
	(append (list buf) (dabbrev--select-buffers))))

(defun minibuffer-setup-hook-dabbrev ()
  (setq dabbrev-select-buffers-function 'minibuffer-setup-dabbrev-buffers))

(add-hook 'minibuffer-setup-hook 'minibuffer-setup-hook-dabbrev)

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

end of thread, other threads:[~2006-09-06 16:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-09 15:41 dabbrev in minibuffer Tim Babin
2002-07-10  3:27 ` Miles Bader
2002-07-10  7:51   ` Klaus Zeitler
2002-07-12 11:13     ` Richard Stallman
2002-07-10 10:43 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2006-09-06 16:00 Dan Nicolaescu

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.