all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* `ido.el' small, but annoying bug
@ 2004-12-03 18:05 Paul Pogonyshev
  2004-12-04  0:51 ` Kim F. Storm
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Pogonyshev @ 2004-12-03 18:05 UTC (permalink / raw)
  Cc: Kim F. Storm

Type `C-x b', use left/right arrow to select a different buffer
and then `C-k' to kill it.  With my Emacs (a recent CVS) the
list of buffers disappears, but can be reshown again by e.g.
pressing left/right arrow.

The following smallish patch seems to fix it.  However, `ido.el'
maintainer should certainly review it.


2004-12-03  Paul Pogonyshev  <pogonyshev@gmx.net>

	* ido.el (ido-matches): Doc fix.
	(ido-kill-buffer-at-head): Remove the killed buffer from
	`ido-matches' in addition to `ido-cur-list'.
	(ido-delete-file-at-head): Likewise for deleted file.


--- ido.el	24 Nov 2004 21:52:11 +0200	1.45
+++ ido.el	03 Dec 2004 19:59:32 +0200	
@@ -917,7 +917,7 @@ Copied from `icomplete-eoinput'.")
   "The initial string for the users string it is typed in.")
 
 (defvar ido-matches nil
-  "List of files currently matching `ido-text'.")
+  "List of files or buffers currently matching `ido-text'.")
 
 (defvar ido-report-no-match t
   "Report [No Match] when no completions matches ido-text.")
@@ -3218,7 +3218,8 @@ for first matching file."
 	  ;; buffer couldn't be killed.
 	  (setq ido-rescan t)
 	;; else buffer was killed so remove name from list.
-	(setq ido-cur-list (delq buf ido-cur-list))))))
+	(setq ido-cur-list (delq buf ido-cur-list)
+	      ido-matches  (delq buf ido-matches))))))
 
 ;;; DELETE CURRENT FILE
 (defun ido-delete-file-at-head ()
@@ -3239,7 +3240,8 @@ for first matching file."
 	  ;; file could not be deleted
 	  (setq ido-rescan t)
 	;; else file was killed so remove name from list.
-	(setq ido-cur-list (delq (car ido-matches) ido-cur-list))))))
+	(setq ido-cur-list (delq (car ido-matches) ido-cur-list)
+	      ido-matches  (cdr ido-matches))))))
 
 
 ;;; VISIT CHOSEN BUFFER

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

* Re: `ido.el' small, but annoying bug
  2004-12-03 18:05 `ido.el' small, but annoying bug Paul Pogonyshev
@ 2004-12-04  0:51 ` Kim F. Storm
  2004-12-04  1:13   ` Paul Pogonyshev
  2004-12-04 18:31   ` Paul Pogonyshev
  0 siblings, 2 replies; 7+ messages in thread
From: Kim F. Storm @ 2004-12-04  0:51 UTC (permalink / raw)
  Cc: emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:

> Type `C-x b', use left/right arrow to select a different buffer
> and then `C-k' to kill it.  With my Emacs (a recent CVS) the
> list of buffers disappears, but can be reshown again by e.g.
> pressing left/right arrow.
>
> The following smallish patch seems to fix it.  However, `ido.el'
> maintainer should certainly review it.

You patch looks ok, but I don't see the bug myself, so I wonder why it
happens for you.  Does it happen if you enable ido in emacs -q ?


-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: `ido.el' small, but annoying bug
  2004-12-04  0:51 ` Kim F. Storm
@ 2004-12-04  1:13   ` Paul Pogonyshev
  2004-12-04 18:31   ` Paul Pogonyshev
  1 sibling, 0 replies; 7+ messages in thread
From: Paul Pogonyshev @ 2004-12-04  1:13 UTC (permalink / raw)
  Cc: emacs-devel

Kim F. Storm wrote:
> Paul Pogonyshev <pogonyshev@gmx.net> writes:
> > Type `C-x b', use left/right arrow to select a different buffer
> > and then `C-k' to kill it.  With my Emacs (a recent CVS) the
> > list of buffers disappears, but can be reshown again by e.g.
> > pressing left/right arrow.
> >
> > The following smallish patch seems to fix it.  However, `ido.el'
> > maintainer should certainly review it.
>
> You patch looks ok, but I don't see the bug myself, so I wonder why it
> happens for you.  Does it happen if you enable ido in emacs -q ?

Weird enough it doesn't.

Here is the contents of my `~/.emacs' related to ido:

