From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Any objection to adding completing-read-function? Date: Tue, 28 Dec 2010 09:34:02 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1293546856 26423 80.91.229.12 (28 Dec 2010 14:34:16 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Dec 2010 14:34:16 +0000 (UTC) Cc: emacs-devel@gnu.org To: Leo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Dec 28 15:34:12 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PXacs-0006c2-RM for ged-emacs-devel@m.gmane.org; Tue, 28 Dec 2010 15:34:11 +0100 Original-Received: from localhost ([127.0.0.1]:43249 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXacs-0006Gf-5K for ged-emacs-devel@m.gmane.org; Tue, 28 Dec 2010 09:34:10 -0500 Original-Received: from [140.186.70.92] (port=41404 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PXacm-0006GW-Sh for emacs-devel@gnu.org; Tue, 28 Dec 2010 09:34:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PXacm-0006of-0F for emacs-devel@gnu.org; Tue, 28 Dec 2010 09:34:04 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:5640 helo=ironport2-out.pppoe.ca) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PXacl-0006oQ-TS for emacs-devel@gnu.org; Tue, 28 Dec 2010 09:34:03 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvsEACaEGU3O+LP+/2dsb2JhbACkL3S/KYVKBIRljhs X-IronPort-AV: E=Sophos;i="4.60,239,1291611600"; d="scan'208";a="86604939" Original-Received: from 206-248-179-254.dsl.teksavvy.com (HELO pastel.home) ([206.248.179.254]) by ironport2-out.pppoe.ca with ESMTP/TLS/ADH-AES256-SHA; 28 Dec 2010 09:34:02 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 8FF3A58AC9; Tue, 28 Dec 2010 09:34:02 -0500 (EST) In-Reply-To: (Leo's message of "Tue, 28 Dec 2010 08:03:48 +0000") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:134004 Archived-At: > So I wonder if there is any objection to adding a new variable > completing-read-function that when set replaces completing-read? Let me > know if I should submit it to the bug tracker. There's been such requests in the past, which I've usually resisted. But I guess it's OK to do such a thing. A few points to note, tho: > Here are some screenshots: > I switching to a bookmark: [...] > Switching to a branch in magit: [...] > Loading lisp systems in slime: [...] You can get similar results with M-x icomplete-mode, possibly combined with changing completion-styles (e.g. to add substring matching). Generally, I'd much rather see the default completion improved than side-stepped. One other thing: a variable completing-read-function should not allow a nil value, instead its default value should be `completing-read-default' which is the current completing-read, so you can always funcall completing-read-function without checking if it's nil. Stefan