GNU bug report logs - #8926
24.0.50; pcomplete regression

Previous Next

Package: emacs;

Reported by: thierry <thierry.volpiatto <at> gmail.com>

Date: Fri, 24 Jun 2011 07:04:02 UTC

Severity: normal

Tags: notabug, wontfix

Found in version 24.0.50

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 8926 in the body.
You can then email your comments to 8926 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Fri, 24 Jun 2011 07:04:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to thierry <thierry.volpiatto <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 24 Jun 2011 07:04:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: thierry <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.50; pcomplete regression
Date: Fri, 24 Jun 2011 09:03:13 +0200
Hi all,
in emacs-24 i notice a regression with pcomplete:

M-x eshell

cd do

M-: (pcomplete-completions)
=> doesn't return a list of directories starting with "do" but an elisp
object unusable.

In emacs-23 a list is returned as expected.

However if i do:

M-x eshell

cd

M-: (pcomplete-completions)

I have a list of commands starting with "cd" as expected.


In GNU Emacs 24.0.50.15 (i686-pc-linux-gnu, GTK+ Version 2.24.4)
 of 2011-06-23 on thierry-MM061
Windowing system distributor `The X.Org Foundation', version 11.0.11001000
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: fr_FR.utf8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  TeX-PDF-mode: t
  eldoc-mode: t
  minibuffer-depth-indicate-mode: t
  auto-image-file-mode: t
  show-paren-mode: t
  display-time-mode: t
  diff-auto-refine-mode: t
  recentf-mode: t
  savehist-mode: t
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<f11> e t c d SPC d o M-: M-p <return> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<f11> e t C-x C-b <down> <down> <down> <down> <down> 
<C-tab> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> C-M-SPC M-w M-x r e p o r t <down> 
<return>

Recent messages:
OVERVIEW
Restoring buffers...91%
OVERVIEW
Restoring buffers...done
Evaluating...
See buffer *Pp Eval Output*.
delete-backward-char: Text is read-only

Mark set


Load-path shadows:
~/elisp/ngnus/lisp/.dir-locals hides ~/elisp/org-active/.dir-locals
~/elisp/ngnus/lisp/lpath hides ~/elisp/emacs-wget/lpath
~/elisp/AC/popup hides ~/elisp/popup
~/.emacs.d/emacs-config-laptop/emacs-bugfix hides ~/elisp/emacs-bugfix
~/elisp/ngnus/lisp/password-cache hides /usr/local/share/emacs/24.0.50/lisp/password-cache
~/elisp/ngnus/lisp/format-spec hides /usr/local/share/emacs/24.0.50/lisp/format-spec
~/elisp/ngnus/lisp/color hides /usr/local/share/emacs/24.0.50/lisp/color
~/elisp/ngnus/lisp/md4 hides /usr/local/share/emacs/24.0.50/lisp/md4
~/elisp/ngnus/lisp/hex-util hides /usr/local/share/emacs/24.0.50/lisp/hex-util
~/elisp/ngnus/lisp/dns-mode hides /usr/local/share/emacs/24.0.50/lisp/textmodes/dns-mode
~/elisp/ngnus/lisp/imap hides /usr/local/share/emacs/24.0.50/lisp/net/imap
~/elisp/ngnus/lisp/hmac-md5 hides /usr/local/share/emacs/24.0.50/lisp/net/hmac-md5
~/elisp/ngnus/lisp/dig hides /usr/local/share/emacs/24.0.50/lisp/net/dig
~/elisp/ngnus/lisp/sasl hides /usr/local/share/emacs/24.0.50/lisp/net/sasl
~/elisp/ngnus/lisp/sasl-cram hides /usr/local/share/emacs/24.0.50/lisp/net/sasl-cram
~/elisp/ngnus/lisp/sasl-digest hides /usr/local/share/emacs/24.0.50/lisp/net/sasl-digest
~/elisp/ngnus/lisp/tls hides /usr/local/share/emacs/24.0.50/lisp/net/tls
~/elisp/ngnus/lisp/dns hides /usr/local/share/emacs/24.0.50/lisp/net/dns
~/elisp/ngnus/lisp/hmac-def hides /usr/local/share/emacs/24.0.50/lisp/net/hmac-def
~/elisp/ngnus/lisp/netrc hides /usr/local/share/emacs/24.0.50/lisp/net/netrc
~/elisp/ngnus/lisp/ntlm hides /usr/local/share/emacs/24.0.50/lisp/net/ntlm
~/elisp/ngnus/lisp/sasl-ntlm hides /usr/local/share/emacs/24.0.50/lisp/net/sasl-ntlm
~/elisp/ngnus/lisp/binhex hides /usr/local/share/emacs/24.0.50/lisp/mail/binhex
~/elisp/ngnus/lisp/hashcash hides /usr/local/share/emacs/24.0.50/lisp/mail/hashcash
~/elisp/ngnus/lisp/uudecode hides /usr/local/share/emacs/24.0.50/lisp/mail/uudecode
~/elisp/ngnus/lisp/parse-time hides /usr/local/share/emacs/24.0.50/lisp/calendar/parse-time
~/elisp/ngnus/lisp/time-date hides /usr/local/share/emacs/24.0.50/lisp/calendar/time-date
~/elisp/ngnus/lisp/pgg-parse hides /usr/local/share/emacs/24.0.50/lisp/obsolete/pgg-parse
~/elisp/ngnus/lisp/pgg hides /usr/local/share/emacs/24.0.50/lisp/obsolete/pgg
~/elisp/ngnus/lisp/pgg-pgp5 hides /usr/local/share/emacs/24.0.50/lisp/obsolete/pgg-pgp5
~/elisp/ngnus/lisp/pgg-pgp hides /usr/local/share/emacs/24.0.50/lisp/obsolete/pgg-pgp
~/elisp/ngnus/lisp/pgg-def hides /usr/local/share/emacs/24.0.50/lisp/obsolete/pgg-def
~/elisp/ngnus/lisp/pgg-gpg hides /usr/local/share/emacs/24.0.50/lisp/obsolete/pgg-gpg

Features:
(shadow gnus-cite gnus-dired gnus-registry registry eieio-base ert
find-func debug mail-extr gnus-msg emacsbug pcmpl-unix preview prv-emacs
tex-buf reftex-vcr reftex-dcr reftex-auc reftex reftex-vars font-latex
latex tex-style tex latexenc vc-cvs vc-git xgit-dvc xgit xgit-annotate
xgit-log sh-script vc-bzr bzr-dvc bzr dvc-annotate js imenu cc-mode
cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs
conf-mode xhg-dvc xhg xhg-annotate xhg-mq xhg-log vc-rcs bzr-core
xdarcs-core xgit-core xhg-core xmtn-minimal tla smerge-mode newcomment
dvc-state dvc-config dvc-diff dvc-fileinfo diff dvc-cmenu dvc-about
dvc-version dvc-revlist uniquify anything-esh em-unix em-script
em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt
em-banner em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-groups
eshell esh-module esh-mode align-let server googlecl google-maps
google-maps-static google-maps-geocode google-maps-base json
simple-call-tree el-expectations el-mock csv2org iedit zop-to-char
mule-util elscreen smallurl mm-url xml-weather rectangle-utils tv-utils
eldoc-eval eldoc pcvs pcvs-parse pcvs-info pcvs-defs auto-document
autodoc mb-depth ioccur moz cl-info slime-xref-browser slime-banner
slime-tramp slime-asdf slime-fancy slime-fontifying-fu slime-package-fu
slime-references slime-scratch slime-presentations slime-fuzzy
slime-fancy-inspector slime-c-p-c slime-editing-commands slime-autodoc
slime-parse slime-repl slime hideshow hyperspec slime-autoloads boxquote
rect image-file newsticker newst-treeview newst-plainview newst-reader
newst-ticker newst-backend ledger-config ledger esh-arg esh-util lpr
woman man two-column em-term term ehelp electric esh-toggle em-xtra
flymake pdbtrack no-word regex-tool whitespace paren time dired-tar
dired-extension image-dired yaoddmuse skeleton sgml-mode
emms-mplayer-config emms-playlist-limit emms-volume emms-volume-amixer
emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-lastfm-client parse-time
emms-cue emms-mode-line-icon emms-browser sort emms-playlist-sort
emms-last-played emms-player-xine emms-player-mpd tq emms-playing-time
emms-lyrics emms-url hl-line emms-tag-editor emms-mark emms-mode-line
emms-cache emms-info-ogginfo emms-info-mp3info emms-playlist-mode
emms-player-vlc emms-player-mplayer emms-info emms-streams later-do
emms-source-playlist emms-source-file emms-player-simple emms-setup emms
emms-compat winner dvc-init bzr-gnus tla-gnus xgit-gnus xhg-gnus
gnus-art mm-uu mml2015 mm-view mml-smime smime dig nnir gnus-sum nnoo
gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int
gnus-range gnus-win gnus gnus-ems nnheader dvc-gnus tla-core
tla-autoconf tla-defs dvc-log vc vc-dispatcher dvc-unified dvc-tips
dired-x ediff-merg ediff-diff ediff-wind ediff-help ediff-util
ediff-mult ediff-init ediff dvc-autoloads dvc-core dvc-lisp dvc-buffers
dvc-ui dvc-register dvc-utils dvc-emacs ewoc dvc-defs dvc-site psvn
log-edit pcvs-util add-log diff-mode htmlize-hack htmlize muse-colors
muse-docbook muse-texinfo texnfo-upd texinfo muse-latex muse-html
muse-xml-common muse-wiki cus-edit cus-start cus-load muse-publish
muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode
muse-autoloads org-config-thierry org-crypt cal-china lunar solar
cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg
org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo
org-infojs org-html org-exp ob-exp org-exp-blocks org-info org-gnus
org-docview org-bibtex bibtex org-bbdb org-agenda appt diary-lib
diary-loaddefs org-annotation-helper org-capture org-mks remember
org-remember org-datetree config-w3m mime-w3m w3m doc-view jka-compr
image-mode timezone w3m-hist w3m-fb w3m-ems w3m-ccl ccl w3m-favicon
w3m-image w3m-proc w3m-util mime eword-decode mel path-util mime-parse
std11 luna mime-def alist mcharset mcs-20 mcs-e20 pces pces-e20 pces-20
broken pcustom poe pym static apel-ver product w3m-load
addressbook-bookmark message sendmail rfc822 mml mml-sec mm-decode
mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums
mailabbrev mail-utils gmm-utils mailheader firefox-protocol
bookmark-uzbl-handler bookmark-firefox-handler url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-util url-parse
url-vars mailcap bookmark-extensions org ob-emacs-lisp ob-tangle ob-ref
ob-lob ob-table org-footnote org-src ob-comint ob-keys ob ob-eval
org-pcomplete org-list org-faces org-compat org-entities org-macs
noutline outline cal-menu calendar cal-loaddefs bookmark pp help-mode
view recentf tree-widget wid-edit savehist init-anything-thierry
descbinds-anything anything-ipython ipython python-mode info-look
ansi-color executable shell pcomplete shell-history anything-complete
anything-show-completion anything-obsolete anything-match-plugin
anything-delicious xml anything-mercurial anything-config browse-url rx
grep compile comint ring tramp tramp-compat format-spec tramp-loaddefs
dired-aux ffap thingatpt anything warnings epa-file epa derived epg
epg-config auth-source eieio byte-opt bytecomp byte-compile cconv
macroexp assoc gnus-util time-date mm-util mail-prsvr password-cache
dired regexp-opt gnus-load usage-memo punycode idna naquadah-theme
eev-thierry edmacro kmacro iterator eev-all eev-mini-steps
eev-browse-url eev-langs eev-compose eev-glyphs disp-table eev-insert
eev-steps eev-bounded eev easy-mmode advice help-fns advice-preload
w3m-wget preview-latex tex-site auto-loads info easymenu cl 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
dbusbind dynamic-setting font-render-setting move-toolbar gtk x-toolkit
x multi-tty emacs)

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Sat, 25 Jun 2011 16:44:02 GMT) Full text and rfc822 format available.

Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Sat, 25 Jun 2011 18:43:13 +0200
thierry <thierry.volpiatto <at> gmail.com> writes:

> Hi all,
> in emacs-24 i notice a regression with pcomplete:
>
> M-x eshell
>
> cd do
>
> M-: (pcomplete-completions)
> => doesn't return a list of directories starting with "do" but an elisp
> object unusable.
>
> In emacs-23 a list is returned as expected.
>
> However if i do:
>
> M-x eshell
>
> cd
>
> M-: (pcomplete-completions)
>
> I have a list of commands starting with "cd" as expected.

Note that loading the old file of emacs-23 here in emacs-24 make
pcomplete work as expected.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Sun, 26 Jun 2011 13:04:01 GMT) Full text and rfc822 format available.

Message #11 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: thierry <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Sun, 26 Jun 2011 09:03:23 -0400
tags 8926 +wontfix
thanks

> in emacs-24 i notice a regression with pcomplete:

> M-x eshell

> cd do

> M-: (pcomplete-completions)

> => doesn't return a list of directories starting with "do" but an elisp
> object unusable.

Since Emacs-23, pcomplete-completions is defined to return
a completion-table.  A completion-table can be a list, an alist, an
obarray, a hash-table, or a function.  It is meant to be passed to
`all-completions' or `try-completion'.

