From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Order of eshell/pcomplete completions when cycling Date: Fri, 10 Apr 2015 13:34:03 -0400 Message-ID: References: <871tjt49bj.fsf@gnu.org> <83y4m1e0z8.fsf@gnu.org> <87k2xkmeb2.fsf@gnu.org> <83oamwtej9.fsf@gnu.org> <87bniwmb00.fsf@gnu.org> <873848m6nw.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428687306 14212 80.91.229.3 (10 Apr 2015 17:35:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Apr 2015 17:35:06 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 10 19:35:01 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YgcpY-0002J2-Pi for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 19:35:01 +0200 Original-Received: from localhost ([::1]:40578 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgcpX-0005iK-UY for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 13:34:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49174) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygcow-0004zY-NO for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 13:34:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ygcor-0007sG-Ja for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 13:34:22 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54794) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ygcor-0007rR-Dc for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 13:34:17 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ygcok-0001pm-43 for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 19:34:10 +0200 Original-Received: from 23-91-157-11.cpe.pppoe.ca ([23.91.157.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Apr 2015 19:34:10 +0200 Original-Received: from monnier by 23-91-157-11.cpe.pppoe.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 10 Apr 2015 19:34:10 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 76 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 23-91-157-11.cpe.pppoe.ca User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:yvGNVCsCQ4f3GHFGjd4/+XVKmh8= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:103638 Archived-At: > As far as I can tell, I don't see any difference to before, i.e., all > pcomplete/ functions are still considered, and also the order > when cycling completions is now test/, test1/, test11/, test2/ so my > value of `eshell-cmpl-compare-entry-function' seems to take effect. Yes, it still uses the pcomplete machinery, but the UI is implemented by the generic completion code. > It seems I can also remove the this-command workaround for bug#13293 > without any negative effect. (But I didn't test too hard.) Yes, there's some clean that could take place. But first we have to address things like the M-? and backtab bindings which currently are bound to pcomplete-list and pcomplete-reverse (or something like that) and would need to be changed to a corresponding command in minibuffer.el. If someone's interested, here's a kind of "todo" list in this regard, in the form of a patch with FIXMEs. Stefan diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 7bcf2c1..7ec73aa 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el @@ -477,6 +477,7 @@ Same as `pcomplete' but using the standard completion UI." "Support extensible programmable completion. To use this function, just bind the TAB key to it, or add it to your completion functions list (it should occur fairly early in the list)." + (declare (obsolete completion-at-point "25.1")) (interactive "p") (if (and interactively pcomplete-cycle-completions @@ -519,6 +520,7 @@ completion functions list (it should occur fairly early in the list)." ;;;###autoload (defun pcomplete-reverse () "If cycling completion is in use, cycle backwards." + (declare (obsolete ?? "25.1")) ;FIXME! (interactive) (call-interactively 'pcomplete)) @@ -527,12 +529,15 @@ completion functions list (it should occur fairly early in the list)." "Expand the textual value of the current argument. This will modify the current buffer." (interactive) + ;; FIXME: Either make obsolete or make it use completion-at-point. (let ((pcomplete-expand-before-complete t)) (pcomplete))) ;;;###autoload (defun pcomplete-continue () "Complete without reference to any cycling completions." + ;; It doesn't seem to be used, so it's OK if we don't have a substitute. + (declare (obsolete nil "25.1")) (interactive) (setq pcomplete-current-completions nil pcomplete-last-completion-raw nil) @@ -560,6 +565,7 @@ This will modify the current buffer." ;;;###autoload (defun pcomplete-help () "Display any help information relative to the current argument." + (declare (obsolete ?? "25.1")) ;FIXME! (interactive) (let ((pcomplete-show-help t)) (pcomplete))) @@ -567,6 +573,7 @@ This will modify the current buffer." ;;;###autoload (defun pcomplete-list () "Show the list of possible completions for the current argument." + (declare (obsolete completion-help-at-point "25.1")) (interactive) (when (and pcomplete-cycle-completions pcomplete-current-completions