unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Completion bug in gud or comint
@ 2011-12-16 15:14 Lluís
  2011-12-17  0:55 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Lluís @ 2011-12-16 15:14 UTC (permalink / raw)
  To: emacs-devel

I didn't find any related bug report, but I'm not sure if this has been reported
before in this list.

Steps to reproduce it:

  M-x gdb
  gdb -i=mi<RET>
  >> (gdb) _
  s<TAB>
  >> (gdb) s_
  >> <completion buffer output>
  o<TAB>
  >> source_
  <TAB>
  >> (gdb) _source

As you can see, the comint prompt ('(gdb)') "disappears" (already strange
enough) and the point moves accordingly when there is a common completion prefix
available, but performing a new completion makes the prompt "reappear".

The most annoying thing is that while the last completion restored the prompt,
point is kept in its position before the prompt restoration, which means not
having point at the end of the line.

I'm using emacs-snapshot 1:20111206-1+squeeze, but I also tried to evaluate
'comint.el' and 'gud.el' from the latest trunk before the test.


Thanks,
  Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



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

* Re: Completion bug in gud or comint
  2011-12-16 15:14 Completion bug in gud or comint Lluís
@ 2011-12-17  0:55 ` Stefan Monnier
  2011-12-18 19:07   ` Lluís
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2011-12-17  0:55 UTC (permalink / raw)
  To: Lluís; +Cc: emacs-devel

> I didn't find any related bug report, but I'm not sure if this has
> been reported before in this list.

> Steps to reproduce it:

>   M-x gdb
>   gdb -i=mi<RET>
>>> (gdb) _
>   s<TAB>
>>> (gdb) s_
>>> <completion buffer output>
>   o<TAB>
>>> source_
>   <TAB>
>>> (gdb) _source

> As you can see, the comint prompt ('(gdb)') "disappears" (already
> strange enough) and the point moves accordingly when there is a common
> completion prefix available, but performing a new completion makes the
> prompt "reappear".

I can't reproduce it with Emacs's trunk, starting as "emacs -Q".
Have you tried your recipe with "emacs -Q"?


        Stefan



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

* Re: Completion bug in gud or comint
  2011-12-17  0:55 ` Stefan Monnier
@ 2011-12-18 19:07   ` Lluís
  2011-12-21 14:40     ` Lluís Vilanova
  2011-12-21 15:03     ` Lluís Vilanova
  0 siblings, 2 replies; 8+ messages in thread
From: Lluís @ 2011-12-18 19:07 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier writes:

>> I didn't find any related bug report, but I'm not sure if this has
>> been reported before in this list.

>> Steps to reproduce it:

>> M-x gdb
>> gdb -i=mi<RET>
>>>> (gdb) _
>> s<TAB>
>>>> (gdb) s_
>>>> <completion buffer output>
>> o<TAB>
>>>> source_
>> <TAB>
>>>> (gdb) _source

>> As you can see, the comint prompt ('(gdb)') "disappears" (already
>> strange enough) and the point moves accordingly when there is a common
>> completion prefix available, but performing a new completion makes the
>> prompt "reappear".

> I can't reproduce it with Emacs's trunk, starting as "emacs -Q".
> Have you tried your recipe with "emacs -Q"?

Yes.

I've also tried to `eval-buffer' comint, gud and gdb-mi from the latest trunk,
and the later (gdb-mi) hangs forever.

Just in case, I also tried to build a complete emacs from trunk and this is the
backtrace on quit when completing in the gud buffer:

