From unknown Mon Aug 18 15:40:02 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#12321 <12321@debbugs.gnu.org> To: bug#12321 <12321@debbugs.gnu.org> Subject: Status: 24.2.50; `read-regexp' parameter DEFAULT-VALUE and the calculated defaults Reply-To: bug#12321 <12321@debbugs.gnu.org> Date: Mon, 18 Aug 2025 22:40:02 +0000 retitle 12321 24.2.50; `read-regexp' parameter DEFAULT-VALUE and the calcul= ated defaults reassign 12321 emacs submitter 12321 "Drew Adams" severity 12321 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 31 18:40:25 2012 Received: (at submit) by debbugs.gnu.org; 31 Aug 2012 22:40:25 +0000 Received: from localhost ([127.0.0.1]:60140 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T7Zt2-0008CK-2E for submit@debbugs.gnu.org; Fri, 31 Aug 2012 18:40:24 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36551) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T7Zsw-0008CA-RZ for submit@debbugs.gnu.org; Fri, 31 Aug 2012 18:40:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7Zrg-0000mY-0K for submit@debbugs.gnu.org; Fri, 31 Aug 2012 18:39:01 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:45956) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7Zrf-0000mT-T8 for submit@debbugs.gnu.org; Fri, 31 Aug 2012 18:38:59 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36580) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7Zre-0002TF-PS for bug-gnu-emacs@gnu.org; Fri, 31 Aug 2012 18:38:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T7Zrd-0000ld-9N for bug-gnu-emacs@gnu.org; Fri, 31 Aug 2012 18:38:58 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:23429) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T7Zrd-0000lD-2J for bug-gnu-emacs@gnu.org; Fri, 31 Aug 2012 18:38:57 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q7VMcrlu001758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 31 Aug 2012 22:38:54 GMT Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q7VMcqNR022374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 31 Aug 2012 22:38:53 GMT Received: from abhmt118.oracle.com (abhmt118.oracle.com [141.146.116.70]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q7VMcqPN008503 for ; Fri, 31 Aug 2012 17:38:52 -0500 Received: from dradamslap1 (/10.159.219.220) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 31 Aug 2012 15:38:52 -0700 From: "Drew Adams" To: Subject: 24.2.50; `read-regexp' parameter DEFAULT-VALUE and the calculated defaults Date: Fri, 31 Aug 2012 15:38:45 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 Thread-Index: Ac2HyWFPF22nAeFERWestqa+KAr6Kw== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.1 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.1 (------) A couple of things seem odd to me about `read-regexp' as currently defined. First, there is the business of automatically handling `: ' for the PROMPT. I thought we had finally gotten away from this kind of thing. It just gives callers less control. And it has sometimes resulted in confusion and extra work. I don't see this as a win. But whatever. More importantly - It seems odd that optional parameter DEFAULT-VALUE is not simply included among the `M-n' choices (hence the prompt fiddling and the after-read fiddling if empty input). And it seems odd that you cannot pass a list of defaults as the optional parameter. Why is the argument handled separately from the calculated list of "standard" defaults? The current version provides a list of defaults, but they are all hard-coded. A given calling context might well have its own set of defaults that it would like to provide. But it cannot do so (except for one). Here is a version I am using, which lets the arg be a list of defaults. That gives callers more control. Perhaps you might consider it. (I have not changed the prompt behavior here.) (defun read-regexp (prompt &optional defaults) "Read and return a regular expression as a string. Prompt with PROMPT, which should not include a final `: '. Non-nil optional arg DEFAULTS is a string or a list of strings that are prepended to a list of standard default values, which include the string at point, the last isearch regexp, the last isearch string, and the last replacement regexp." (when (and defaults (atom defaults)) (setq defaults (list defaults))) (let* ((deflts (append defaults (list (regexp-quote (or (funcall (or find-tag-default-function (get major-mode 'find-tag-default-function) 'find-tag-default)) "")) (car regexp-search-ring) (regexp-quote (or (car search-ring) "")) (car (symbol-value query-replace-from-history-variable))))) (deflts (delete-dups (delq nil (delete "" deflts)))) ;; Do not automatically add INPUT to the history, in case it is "". (history-add-new-input nil) (input (read-from-minibuffer (if defaults (format "%s (default `%s'): " prompt (mapconcat 'isearch-text-char-description (car deflts) "")) (format "%s: " prompt)) nil nil nil 'regexp-history deflts t))) (if (equal input "") (or (car defaults) input) (prog1 input (add-to-history 'regexp-history input))))) Finally, I wonder if it is really appropriate to be filtering out empty input ("") here. Perhaps we should let `read-regexp' return "" under some conditions? For example, if DEFAULTS contains "", indicating an explicit intention that the user be allowed to choose an empty regexp? Seems like something like whether to allow "" should be up to the caller, not to `read-regexp'. It used to be the case, for instance, that you could enter empty input for the `occur' regexp, and thus get all of the buffer lines in Occur mode. Whether or not that is something useful for `occur', you can imagine that some caller of `read-regexp' might well want to allow for reading an empty string as the user input. In GNU Emacs 24.2.50.1 (i386-mingw-nt5.1.2600) of 2012-08-26 on MARVIN Bzr revision: 109788 dmantipov@yandex.ru-20120827041533-3cy7pdjdqz14o90c Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --with-gcc (4.6) --no-opt --enable-checking --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 01 08:38:28 2012 Received: (at 12321) by debbugs.gnu.org; 1 Sep 2012 12:38:28 +0000 Received: from localhost ([127.0.0.1]:60802 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T7my3-0002Gz-I1 for submit@debbugs.gnu.org; Sat, 01 Sep 2012 08:38:27 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:58759 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T7my0-0002Fn-FF for 12321@debbugs.gnu.org; Sat, 01 Sep 2012 08:38:25 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id E7690451C9BA; Sat, 1 Sep 2012 05:37:01 -0700 (PDT) From: Juri Linkov To: "Drew Adams" Subject: Re: bug#12321: 24.2.50; `read-regexp' parameter DEFAULT-VALUE and the calculated defaults Organization: JURTA References: Date: Sat, 01 Sep 2012 15:04:49 +0300 In-Reply-To: (Drew Adams's message of "Fri, 31 Aug 2012 15:38:45 -0700") Message-ID: <878vcu0wjq.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12321 Cc: 12321@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) Do you think your new report could be merged with bug#7567? PS: See also http://thread.gmane.org/gmane.emacs.devel/134852 and http://thread.gmane.org/gmane.emacs.devel/104590 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 01 12:54:23 2012 Received: (at 12321) by debbugs.gnu.org; 1 Sep 2012 16:54:23 +0000 Received: from localhost ([127.0.0.1]:33099 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T7qxi-0001V5-OP for submit@debbugs.gnu.org; Sat, 01 Sep 2012 12:54:23 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:26361) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T7qxf-0001Ur-O4 for 12321@debbugs.gnu.org; Sat, 01 Sep 2012 12:54:20 -0400 Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q81GqrG7017275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sat, 1 Sep 2012 16:52:55 GMT Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by ucsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q81GqqcK013283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 1 Sep 2012 16:52:53 GMT Received: from abhmt119.oracle.com (abhmt119.oracle.com [141.146.116.71]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q81GqqFO010110; Sat, 1 Sep 2012 11:52:52 -0500 Received: from dradamslap1 (/71.202.147.44) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 01 Sep 2012 09:52:52 -0700 From: "Drew Adams" To: "'Juri Linkov'" References: <878vcu0wjq.fsf@mail.jurta.org> Subject: RE: bug#12321: 24.2.50; `read-regexp' parameter DEFAULT-VALUE and the calculated defaults Date: Sat, 1 Sep 2012 09:52:44 -0700 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <878vcu0wjq.fsf@mail.jurta.org> Thread-Index: Ac2IPn2WqzNR+vbfRWOTvkZGPPW4hAAIoUkw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet22.oracle.com [156.151.31.94] X-Spam-Score: -7.1 (-------) X-Debbugs-Envelope-To: 12321 Cc: 12321@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -7.1 (-------) > Do you think your new report could be merged with bug#7567? > > PS: See also http://thread.gmane.org/gmane.emacs.devel/134852 > and http://thread.gmane.org/gmane.emacs.devel/104590 Good question. Wrt bug #7567 and the first URL you mention: I think not. Bug #7567 has a long and winding road, that is not particularly coherent. I don't see that it touches on what I reported at all. But if it does then the touching is probably tangential. Please keep this bug separate. The only thing in common with the first URL you cite is the part about the prompt string. If you like, you can ignore that part of bug @12321, at least for now. The second URL you sent is germane, yes. Eli's point/question is the same one I raise in bug #12321. But he did not file a bug report. The detour in the second URL thread, which you introduced (changing the Subject line - thank you for that), is not germane, AFAICT. But the main thread, with the original subject line, is pertinent. AFAICT, the issue raised by Eli (and now by me) was never addressed. The URL thread ended with no real answer wrt this issue. In sum, bug #12321 stands on its own. It should not be merged with another bug. You can ignore the prompt thing for now, if you like. And we can deal later, if there is interest, with the possibility of adding completion (discussed in bug #7567). From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 20 04:43:20 2012 Received: (at 12321) by debbugs.gnu.org; 20 Sep 2012 08:43:20 +0000 Received: from localhost ([127.0.0.1]:44511 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEcLv-0002BA-Gr for submit@debbugs.gnu.org; Thu, 20 Sep 2012 04:43:20 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:45330 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEcLr-0002Aw-Sl for 12321@debbugs.gnu.org; Thu, 20 Sep 2012 04:43:17 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B31EF451CC5C; Thu, 20 Sep 2012 01:41:43 -0700 (PDT) From: Juri Linkov To: "Drew Adams" Subject: Re: bug#12321: 24.2.50; `read-regexp' parameter PROMPT Organization: JURTA References: Date: Thu, 20 Sep 2012 11:18:10 +0300 In-Reply-To: (Drew Adams's message of "Fri, 31 Aug 2012 15:38:45 -0700") Message-ID: <87a9wlbiwv.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12321 Cc: 12321@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > First, there is the business of automatically handling `: ' for the > PROMPT. I thought we had finally gotten away from this kind of thing. > It just gives callers less control. There are three contradicting requirements: 1. Maintain backward-compatibility for the PROMPT arg in all existing calls to `read-regexp'. 2. Do not append automatically ": " to the end of PROMPT. As bug#7567 demonstrates, more control for callers is necessary to be able to use `read-regexp' in such specific contexts as in `query-replace-read-from' that constructs prompt according to the special format "%s (default %s -> %s): ". 3. The code should not be so "clever" in supporting two these options above at the same time, as you said in http://thread.gmane.org/gmane.emacs.devel/134852/focus=134854 But from these three options I see no better thing to do than to allow `read-regexp' to be "clever" (like `read-buffer'): === modified file 'lisp/replace.el' --- lisp/replace.el 2012-09-09 22:15:24 +0000 +++ lisp/replace.el 2012-09-20 08:15:20 +0000 @@ -597,10 +597,12 @@ (defun read-regexp (prompt &optional def (history-add-new-input nil) (input (read-from-minibuffer - (if default-value - (format "%s (default %s): " prompt - (query-replace-descr default-value)) - (format "%s: " prompt)) + (if (string-match-p ":[ \t]*\\'" prompt) + prompt + (if default-value + (format "%s (default %s): " prompt + (query-replace-descr default-value)) + (format "%s: " prompt))) nil nil nil 'regexp-history defaults t))) (if (equal input "") (or default-value input) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 20 04:46:56 2012 Received: (at 12321) by debbugs.gnu.org; 20 Sep 2012 08:46:56 +0000 Received: from localhost ([127.0.0.1]:44518 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEcPQ-0002HS-6X for submit@debbugs.gnu.org; Thu, 20 Sep 2012 04:46:56 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:46533 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEcPO-0002HJ-2T for 12321@debbugs.gnu.org; Thu, 20 Sep 2012 04:46:54 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id B5FAE451CC5C; Thu, 20 Sep 2012 01:45:22 -0700 (PDT) From: Juri Linkov To: "Drew Adams" Subject: Re: bug#12321: 24.2.50; `read-regexp' parameter DEFAULT-VALUE and the calculated defaults Organization: JURTA References: Date: Thu, 20 Sep 2012 11:43:45 +0300 In-Reply-To: (Drew Adams's message of "Fri, 31 Aug 2012 15:38:45 -0700") Message-ID: <87k3vp2if2.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12321 Cc: 12321@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > It seems odd that optional parameter DEFAULT-VALUE is not simply > included among the `M-n' choices (hence the prompt fiddling and the > after-read fiddling if empty input). And it seems odd that you cannot > pass a list of defaults as the optional parameter. Why is the argument > handled separately from the calculated list of "standard" defaults? This can be fixed by the following patch. It is based on two previously sent patches (one that fixes the PROMPT arg, and another that adds the HISTORY arg to `read-regexp' in bug#7567), so `read-regexp' has the `history' arg in this third patch. These three patches could be committed separately. No doc fix yet, just confirmed that it works predictably in all my tests. === modified file 'lisp/replace.el' --- lisp/replace.el 2012-09-09 22:15:24 +0000 +++ lisp/replace.el 2012-09-20 08:42:58 +0000 @@ -575,7 +575,7 @@ (defvar regexp-history nil (defvar occur-collect-regexp-history '("\\1") "History of regexp for occur's collect operation") -(defun read-regexp (prompt &optional default-value history) +(defun read-regexp (prompt &optional defaults history) "Read regexp as a string using the regexp history and some useful defaults. Prompt for a regular expression with PROMPT (without a colon and space) in the minibuffer. The optional argument DEFAULT-VALUE @@ -585,7 +585,10 @@ (defun read-regexp (prompt &optional def If HISTORY is nil, `regexp-history' is used. Values available via M-n are the string at point, the last isearch regexp, the last isearch string, and the last replacement regexp." - (let* ((defaults + (let* ((default (if (consp defaults) (car defaults) defaults)) + (defaults + (append + (if (listp defaults) defaults (list defaults)) (list (regexp-quote (or (funcall (or find-tag-default-function (get major-mode 'find-tag-default-function) @@ -594,7 +597,7 @@ (defun read-regexp (prompt &optional def (car regexp-search-ring) (regexp-quote (or (car search-ring) "")) (car (symbol-value - query-replace-from-history-variable)))) + query-replace-from-history-variable))))) (defaults (delete-dups (delq nil (delete "" defaults)))) ;; Don't add automatically the car of defaults for empty input (history-add-new-input nil) @@ -602,13 +605,13 @@ (defun read-regexp (prompt &optional def (read-from-minibuffer (if (string-match-p ":[ \t]*\\'" prompt) prompt - (if default-value + (if default (format "%s (default %s): " prompt - (query-replace-descr default-value)) + (query-replace-descr default)) (format "%s: " prompt))) nil nil nil (or history 'regexp-history) defaults t))) (if (equal input "") - (or default-value input) + (or default input) (prog1 input (add-to-history (or history 'regexp-history) input))))) From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 20 08:47:45 2012 Received: (at 12321) by debbugs.gnu.org; 20 Sep 2012 12:47:46 +0000 Received: from localhost ([127.0.0.1]:44748 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEgAT-00008a-Cc for submit@debbugs.gnu.org; Thu, 20 Sep 2012 08:47:45 -0400 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:22353) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEgAR-00008S-Fp for 12321@debbugs.gnu.org; Thu, 20 Sep 2012 08:47:44 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ai0FAG6Zu09MCocG/2dsb2JhbABEsEiDSYEIghYBBVYjEAs0EhQYDSSIIboJkEQDozOBWIMF X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="199533129" Received: from 76-10-135-6.dsl.teksavvy.com (HELO pastel.home) ([76.10.135.6]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 20 Sep 2012 08:46:11 -0400 Received: by pastel.home (Postfix, from userid 20848) id 15BC8591B8; Thu, 20 Sep 2012 08:46:10 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#12321: 24.2.50; `read-regexp' parameter PROMPT Message-ID: References: <87a9wlbiwv.fsf@mail.jurta.org> Date: Thu, 20 Sep 2012 08:46:10 -0400 In-Reply-To: <87a9wlbiwv.fsf@mail.jurta.org> (Juri Linkov's message of "Thu, 20 Sep 2012 11:18:10 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12321 Cc: 12321@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > - (if default-value > - (format "%s (default %s): " prompt > - (query-replace-descr default-value)) > - (format "%s: " prompt)) > + (if (string-match-p ":[ \t]*\\'" prompt) > + prompt > + (if default-value > + (format "%s (default %s): " prompt > + (query-replace-descr default-value)) > + (format "%s: " prompt))) That looks OK, tho please use `cond' then. Stefan From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 20 18:02:27 2012 Received: (at 12321-done) by debbugs.gnu.org; 20 Sep 2012 22:02:27 +0000 Received: from localhost ([127.0.0.1]:45728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEopF-0005Ax-SV for submit@debbugs.gnu.org; Thu, 20 Sep 2012 18:02:27 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:36509 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TEopD-0005An-BW for 12321-done@debbugs.gnu.org; Thu, 20 Sep 2012 18:02:24 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id C87A1451CCE0; Thu, 20 Sep 2012 15:00:47 -0700 (PDT) From: Juri Linkov To: Stefan Monnier Subject: Re: bug#12321: 24.2.50; `read-regexp' parameter PROMPT Organization: JURTA References: <87a9wlbiwv.fsf@mail.jurta.org> Date: Fri, 21 Sep 2012 00:59:08 +0300 In-Reply-To: (Stefan Monnier's message of "Thu, 20 Sep 2012 08:46:10 -0400") Message-ID: <87obl0we37.fsf@mail.jurta.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 12321-done Cc: 12321-done@debbugs.gnu.org, Drew Adams X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) > That looks OK, tho please use `cond' then. Done. From unknown Mon Aug 18 15:40:02 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 19 Oct 2012 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator