emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

recently introduced bug in minibuffer handling


From: Michael Kifer
Subject: recently introduced bug in minibuffer handling
Date: Tue, 29 Nov 2005 02:23:16 -0500 (EST)

Symptoms:

The following bug was introduced in the last two weeks or so.

To reproduce, evaluate the following two definitions:

(defadvice read-file-name (around read-filename-advice activate)
    "Tell `exit-minibuffer' to run a hook."
    (let ((minibuffer-exit-hook
           (append minibuffer-exit-hook '(my-minibuffer-hook))))
      ad-do-it))

(defun my-minibuffer-hook ()
  "Manipulate the minibuffer before exiting it."
  (goto-char (minibuffer-prompt-end))
  (end-of-line)
  (message "current point: %d "  (point))
  (message "max point: %d "  (point-max))
  )

Then evaluate
(read-file-name "foo")
for instance, with C-cC-e
When you see a prompt, type something at the end.
For instance, type ~/.emacs to the end of the stuff that shows in the
minibuffer.
You will see (in *Messages*) that current point and max point are different!
The current point will be at the end of the prompt instead of at the end of
what you typed.

Now, if you remove (goto-char (minibuffer-prompt-end)) at the beginning
of the hook and repeat the experiment then you will see that the current point
and the max point are the same. So, something gets messed up.


If emacs crashed, and you have the emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/home/users/kifer/gnu/emacs/etc/DEBUG for instructions.


In GNU Emacs 22.0.50.5 (i686-pc-linux-gnu, GTK+ Version 2.8.3)
 of 2005-11-29 on kiferserv.kiferhome.com
X server distributor `Mandriva Linux (X.Org X11 6.9, patch level 
1.cvs20050915.2mdk)', version 11.0.60899900
configured using `configure '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: en
  value of $LC_COLLATE: en_US.UTF-8
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: en_US.UTF-8
  value of $LC_MONETARY: en_US.UTF-8
  value of $LC_NUMERIC: en_US.UTF-8
  value of $LC_TIME: en_US.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  outline-minor-mode: t
  display-time-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: 1

Recent input:
b b b b b b <backspace> <backspace> <backspace> r 4 
SPC SPC SPC SPC SPC SPC <backspace> <backspace> r d 
<f22> SPC <switch-frame> <switch-frame> <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-movement> <mouse-movement> 
<drag-mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-movement> <mouse-1> 
<double-down-mouse-1> <double-mouse-1> r s <down-mouse-1> 
<mouse-1> <double-down-mouse-1> <double-mouse-1> x 
x <return> x x <return> x x <return> x x <down-mouse-1> 
<mouse-movement> <mouse-movement> <drag-mouse-1> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> <f22> SPC <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <menu-bar> <help-menu> <report-emacs-b
ug>

Recent messages:
forward-sexp: Scan error: "Unbalanced parentheses", 664, 1 [2 times]
Wrote /home/users/kifer/test/minibuffer.el [2 times]
Making completion list...
viper-del-backward-char-in-insert: Text is read-only [3 times]
Making completion list...
Type C-x 1 to remove help window.  C-M-v to scroll the help.
Wrote /home/users/kifer/test/minibuffer.el
Auto-saving...done
Auto-saving...done
Wrote /home/users/kifer/test/minibuffer.el




reply via email to

[Prev in Thread] Current Thread [Next in Thread]