I.e. if you do (all-completions "" (pcomplete-completions)) you'll get
your list of directories again.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Sun, 26 Jun 2011 18:18:02 GMT) Full text and rfc822 format available.

Message #14 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Sun, 26 Jun 2011 20:17:06 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I.e. if you do (all-completions "" (pcomplete-completions)) you'll get
> your list of directories again.
Ok, i see, thanks Stefan.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Mon, 27 Jun 2011 01:19:01 GMT) Full text and rfc822 format available.

Message #17 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Sun, 26 Jun 2011 21:18:13 -0400
>> in emacs-24 i notice a regression with pcomplete:
>> 
>> M-x eshell
>> 
>> cd do
>> 
>> M-: (pcomplete-completions)
>> => doesn't return a list of directories starting with "do" but an elisp
>> object unusable.
>> 
>> In emacs-23 a list is returned as expected.
>> 
>> However if i do:
>> 
>> M-x eshell
>> 
>> cd
>> 
>> M-: (pcomplete-completions)
>> 
>> I have a list of commands starting with "cd" as expected.

> Note that loading the old file of emacs-23 here in emacs-24 make
> pcomplete work as expected.

Yup.  Because among the various completion cases, the case for "files"
used to return a list and now returns a function.  Both are valid
completion tables.  Any caller of pcomplete-completions should expect to
receive a completion table and not just a list of strings.  It may very
well receive a list of strings (which is one kind of completion table),
but it may just as well receive something else.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Mon, 27 Jun 2011 04:22:01 GMT) Full text and rfc822 format available.

