From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.help Subject: Re: Order of eshell/pcomplete completions when cycling Date: Fri, 10 Apr 2015 15:53:07 +0200 Message-ID: <873848m6nw.fsf@gnu.org> References: <871tjt49bj.fsf@gnu.org> <83y4m1e0z8.fsf@gnu.org> <87k2xkmeb2.fsf@gnu.org> <83oamwtej9.fsf@gnu.org> <87bniwmb00.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428674054 12774 80.91.229.3 (10 Apr 2015 13:54:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Apr 2015 13:54:14 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Stefan Monnier Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Apr 10 15:54:04 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 1YgZNe-00062e-DC for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 15:53:58 +0200 Original-Received: from localhost ([::1]:39491 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgZNd-0005Al-Qa for geh-help-gnu-emacs@m.gmane.org; Fri, 10 Apr 2015 09:53:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43355) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgZMz-0004ck-Om for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 09:53:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YgZMt-0004OP-PE for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 09:53:17 -0400 Original-Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52666) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YgZMt-0004OJ-FC for help-gnu-emacs@gnu.org; Fri, 10 Apr 2015 09:53:11 -0400 Original-Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 53BC820B33 for ; Fri, 10 Apr 2015 09:53:06 -0400 (EDT) Original-Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 10 Apr 2015 09:53:10 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=lZTPJTj9DFwCaeQQdD0XSmCpAB0=; b=dkuaS 71SjiDhYryIXFG5+e+RgaxWgY6OZ+UemIE6LBp0ZHCMfr9ZQEtswLkAdi5emB2k4 nvmPK1FfRQoV1HajVtmSKZxRCpeKhWnJl9eZWezsuTjOyObMD+UJYRwRaYydLeY8 Q8OdO68qvezVc2uAP1BInJsPvtyP/811jJSP1M= X-Sasl-enc: +qfk1UNdXUwLX6WxNFW3SYs4T94aLLbMA8Yy9GyRoq20 1428673989 Original-Received: from thinkpad-t440p (unknown [2.163.240.161]) by mail.messagingengine.com (Postfix) with ESMTPA id 8BCFEC0001C; Fri, 10 Apr 2015 09:53:09 -0400 (EDT) Mail-Followup-To: Stefan Monnier , help-gnu-emacs@gnu.org In-Reply-To: (Stefan Monnier's message of "Fri, 10 Apr 2015 08:36:39 -0400") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.111.4.28 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:103633 Archived-At: Stefan Monnier writes: >> I suspect that there has been a time where that used to work, and in >> the meantime the completion stuff has changed and forgotten that some >> completion users want sorted completions also without calling >> `completion-all-sorted-completions'. > > Indeed, it seems that the pcomplete completion UI code was somehow > broken when its innards were separated to provide > pcomplete-completion-at-point. > > The right fix moving forward (which I've been meaning to do but > haven't found time for yet) is to change Eshell to not use the > `pcomplete' command any more, but to use `completion-at-point' instead > and to finally obsolete the `pcomplete' command. I've just tried that: --8<---------------cut here---------------start------------->8--- diff -u --label /home/horn/Repos/el/emacs/lisp/eshell/em-cmpl.el --label \#\ /home/horn/Repos/el/emacs/lisp/eshell/em-cmpl.el /tmp/buffer-content-2696WcN --- /home/horn/Repos/el/emacs/lisp/eshell/em-cmpl.el +++ # @@ -463,11 +463,7 @@ (interactive "p") ;; Pretend to be pcomplete so that cycling works (bug#13293). (setq this-command 'pcomplete) - (condition-case nil - (if interactively - (call-interactively 'pcomplete) - (pcomplete)) - (text-read-only (completion-at-point)))) ; Workaround for bug#12838. + (completion-at-point)) (provide 'em-cmpl) --8<---------------cut here---------------end--------------->8--- 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. It seems I can also remove the this-command workaround for bug#13293 without any negative effect. (But I didn't test too hard.) Bye, Tassilo