Debugger entered--Lisp error: (quit)
  accept-process-output(#<process gud>)
  gud-gdb-run-command-fetch-lines("complete s" #<buffer *gud*> 0)
  gud-gdb-completions("" "s")
  apply(gud-gdb-completions "" "s")
  (closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args))("s")
  #[771 "\211\242\301=\206\n\211\302=?\205+r\303 \304!\203\0\305!\202\0p\262q\210\306\300!\x05$)\207" [(closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args)) boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"]("s" nil lambda)
  test-completion("s" #[771 "\211\242\301=\206\n\211\302=?\205+r\303 \304!\203\0\305!\202\0p\262q\210\306\300!\x05$)\207" [(closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args)) boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  completion--do-completion()
  minibuffer-complete()
  call-interactively(minibuffer-complete)
  #[1028 "\x01\304\x06\x06\305\211\306%\x18\305\262\x02\305\262\307\310\311#\210\n\203,\312\313!\210p\a\a\aF\314\315\316\317\320\321\x06!\322\"\323\324%DC\216\325\326!+\207" [minibuffer-completion-predicate minibuffer-completion-table completion-in-region-mode-predicate completion-in-region--data make-overlay nil t overlay-put field completion completion-in-region-mode 1 funcall make-byte-code 0 "\301\300!\207" vconcat vector [delete-overlay] 2 "\n\n(fn)" call-interactively minibuffer-complete] 14 "\n\n(fn START END COLLECTION PREDICATE)"](506 507 #[771 "\211\242\301=\206\n\211\302=?\205+r\303 \304!\203\0\305!\202\0p\262q\210\306\300!\x05$)\207" [(closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args)) boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  apply(#[1028 "\x01\304\x06\x06\305\211\306%\x18\305\262\x02\305\262\307\310\311#\210\n\203,\312\313!\210p\a\a\aF\314\315\316\317\320\321\x06!\322\"\323\324%DC\216\325\326!+\207" [minibuffer-completion-predicate minibuffer-completion-table completion-in-region-mode-predicate completion-in-region--data make-overlay nil t overlay-put field completion completion-in-region-mode 1 funcall make-byte-code 0 "\301\300!\207" vconcat vector [delete-overlay] 2 "\n\n(fn)" call-interactively minibuffer-complete] 14 "\n\n(fn START END COLLECTION PREDICATE)"] (506 507 #[771 "\211\242\301=\206\n\211\302=?\205+r\303 \304!\203\0\305!\202\0p\262q\210\306\300!\x05$)\207" [(closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args)) boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil))
  #[771 ":\2030\x02@\301=\203\0\300@\302\x05A\"\303#\207\304@\305\306\307\310\311\312\300!\313\"\314\315%\x06A\x06##\207\304\316\"\207" [(#0) t append nil apply apply-partially make-byte-code 642 "\300@\x03#\207" vconcat vector [] 7 "\n\n(fn FUNS GLOBAL &rest ARGS)" #[1028 "\x01\304\x06\x06\305\211\306%\x18\305\262\x02\305\262\307\310\311#\210\n\203,\312\313!\210p\a\a\aF\314\315\316\317\320\321\x06!\322\"\323\324%DC\216\325\326!+\207" [minibuffer-completion-predicate minibuffer-completion-table completion-in-region-mode-predicate completion-in-region--data make-overlay nil t overlay-put field completion completion-in-region-mode 1 funcall make-byte-code 0 "\301\300!\207" vconcat vector [delete-overlay] 2 "\n\n(fn)" call-interactively minibuffer-complete] 14 "\n\n(fn START END COLLECTION PREDICATE)"]] 12 "\n\n(fn FUNS GLOBAL ARGS)"](nil nil (506 507 #[771 "\211\242\301=\206\n\211\302=?\205+r\303 \304!\203\0\305!\202\0p\262q\210\306\300!\x05$)\207" [(closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args)) boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil))
  completion-in-region(506 507 #[771 "\211\242\301=\206\n\211\302=?\205+r\303 \304!\203\0\305!\202\0p\262q\210\306\300!\x05$)\207" [(closure (t) (&rest args) (apply (quote gud-gdb-completions) (quote "") args)) boundaries metadata minibuffer-selected-window window-live-p window-buffer complete-with-action] 8 "\n\n(fn STRING PRED ACTION)"] nil)
  completion-at-point()
  call-interactively(completion-at-point nil nil)


Evaluating the expression '(gud-gdb-completions "" "s")' does work correctly.


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



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

* Re: Completion bug in gud or comint
  2011-12-18 19:07   ` Lluís
@ 2011-12-21 14:40     ` Lluís Vilanova
  2011-12-25  7:54       ` Chong Yidong
  2011-12-21 15:03     ` Lluís Vilanova
  1 sibling, 1 reply; 8+ messages in thread
From: Lluís Vilanova @ 2011-12-21 14:40 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Lluís  writes:

> Just in case, I also tried to build a complete emacs from trunk and this is the
> backtrace on quit when completing in the gud buffer:

Tried with the latest revision (106714) and it's still failing. Is anyone else
seeing that error?

* Start M-x gdb with "gdb -i=mi"
* type "so"
* complete-symbol
* wait forever
* C-g
* The "(gdb) " prefix disappears and "so" expands into "source"

I've tested it with GDB versions 7.0.1-2+b1 and 7.3-1+b1 (debian).

Here's the build info given by report-emacs-bug:

In GNU Emacs 24.0.92.3 (x86_64-unknown-linux-gnu)
 of 2011-12-21 on ginnungagap
Windowing system distributor `The X.Org Foundation', version 11.0.11101902
configured using `configure  '--prefix=/tmp/emacs-build' '--with-x-toolkit=no' '--with-xpm=no' '--with-jpeg=no' '--with-png=no' '--with-gif=no' '--with-tiff=no''

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: ca_ES.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x g d b <return> <return> s o <M-tab> M-x e m a <backspace> 
<backspace> <backspace> r e p o r t - e m a c s - <tab> 
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug gdb-mi bindat json gud easy-mmode comint regexp-opt ring
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dynamic-setting x multi-tty emacs)



Thanks,
  Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



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

* Re: Completion bug in gud or comint
  2011-12-18 19:07   ` Lluís
  2011-12-21 14:40     ` Lluís Vilanova
@ 2011-12-21 15:03     ` Lluís Vilanova
  1 sibling, 0 replies; 8+ messages in thread
From: Lluís Vilanova @ 2011-12-21 15:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Lluís  writes:

> Just in case, I also tried to build a complete emacs from trunk and this is the
> backtrace on quit when completing in the gud buffer:

Tried with the latest revision (106714) and it's still failing. Is anyone else
seeing that error?

* Start M-x gdb with "gdb -i=mi"
* type "so"
* complete-symbol
* wait forever
* C-g
* The "(gdb) " prefix disappears and "so" expands into "source"

I've tested it with GDB versions 7.0.1-2+b1 and 7.3-1+b1 (debian).

Here's the build info given by report-emacs-bug:

In GNU Emacs 24.0.92.3 (x86_64-unknown-linux-gnu)
 of 2011-12-21 on ginnungagap
Windowing system distributor `The X.Org Foundation', version 11.0.11101902
configured using `configure  '--prefix=/tmp/emacs-build' '--with-x-toolkit=no' '--with-xpm=no' '--with-jpeg=no' '--with-png=no' '--with-gif=no' '--with-tiff=no''

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: ca_ES.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x g d b <return> <return> s o <M-tab> M-x e m a <backspace> 
<backspace> <backspace> r e p o r t - e m a c s - <tab> 
<return>

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader
emacsbug gdb-mi bindat json gud easy-mmode comint regexp-opt ring
time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax
facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak
czech european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dynamic-setting x multi-tty emacs)



Thanks,
  Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



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

* Re: Completion bug in gud or comint
  2011-12-21 14:40     ` Lluís Vilanova
@ 2011-12-25  7:54       ` Chong Yidong
  2011-12-25 10:48         ` Chong Yidong
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2011-12-25  7:54 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Lluís Vilanova <vilanova@ac.upc.edu> writes:

> Tried with the latest revision (106714) and it's still failing. Is anyone else
> seeing that error?
>
> * Start M-x gdb with "gdb -i=mi"
> * type "so"
> * complete-symbol
> * wait forever
> * C-g
> * The "(gdb) " prefix disappears and "so" expands into "source"
>
> I've tested it with GDB versions 7.0.1-2+b1 and 7.3-1+b1 (debian).

I see the problem.  It arises from the fact that the completion-at-point
function in gud.el was written without proper gdb-mi.el support.  I'll
see if I can put together a solution.




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

* Re: Completion bug in gud or comint
  2011-12-25  7:54       ` Chong Yidong
@ 2011-12-25 10:48         ` Chong Yidong
  2012-01-02 12:22           ` Lluís
  0 siblings, 1 reply; 8+ messages in thread
From: Chong Yidong @ 2011-12-25 10:48 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Chong Yidong <cyd@gnu.org> writes:

> Lluís Vilanova <vilanova@ac.upc.edu> writes:
>
>> * Start M-x gdb with "gdb -i=mi"
>> * type "so"
>> * complete-symbol
>> * wait forever
>> * C-g
>> * The "(gdb) " prefix disappears and "so" expands into "source"
>
> I see the problem.  It arises from the fact that the
> completion-at-point function in gud.el was written without proper
> gdb-mi.el support.  I'll see if I can put together a solution.

Fix committed to trunk (revision 106732); please check if the problem is
resolved.



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

* Re: Completion bug in gud or comint
  2011-12-25 10:48         ` Chong Yidong
@ 2012-01-02 12:22           ` Lluís
  0 siblings, 0 replies; 8+ messages in thread
From: Lluís @ 2012-01-02 12:22 UTC (permalink / raw)
  To: Chong Yidong; +Cc: Stefan Monnier, emacs-devel

Chong Yidong writes:

> Chong Yidong <cyd@gnu.org> writes:
>> Lluís Vilanova <vilanova@ac.upc.edu> writes:
>> 
>>> * Start M-x gdb with "gdb -i=mi"
>>> * type "so"
>>> * complete-symbol
>>> * wait forever
>>> * C-g
>>> * The "(gdb) " prefix disappears and "so" expands into "source"
>> 
>> I see the problem.  It arises from the fact that the
>> completion-at-point function in gud.el was written without proper
>> gdb-mi.el support.  I'll see if I can put together a solution.

> Fix committed to trunk (revision 106732); please check if the problem is
> resolved.

Now it seems to work perfectly (for the few tests I did); thanks a lot.


Lluis

-- 
 "And it's much the same thing with knowledge, for whenever you learn
 something new, the whole world becomes that much richer."
 -- The Princess of Pure Reason, as told by Norton Juster in The Phantom
 Tollbooth



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

end of thread, other threads:[~2012-01-02 12:22 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-16 15:14 Completion bug in gud or comint Lluís
2011-12-17  0:55 ` Stefan Monnier
2011-12-18 19:07   ` Lluís
2011-12-21 14:40     ` Lluís Vilanova
2011-12-25  7:54       ` Chong Yidong
2011-12-25 10:48         ` Chong Yidong
2012-01-02 12:22           ` Lluís
2011-12-21 15:03     ` Lluís Vilanova

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