Message #20 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Mon, 27 Jun 2011 06:21:29 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Yup.  Because among the various completion cases, the case for "files"
> used to return a list and now returns a function.  Both are valid
> completion tables.  Any caller of pcomplete-completions should expect to
> receive a completion table and not just a list of strings.  It may very
> well receive a list of strings (which is one kind of completion table),
> but it may just as well receive something else.
Yes i saw that, and it's what i didn't understand.
Would be cool to have the docstring or comment somewhere explaining
that.
Thanks.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Thu, 30 Jun 2011 16:52:01 GMT) Full text and rfc822 format available.

Message #23 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Thu, 30 Jun 2011 12:51:31 -0400
>> Yup.  Because among the various completion cases, the case for "files"
>> used to return a list and now returns a function.  Both are valid
>> completion tables.  Any caller of pcomplete-completions should expect to
>> receive a completion table and not just a list of strings.  It may very
>> well receive a list of strings (which is one kind of completion table),
>> but it may just as well receive something else.
> Yes i saw that, and it's what i didn't understand.
> Would be cool to have the docstring or comment somewhere explaining
> that.

Patches welcome ;-)


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Thu, 30 Jun 2011 16:54:01 GMT) Full text and rfc822 format available.

Message #26 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Thu, 30 Jun 2011 12:53:48 -0400
>> Yup.  Because among the various completion cases, the case for "files"
>> used to return a list and now returns a function.  Both are valid
>> completion tables.  Any caller of pcomplete-completions should expect to
>> receive a completion table and not just a list of strings.  It may very
>> well receive a list of strings (which is one kind of completion table),
>> but it may just as well receive something else.
> Yes i saw that, and it's what i didn't understand.

