From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#7567: Please add a history variable to read-regexp Date: Tue, 7 Dec 2010 19:10:07 -0800 Message-ID: <6D10D6F57E0A47DE84ACE050152CD553@us.oracle.com> References: <871v5tqb60.fsf@mail.jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291778144 4419 80.91.229.12 (8 Dec 2010 03:15:44 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 8 Dec 2010 03:15:44 +0000 (UTC) Cc: 7567@debbugs.gnu.org To: "'Juri Linkov'" , "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 08 04:15:38 2010 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1PQAVF-00018K-N6 for geb-bug-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 04:15:38 +0100 Original-Received: from localhost ([127.0.0.1]:53333 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQAVF-0003gX-16 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Dec 2010 22:15:37 -0500 Original-Received: from [140.186.70.92] (port=60041 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQAV8-0003fJ-VL for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2010 22:15:32 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PQAV7-0006YV-8F for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2010 22:15:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PQAV7-0006YR-4t for bug-gnu-emacs@gnu.org; Tue, 07 Dec 2010 22:15:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1PQALy-0002Vj-GH; Tue, 07 Dec 2010 22:06:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 08 Dec 2010 03:06:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 7567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 7567-submit@debbugs.gnu.org id=B7567.12917775449624 (code B ref 7567); Wed, 08 Dec 2010 03:06:02 +0000 Original-Received: (at 7567) by debbugs.gnu.org; 8 Dec 2010 03:05:44 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQALf-0002VB-8B for submit@debbugs.gnu.org; Tue, 07 Dec 2010 22:05:43 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1PQALe-0002Uz-1H for 7567@debbugs.gnu.org; Tue, 07 Dec 2010 22:05:42 -0500 Original-Received: from acsinet15.oracle.com (acsinet15.oracle.com [141.146.126.227]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oB83Badf027569 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Dec 2010 03:11:38 GMT Original-Received: from acsmt355.oracle.com (acsmt355.oracle.com [141.146.40.155]) by acsinet15.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oB833G6I017229; Wed, 8 Dec 2010 03:11:32 GMT Original-Received: from abhmt002.oracle.com by acsmt354.oracle.com with ESMTP id 834720421291777808; Tue, 07 Dec 2010 19:10:08 -0800 Original-Received: from dradamslap1 (/10.159.221.151) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 Dec 2010 19:10:08 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <871v5tqb60.fsf@mail.jurta.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 Thread-Index: AcuWfdugdBbMPdCgQRaMEQI80RZo+AABGLcg X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 07 Dec 2010 22:06:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:42281 Archived-At: > For consistency, `read-regexp' could have the same function signature > as other minibuffer reading functions, e.g. like `read-string': > > (read-string PROMPT &optional INITIAL-INPUT HISTORY > DEFAULT-VALUE INHERIT-INPUT-METHOD) > > (read-regexp PROMPT &optional INITIAL-INPUT HISTORY > DEFAULT-VALUE INHERIT-INPUT-METHOD) I agree with that. But I also think that it might be good to use `completing-read', to allow (lax) completion against the history. IOW, use the history for both completion and the usual history access. FWIW, I use completion for regexp reading, but more often against a different set of candidates from the history. E.g., for `icicle-customize-apropos', I use this to read a regexp that matches an option name: (completing-read "Customize (regexp): " obarray nil nil nil 'regexp-history) And for `icicle-find-tag' I use this to read a regexp that matches a tag: (completing-read "Find tag matching regexp: " ;;; $$$ Or should we just read a regexp against `regexp-history'? (if (fboundp 'tags-lazy-completion-table) (tags-lazy-completion-table) ; Emacs 23+ 'tags-complete-tag) ; Emacs < 23 nil nil nil 'find-tag-history (funcall (or find-tag-default-function (get major-mode 'find-tag-default-function) 'find-tag-default))) You can tell from the code comment here that I'm not sure the tag COLLECTION here is better than a regexp history as COLLECTION. (But in Icicles you can hit a key in the minibuffer to complete against the current history, so it's usually better to offer a different set for COLLECTION.) Anyway, I think that Juri's proposal (built on Lennart's) would be an improvement.