unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1206: 23.0.60; read-shell-command completion problem
@ 2008-10-19 15:24 Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2008-10-19 15:24 UTC (permalink / raw)
  To: emacs-pretest-bug


Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

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

  emacs -Q
  M-!
  ls d:/gnu/emacs/lisp

Move point so that the cursor is on the slash between "emacs" and
"lisp", and type TAB.  At this point, the *Completions* buffer pops up
with the following possibilities:

  Click <mouse-2> on a completion to select it.
  In this buffer, type RET to select the completion near point.

  Possible completions are:
  emacs-21.4/            emacs-22-branch/      emacs-22.x/
  emacs-23.pre-unicode/  emacs-bidi/           emacs-rtf/
  emacs/

(Depending on your system, you will see something different.)
Clicking on "emacs-22-branch/" produces this in the minibuffer:

  emacs-22-branch//lisp

But I expected it to replace only the "emacs" part (because this is
what it evidently produced the possible completions for), so that I
will see "ls d:/gnu/emacs-22-branch/lisp".

This was on MS-Windows, but I see the same behavior on GNU/Linux:
picking up a completion replaces the whole input, up to the position
of point.

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
d:/gnu/emacs/etc/DEBUG for instructions.


In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-10-19 on HOME-C4E4A596F7
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4)'

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
  value of $XMODIFIERS: nil
  locale-coding-system: cp1255
  default-enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  shell-dirtrack-mode: t
  tooltip-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
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
s e c o n d SPC C - x SPC a n d SPC w a n t e d SPC 
t o SPC b a i l SPC o u t . SPC SPC I S-SPC e x p e 
c t e d SPC t o SPC s e e SPC " Q u i t " , SPC n o 
t SPC a SPC f a t a l SPC <M-backspace> <M-backspace> 
a n SPC e r r o r . ) M-q <C-home> C-SPC <down> C-SPC 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> M-w C-x b <return> C-x 1 C-x <return> c u n 
d e c <tab> <return> C-x C-g <help-echo> <help-echo> 
C-x b * C o m <tab> <return> C-x b <return> M-! l s 
SPC d : / g n u / e m a c s / l i s p <left> <left> 
<left> <left> <left> <tab> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-2> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> C-SPC C-e 
M-w <help-echo> <help-echo> <help-echo> C-g C-x b <up> 
<up> <return> <up> <up> <up> <up> C-a C-SPC <down> 
<down> <down> <down> <down> <down> <down> M-w <help-echo> 
C-x b <return> M-x <up> <return>

Recent messages:
Quit [2 times]
universal-coding-system-argument: Wrong type argument: commandp, nil
Mark set [4 times]
Auto-saving...done
Mark set [3 times]
Saved text from "To: emacs-pretest-bug@gnu.org
Subject: 2"
universal-coding-system-argument: Wrong type argument: commandp, nil
Quit
Mark set






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

* bug#1206: 23.0.60; read-shell-command completion problem
@ 2009-08-15 23:57 Chong Yidong
  0 siblings, 0 replies; 6+ messages in thread
From: Chong Yidong @ 2009-08-15 23:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 1206

>   emacs -Q
>   M-!
>   ls d:/gnu/emacs/lisp
>
> Move point so that the cursor is on the slash between "emacs" and
> "lisp", and type TAB.  At this point, the *Completions* buffer pops up
>
>   Click <mouse-2> on a completion to select it.
>   In this buffer, type RET to select the completion near point.
>
>   Possible completions are:
>   emacs-21.4/            emacs-22-branch/      emacs-22.x/
>   emacs-23.pre-unicode/  emacs-bidi/           emacs-rtf/
>   emacs/
>
> Clicking on "emacs-22-branch/" produces this in the minibuffer:
>
>   emacs-22-branch//lisp

Could you test the following patch (admittedly a bit of a hack)?

*** trunk/lisp/simple.el.~1.1003.~	2009-08-13 10:30:54.000000000 -0400
--- trunk/lisp/simple.el	2009-08-15 19:53:04.000000000 -0400
***************
*** 5843,5849 ****
--- 5843,5857 ----
  	(if base-size
  	    (delete-region (+ base-size (field-beginning)) (point))
  	  (choose-completion-delete-max-match choice))
+ 
+ 	;; Insert the choice.  When reading a file name and the choice
+ 	;; is a directory, avoid having an extra "/" (Bug#1206).
  	(insert choice)
+ 	(and minibuffer-completing-file-name
+ 	     (looking-at "/")
+ 	     (= (aref choice (1- (length choice))) ?/)
+ 	     (delete-char 1))
+ 
  	(remove-text-properties (- (point) (length choice)) (point)
  				'(mouse-face nil))
  	;; Update point in the window that BUFFER is showing in.





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

* bug#1206: 23.0.60; read-shell-command completion problem
@ 2009-10-31 21:57 Chong Yidong
  2009-11-07 13:20 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Chong Yidong @ 2009-10-31 21:57 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 1206

Hi Eli,

Could you test the patch I posted at

  http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1206

Thanks!





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

* bug#1206: 23.0.60; read-shell-command completion problem
  2009-10-31 21:57 Chong Yidong
@ 2009-11-07 13:20 ` Eli Zaretskii
  2011-03-02  4:14   ` Glenn Morris
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2009-11-07 13:20 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 1206

> From: Chong Yidong <cyd@stupidchicken.com>
> Cc: 1206@emacsbugs.donarmstrong.com
> Date: Sat, 31 Oct 2009 17:57:03 -0400
> 
> Hi Eli,
> 
> Could you test the patch I posted at
> 
>   http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=1206

Sorry for the long delay.  I tested the patch now on MS-Windows, and I
still see two slashes, exactly like in the original report.  The
problem seems to be that minibuffer-completing-file-name is nil when
the modified code is run.





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

* bug#1206: 23.0.60; read-shell-command completion problem
  2009-11-07 13:20 ` Eli Zaretskii
@ 2011-03-02  4:14   ` Glenn Morris
  2011-03-02 17:57     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Glenn Morris @ 2011-03-02  4:14 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 1206


Do you still see this? I don't think I do.





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

* bug#1206: 23.0.60; read-shell-command completion problem
  2011-03-02  4:14   ` Glenn Morris
@ 2011-03-02 17:57     ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2011-03-02 17:57 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 1206

> From: Glenn Morris <rgm@gnu.org>
> Cc: 1206@debbugs.gnu.org
> Date: Tue, 01 Mar 2011 23:14:15 -0500
> 
> 
> Do you still see this? I don't think I do.

No, but it still isn't right: it inserts an extra slash.  That is, I
get something like "d:/gnu/emacs-foo//lisp".  The extra slash in this
situation is really not nice...

This happens both with Emacs 23.3 RC1 and with the development trunk.





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

end of thread, other threads:[~2011-03-02 17:57 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-15 23:57 bug#1206: 23.0.60; read-shell-command completion problem Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2009-10-31 21:57 Chong Yidong
2009-11-07 13:20 ` Eli Zaretskii
2011-03-02  4:14   ` Glenn Morris
2011-03-02 17:57     ` Eli Zaretskii
2008-10-19 15:24 Eli Zaretskii

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