BTW, the reason for the above change was not just to fix a bug when
using pcomplete-completions-at-point but also so that partial-completion
now works with pcomplete-entries (so you can "cd ~/e/e TAB" to go to
~/etc/emacs).


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Thu, 30 Jun 2011 17:46:02 GMT) Full text and rfc822 format available.

Message #29 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Thu, 30 Jun 2011 19:45:34 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> Yup.  Because among the various completion cases, the case for "files"
>>> used to return a list and now returns a function.  Both are valid
>>> completion tables.  Any caller of pcomplete-completions should expect to
>>> receive a completion table and not just a list of strings.  It may very
>>> well receive a list of strings (which is one kind of completion table),
>>> but it may just as well receive something else.
>> Yes i saw that, and it's what i didn't understand.
>
> BTW, the reason for the above change was not just to fix a bug when
> using pcomplete-completions-at-point but also so that partial-completion
> now works with pcomplete-entries (so you can "cd ~/e/e TAB" to go to
> ~/etc/emacs).
Yes, but the downside is now that it is hard to use by external
libraries outside the context of emacs shell/eshell.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Thu, 30 Jun 2011 21:20:02 GMT) Full text and rfc822 format available.

Message #32 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Thu, 30 Jun 2011 17:19:46 -0400
>>>> Yup.  Because among the various completion cases, the case for "files"
>>>> used to return a list and now returns a function.  Both are valid
>>>> completion tables.  Any caller of pcomplete-completions should expect to
>>>> receive a completion table and not just a list of strings.  It may very
>>>> well receive a list of strings (which is one kind of completion table),
>>>> but it may just as well receive something else.
>>> Yes i saw that, and it's what i didn't understand.
>> 
>> BTW, the reason for the above change was not just to fix a bug when
>> using pcomplete-completions-at-point but also so that partial-completion
>> now works with pcomplete-entries (so you can "cd ~/e/e TAB" to go to
>> ~/etc/emacs).
> Yes, but the downside is now that it is hard to use by external
> libraries outside the context of emacs shell/eshell.