(custom-set-variables
 '(ido-case-fold nil)
 '(ido-enable-dot-prefix t)
 '(ido-mode (quote both) nil (ido))
 '(ido-subdir-face ((((class color)) (:inherit font-lock-function-name-face)))))

Paul

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

* Re: `ido.el' small, but annoying bug
  2004-12-04  0:51 ` Kim F. Storm
  2004-12-04  1:13   ` Paul Pogonyshev
@ 2004-12-04 18:31   ` Paul Pogonyshev
  2004-12-06 13:15     ` Kim F. Storm
  1 sibling, 1 reply; 7+ messages in thread
From: Paul Pogonyshev @ 2004-12-04 18:31 UTC (permalink / raw)
  Cc: emacs-devel

Kim F. Storm wrote:
> Paul Pogonyshev <pogonyshev@gmx.net> writes:
> > Type `C-x b', use left/right arrow to select a different buffer
> > and then `C-k' to kill it.  With my Emacs (a recent CVS) the
> > list of buffers disappears, but can be reshown again by e.g.
> > pressing left/right arrow.
> >
> > The following smallish patch seems to fix it.  However, `ido.el'
> > maintainer should certainly review it.
>
> You patch looks ok, but I don't see the bug myself, so I wonder why it
> happens for you.  Does it happen if you enable ido in emacs -q ?

Actually, my patch doesn't fully solve the problem.  When you hit
`C-x b C-k' (without left/right arrow), the bug persists with the
patch too.

Paul

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

* Re: `ido.el' small, but annoying bug
  2004-12-04 18:31   ` Paul Pogonyshev
@ 2004-12-06 13:15     ` Kim F. Storm
  2004-12-06 16:25       ` Urban Engberg
  0 siblings, 1 reply; 7+ messages in thread
From: Kim F. Storm @ 2004-12-06 13:15 UTC (permalink / raw)
  Cc: emacs-devel

Paul Pogonyshev <pogonyshev@gmx.net> writes:

> Kim F. Storm wrote:
>> Paul Pogonyshev <pogonyshev@gmx.net> writes:
>> > Type `C-x b', use left/right arrow to select a different buffer
>> > and then `C-k' to kill it.  With my Emacs (a recent CVS) the
>> > list of buffers disappears, but can be reshown again by e.g.
>> > pressing left/right arrow.
>> >
>> > The following smallish patch seems to fix it.  However, `ido.el'
>> > maintainer should certainly review it.
>>
>> You patch looks ok, but I don't see the bug myself, so I wonder why it
>> happens for you.  Does it happen if you enable ido in emacs -q ?
>
> Actually, my patch doesn't fully solve the problem.  When you hit
> `C-x b C-k' (without left/right arrow), the bug persists with the
> patch too.

If I start emacs -Q and use your customizations, the problem is
still not visible to me.

I suspect the problem is with some interference with some other
package which tries to use the minibuffer or echo area when you
kill a buffer.

Can you start with emacs -Q, and then gradually enable the
various customizations you use to see which one triggers the bug.

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: `ido.el' small, but annoying bug
  2004-12-06 13:15     ` Kim F. Storm
@ 2004-12-06 16:25       ` Urban Engberg
  2004-12-06 17:49         ` Paul Pogonyshev
  0 siblings, 1 reply; 7+ messages in thread
From: Urban Engberg @ 2004-12-06 16:25 UTC (permalink / raw)
  Cc: emacs-devel, Paul Pogonyshev

> Can you start with emacs -Q, and then gradually enable the
> various customizations you use to see which one triggers the bug.

I reproduced Paul's problem the first time I tried, but had problems
reproducing it again.  This made me curious, so I did as you
suggested, and found eldoc to be a possible problem -- or more
precisely eldoc-pre-command-refresh-echo-area.  The buffer you kill
must be an emacs-lisp buffer, I guess.

Reproducible scenario:

   GNU Emacs 21.3.50.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll
   bars) of 2004-11-16 on uelinux

Put the lines 

   (add-hook 'emacs-lisp-mode-hook 'turn-on-eldoc-mode)
   (ido-mode)

into the file

   ~/tmp/foo.el

and do

   emacs -Q -l ~/tmp/foo.el ~/tmp/foo.el

in the emacs window, do

   C-x b <return> C-x b C-k

and the minibuffer is empty.  

(The first C-x b switches to the *scratch* buffer, in the second we
kill foo.el)

  Urban

-- 
ue@ccieurope.com

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

* Re: `ido.el' small, but annoying bug
  2004-12-06 16:25       ` Urban Engberg
@ 2004-12-06 17:49         ` Paul Pogonyshev
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Pogonyshev @ 2004-12-06 17:49 UTC (permalink / raw)
  Cc: emacs-devel

Urban Engberg wrote:
> > Can you start with emacs -Q, and then gradually enable the
> > various customizations you use to see which one triggers the bug.
>
> I reproduced Paul's problem the first time I tried, but had problems
> reproducing it again.  This made me curious, so I did as you
> suggested, and found eldoc to be a possible problem -- or more
> precisely eldoc-pre-command-refresh-echo-area.  The buffer you kill
> must be an emacs-lisp buffer, I guess.

That's a very plausible explanation.  Not only I programmed in Elisp
a lot recently, but the mode I program uses `eldoc' too (you can use
`eldoc' for about anything, not necessarily program code.)

Paul

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

end of thread, other threads:[~2004-12-06 17:49 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-03 18:05 `ido.el' small, but annoying bug Paul Pogonyshev
2004-12-04  0:51 ` Kim F. Storm
2004-12-04  1:13   ` Paul Pogonyshev
2004-12-04 18:31   ` Paul Pogonyshev
2004-12-06 13:15     ` Kim F. Storm
2004-12-06 16:25       ` Urban Engberg
2004-12-06 17:49         ` Paul Pogonyshev

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.