Presumably such code already handles completion tables, so having to
handle a completion table rather than a list of strings shouldn't be
that much of a problem.  Calling `all-completions' shouldn't scare
those authors.


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Fri, 01 Jul 2011 04:43:02 GMT) Full text and rfc822 format available.

Message #35 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Fri, 01 Jul 2011 06:41:50 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>>>> Yup.  Because among the various completion cases, the case for "files"
>>>>> used to return a list and now returns a function.  Both are valid
>>>>> completion tables.  Any caller of pcomplete-completions should expect to
>>>>> receive a completion table and not just a list of strings.  It may very
>>>>> well receive a list of strings (which is one kind of completion table),
>>>>> but it may just as well receive something else.
>>>> Yes i saw that, and it's what i didn't understand.
>>> 
>>> BTW, the reason for the above change was not just to fix a bug when
>>> using pcomplete-completions-at-point but also so that partial-completion
>>> now works with pcomplete-entries (so you can "cd ~/e/e TAB" to go to
>>> ~/etc/emacs).
>> Yes, but the downside is now that it is hard to use by external
>> libraries outside the context of emacs shell/eshell.
>
> Presumably such code already handles completion tables, so having to
> handle a completion table rather than a list of strings shouldn't be
> that much of a problem.  Calling `all-completions' shouldn't scare
> those authors.
The problem is not here, the problem is we have now to do extra
computing to extract the context (i.e command?, lisp-sym?, filename?...).
before, running `pcomplete-completions' was doing all the job, now we
have to use also (funcall (pcomplete-entries) string nil nil) to guess
filename, and then decide what to do.

e.g
(all-completions what (pcomplete-completions))
now we have to extract "what", before `pcomplete-completions' was guessing
that alone.

It would be better if it was returning always a table or always a list.
With a table we could use (funcall (pcomplete-completions)) whithout
worring about "what".

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Fri, 01 Jul 2011 14:34:01 GMT) Full text and rfc822 format available.

Message #38 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Fri, 01 Jul 2011 10:33:46 -0400
>> Presumably such code already handles completion tables, so having to
>> handle a completion table rather than a list of strings shouldn't be
>> that much of a problem.  Calling `all-completions' shouldn't scare
>> those authors.
> The problem is not here, the problem is we have now to do extra
> computing to extract the context (i.e command?, lisp-sym?, filename?...).
> before, running `pcomplete-completions' was doing all the job, now we
> have to use also (funcall (pcomplete-entries) string nil nil) to guess
> filename, and then decide what to do.

> e.g
> (all-completions what (pcomplete-completions))
> now we have to extract "what", before `pcomplete-completions' was guessing
> that alone.

Am I missing something?  pcomplete-completions can't be called just like
that, you have to let-bind a bunch of vars, among which pcomplete-stub
which will hold the `what':

(let* (pcomplete-stub
       ..various other pcomplete vars need to be let-bound here otherwise
       ..pcomplete-completions will modify the global vars instead.
       (table (pcomplete-completions))
       (old-style-completion-list (all-completions pcomplete-stub table)))
  ..use old-style-completion-list..)


        Stefan




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Fri, 01 Jul 2011 19:31:02 GMT) Full text and rfc822 format available.

Message #41 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Fri, 01 Jul 2011 21:30:28 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> Presumably such code already handles completion tables, so having to
>>> handle a completion table rather than a list of strings shouldn't be
>>> that much of a problem.  Calling `all-completions' shouldn't scare
>>> those authors.
>> The problem is not here, the problem is we have now to do extra
>> computing to extract the context (i.e command?, lisp-sym?, filename?...).
>> before, running `pcomplete-completions' was doing all the job, now we
>> have to use also (funcall (pcomplete-entries) string nil nil) to guess
>> filename, and then decide what to do.
>
>> e.g
>> (all-completions what (pcomplete-completions))
>> now we have to extract "what", before `pcomplete-completions' was guessing
>> that alone.
>
> Am I missing something?  pcomplete-completions can't be called just like
> that, you have to let-bind a bunch of vars, among which pcomplete-stub
> which will hold the `what':
>
> (let* (pcomplete-stub
>        ..various other pcomplete vars need to be let-bound here otherwise
>        ..pcomplete-completions will modify the global vars instead.
>        (table (pcomplete-completions))
>        (old-style-completion-list (all-completions pcomplete-stub table)))
>   ..use old-style-completion-list..)

Thanks that's working, i was let binding all these, but wasn't passing
pcomplete-stub to all-completions.

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Fri, 01 Jul 2011 22:00:03 GMT) Full text and rfc822 format available.

Message #44 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Fri, 01 Jul 2011 23:59:45 +0200
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

>>> Yup.  Because among the various completion cases, the case for "files"
>>> used to return a list and now returns a function.  Both are valid
>>> completion tables.  Any caller of pcomplete-completions should expect to
>>> receive a completion table and not just a list of strings.  It may very
>>> well receive a list of strings (which is one kind of completion table),
>>> but it may just as well receive something else.
>> Yes i saw that, and it's what i didn't understand.
>
> BTW, the reason for the above change was not just to fix a bug when
> using pcomplete-completions-at-point but also so that partial-completion
> now works with pcomplete-entries (so you can "cd ~/e/e TAB" to go to
> ~/etc/emacs).
About this:

If i want to do cd /tmp, i do:

cd /t TAB and it seem pcomplete start searching possibles completion and
start searching remote with tramp (and hang because connection is
closed).

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#8926; Package emacs. (Mon, 04 Jul 2011 16:01:02 GMT) Full text and rfc822 format available.

Message #47 received at 8926 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 8926 <at> debbugs.gnu.org
Subject: Re: bug#8926: 24.0.50; pcomplete regression
Date: Mon, 04 Jul 2011 12:00:35 -0400
> If i want to do cd /tmp, i do:

> cd /t TAB and it seem pcomplete start searching possibles completion and
> start searching remote with tramp

I don't know how my change might have triggered this.

> (and hang because connection is closed).

And I know even less why a closed connection would hang Tramp.
So I suggest you pen a new bug-report about this.


        Stefan




bug closed, send any further explanations to 8926 <at> debbugs.gnu.org and thierry <thierry.volpiatto <at> gmail.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 11 Sep 2011 04:46:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 09 Oct 2011 11:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 315 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.