From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 10:07:15 2012 Received: (at submit) by debbugs.gnu.org; 14 Sep 2012 14:07:15 +0000 Received: from localhost ([127.0.0.1]:33862 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCWY6-0001mG-DR for submit@debbugs.gnu.org; Fri, 14 Sep 2012 10:07:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57511) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCWY3-0001m2-Dw for submit@debbugs.gnu.org; Fri, 14 Sep 2012 10:07:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCWWw-0003tr-Pv for submit@debbugs.gnu.org; Fri, 14 Sep 2012 10:06:13 -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,FREEMAIL_FROM, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:50407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWWw-0003rI-NQ for submit@debbugs.gnu.org; Fri, 14 Sep 2012 10:06:02 -0400 Received: from eggs.gnu.org ([208.118.235.92]:41432) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWLB-0005LL-Lr for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 09:53:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TCWLA-0007bR-O1 for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 09:53:53 -0400 Received: from mail-oa0-f41.google.com ([209.85.219.41]:34338) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TCWLA-0007bK-JO for bug-gnu-emacs@gnu.org; Fri, 14 Sep 2012 09:53:52 -0400 Received: by oagj6 with SMTP id j6so3131483oag.0 for ; Fri, 14 Sep 2012 06:53:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=RwZcL565S4ASfwlEhBlJ1nNRdZbnGm6y9tbFdOPnGXY=; b=nlo6pFq6kcJ1eiZ++wGjbvfqF6yaX3jlKddUn5qfkZBrR44B/ZLw627IcJIOSgBE8X WSbwHYamRtXf417ugTyl/EIrzvhfW8ZXyKs3u1Nx4XGaL16jf3dA9ZqSeAwazBVRYMrM aBIqSG6gyKLnVt+raJgGqpg3phZsd8KXAdLPeegl7Vq9kKchBcupFdeaiFBwv+Wjjt6u b/eOZ/QV45zxgCQi2UoNLKZZwUh8kIx6Ir6u7Ltc6CfDUjozhz1PwVDa3oGPRDI530Jk 61zkmRmr8PVSMewn71Aa8I1FU6hxOIKC6IrcUBsVzAn9RAQMi8+B4InjmcBxxYut8JwU fHZg== MIME-Version: 1.0 Received: by 10.60.3.194 with SMTP id e2mr3323074oee.1.1347630831517; Fri, 14 Sep 2012 06:53:51 -0700 (PDT) Received: by 10.60.50.130 with HTTP; Fri, 14 Sep 2012 06:53:51 -0700 (PDT) Date: Fri, 14 Sep 2012 15:53:51 +0200 Message-ID: Subject: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) From: Dani Moncayo To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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 (------) Severity: minor Hello, I see that some commands that use the minibuffer such as "C-x b" (switch-to-buffer) present the default value in the minibuffer prompt, as "(default )", while other commands such as "C-x r m" (bookmark-set) omit the "default " part, i.e, they show the default value just as "(value)". I see no reason for this inconsistency, neither I see the need for the "default " part. So, hereby I propose to fix this, i.e., to omit the "default " in those commands where this is currently shown. TIA. In GNU Emacs 24.2.50.1 (i386-mingw-nt6.1.7601) of 2012-09-13 on DANI-PC Bzr revision: 110018 eggert@cs.ucla.edu-20120913162306-gi60swatqiu16m6e Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.7) --no-opt --enable-checking --cflags -I../../libs/libxpm-3.5.8/include -I../../libs/libxpm-3.5.8/src -I../../libs/libpng-1.4.10 -I../../libs/zlib-1.2.6 -I../../libs/giflib-4.1.4-1/include -I../../libs/jpeg-6b-4/include -I../../libs/tiff-3.8.2-1/include -I../../libs/libxml2-2.7.8-w32-bin/include/libxml2 -I../../libs/gnutls-3.0.16/include -I../../libs/libiconv-1.14-2-mingw32-dev/include' Important settings: value of $LANG: ESN locale-coding-system: cp1252 default enable-multibyte-characters: t -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 11:57:52 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 15:57:52 +0000 Received: from localhost ([127.0.0.1]:34002 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCYH9-0004Jf-S7 for submit@debbugs.gnu.org; Fri, 14 Sep 2012 11:57:52 -0400 Received: from chene.dit.umontreal.ca ([132.204.246.20]:36701) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCYH7-0004JW-Ei for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 11:57:50 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q8EFuptJ013164; Fri, 14 Sep 2012 11:56:51 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id EFD40B4071; Fri, 14 Sep 2012 11:56:50 -0400 (EDT) From: Stefan Monnier To: Dani Moncayo Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Message-ID: References: Date: Fri, 14 Sep 2012 11:56:50 -0400 In-Reply-To: (Dani Moncayo's message of "Fri, 14 Sep 2012 15:53:51 +0200") 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: -4.1 (----) X-Debbugs-Envelope-To: 12443 Cc: 12443@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: -4.1 (----) > I see no reason for this inconsistency, Agreed. The officially sanctioned behavior is to use "(default ...)". > neither I see the need for the "default " part. That would make the job of minibuffer-electric-default-mode harder (more false positives). > So, hereby I propose to fix this, i.e., to omit the "default " in > those commands where this is currently shown. I find the "(default ...)" text to use up too much space for my own taste, so I use the patch below to rewrite it on-the-fly to "[...]". Stefan Using submit branch file:///home/monnier/src/emacs/bzr/trunk/ === modified file 'lisp/minibuf-eldef.el' --- lisp/minibuf-eldef.el 2012-04-09 13:05:48 +0000 +++ lisp/minibuf-eldef.el 2012-09-14 15:54:47 +0000 @@ -34,15 +34,17 @@ ;;; Code: (defvar minibuffer-default-in-prompt-regexps - '(("\\( (default\\>.*)\\):? \\'" . 1) ("\\( \\[.*\\]\\):? *\\'" . 1)) + '(("\\( (default\\(?: is\\)? \\(.*\\))\\):? \\'" 1 " [\\2]") + ("\\( \\[.*\\]\\):? *\\'" 1)) "A list of regexps matching the parts of minibuffer prompts showing defaults. When `minibuffer-electric-default-mode' is active, these regexps are used to identify the portions of prompts to elide. -Each entry is either a string, which should be a regexp matching the -default portion of the prompt, or a cons cell, who's car is a regexp -matching the default part of the prompt, and who's cdr indicates the -regexp subexpression that matched.") +Each entry is of the form (REGEXP MATCH-NUM &optional REWRITE), +where REGEXP should match the default part of the prompt, +MATCH-NUM is the subgroup that matched the actual default indicator, +and REWRITE, if present, is a string to pass to `replace-match' that +should be displayed in its place.") ;;; Internal variables @@ -85,15 +87,25 @@ ;; See the prompt contains a default input indicator (while regexps (setq match (pop regexps)) - (if (re-search-forward (if (stringp match) match (car match)) nil t) - (setq regexps nil) + (if (re-search-forward (car match) nil t) + (if (consp (cddr match)) + (let ((inhibit-read-only t) + (buffer-undo-list t) + (props (text-properties-at (match-beginning (cadr match))))) + (replace-match (caddr match) nil nil nil (cadr match)) + (set-text-properties (match-beginning (cadr match)) + (match-end (cadr match)) + props) + (setq match nil) + (goto-char (point-min))) + (setq regexps nil)) (setq match nil))))) (if (not match) ;; Nope, so just make sure our post-command-hook isn't left around. (remove-hook 'post-command-hook #'minibuf-eldef-update-minibuffer t) ;; Yup; set things up so we can frob the prompt as the state of ;; the input string changes. - (setq match (if (consp match) (cdr match) 0)) + (setq match (cadr match)) (setq minibuf-eldef-overlay (make-overlay (match-beginning match) (match-end match))) (setq minibuf-eldef-showing-default-in-prompt t) @@ -124,10 +136,6 @@ (overlay-put minibuf-eldef-overlay 'intangible t))))) -;;; Note this definition must be at the end of the file, because -;;; `define-minor-mode' actually calls the mode-function if the -;;; associated variable is non-nil, which requires that all needed -;;; functions be already defined. [This is arguably a bug in d-m-m] ;;;###autoload (define-minor-mode minibuffer-electric-default-mode "Toggle Minibuffer Electric Default mode. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 12:40:24 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 16:40:24 +0000 Received: from localhost ([127.0.0.1]:34048 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCYwI-0006CX-MB for submit@debbugs.gnu.org; Fri, 14 Sep 2012 12:40:23 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:24344) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCYwE-0006CM-1K for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 12:40:21 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8EGdGco004551 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Sep 2012 16:39:19 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8EGdF0D005605 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Sep 2012 16:39:16 GMT Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8EGdFBW023371; Fri, 14 Sep 2012 11:39:15 -0500 Received: from dradamslap1 (/10.159.182.71) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 14 Sep 2012 09:39:14 -0700 From: "Drew Adams" To: "'Stefan Monnier'" , "'Dani Moncayo'" References: Subject: RE: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Date: Fri, 14 Sep 2012 09:39:10 -0700 Message-ID: <6DE0F5273298453C9EF24A012F8DBC17@us.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac2SkZ51kA5WNnFWSACSL19Ze5aqZQAA4Y/Q X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-Spam-Score: -7.4 (-------) X-Debbugs-Envelope-To: 12443 Cc: 12443@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.4 (-------) > > I see no reason for this inconsistency, > > Agreed. The officially sanctioned behavior is to use "(default ...)". > > neither I see the need for the "default " part. > > That would make the job of minibuffer-electric-default-mode harder > (more false positives). No offense to Miles or anyone else, but that mode is just a workaround for the bother introduced by Emacs adding `(default ...)' here and there (but not yet everywhere). Just get rid of the cause, instead of sticking a band-aid on the wound. > > So, hereby I propose to fix this, i.e., to omit the "default " in > > those commands where this is currently shown. > > I find the "(default ...)" text to use up too much space for > my own taste, so I use the patch below to rewrite it on-the-fly > to "[...]". Just get rid of "(default ...)" altogether. A user can use `M-n' to see the default value, and `M-n RET' instead of `RET' to choose it. No big deal, and a lot less noise. --- Or do as I do in Icicles: give users the choice, across all minibuffer prompts. They have an option, with these possible values: nil - Do not insert default value or add it to prompt. t - Add default value to prompt (except for `read-file-name' and `read-from-minibuffer'). Do not insert it. `insert-start' - Insert default value and leave cursor at start. `insert-end' - Insert default value and leave cursor at end. `preselect-start' - Insert and preselect default value; leave cursor at beginning. `preselect-end' - Insert and preselect default value; leave cursor at end. The default value of the option is `t' (mainly to be closer to what people are used to in vanilla Emacs). But what I am suggesting for Emacs is the `nil' behavior as default: do nothing with the default value. (Personally, I use `insert-end'.) From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 15:11:13 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 19:11:14 +0000 Received: from localhost ([127.0.0.1]:34164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCbIH-0001KO-6P for submit@debbugs.gnu.org; Fri, 14 Sep 2012 15:11:13 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:46492) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCbIF-0001KH-Np for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 15:11:12 -0400 Received: by oagk14 with SMTP id k14so3065662oag.3 for <12443@debbugs.gnu.org>; Fri, 14 Sep 2012 12:10:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3ALkoSwSP8SyM0JR0q/7mencg5LaN/+KuBcau5n+nPY=; b=ioPhQfrIcNJIuZYKxC75wCQOQp3K95GUu5rjur7i4fa/kNGwvn6EhxsjV0eqTyCnxy byagoYf8Cxd2T1whXzQJKiIe+vcmX4HY8Oo3p1jS5VeR/peQYPm9ZQBRkp1QLIw5udkx Rx+SlHPuMJBy5YOctANkoyt8XdvU0hDHy+pjT9h0FHnOYOrgc7Bx4+35x3vf26my9Xpt S9/qTYlb2GWzwuY8h6XAaNU5dLEcfgJC0uJjdhTcj3lNGjI5E+eFj9DUJz3TkI+ks5Lt cnVk3Ff8y0WES0IvyKjUhEH4MBfmGw3dSUEq/d9tGWysDOYuL6y0KCJ4NM97j6etj3Ah jiKQ== MIME-Version: 1.0 Received: by 10.182.207.6 with SMTP id ls6mr5049603obc.36.1347649812491; Fri, 14 Sep 2012 12:10:12 -0700 (PDT) Received: by 10.60.50.130 with HTTP; Fri, 14 Sep 2012 12:10:12 -0700 (PDT) In-Reply-To: References: Date: Fri, 14 Sep 2012 21:10:12 +0200 Message-ID: Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) From: Dani Moncayo To: Stefan Monnier Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12443 Cc: 12443@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: -2.6 (--) On Fri, Sep 14, 2012 at 5:56 PM, Stefan Monnier wrote: >> I see no reason for this inconsistency, > > Agreed. The officially sanctioned behavior is to use "(default ...)". Then all commands should be consistent on that. >> neither I see the need for the "default " part. > > That would make the job of minibuffer-electric-default-mode harder > (more false positives). I didn't know about that minor mode. I've just read its docstring and I think it isn't worth it, because: * It makes the input string jump right and left, making harder to concentrate on it. * Users obviously know that the default value is used only when no value is provided, so there is no need to be inserting/removing the default value from the prompt. * The only advantage I can see is to save space in the minibuffer when you are entering some text, but usually the frame is wide enough not to care about this. (Anyway, I don't understand why the way of formatting the default value in the prompt string should make the job of this mode harder, because if we know what the default value is and how is formatted in the prompt string, it should be trivial to identify that part at the right side of the prompt string. Maybe I'm missing something...) >> So, hereby I propose to fix this, i.e., to omit the "default " in >> those commands where this is currently shown. > > I find the "(default ...)" text to use up too much space for my own taste, so > I use the patch below to rewrite it on-the-fly to "[...]". Thanks, but if we agree that there is a problem here (or there is room for improvement), it would be better to fix this in the vanilla Emacs. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 15:18:59 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 19:18:59 +0000 Received: from localhost ([127.0.0.1]:34184 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCbPn-0001We-3Q for submit@debbugs.gnu.org; Fri, 14 Sep 2012 15:18:59 -0400 Received: from mail-ob0-f172.google.com ([209.85.214.172]:41665) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCbPk-0001WV-Hd for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 15:18:57 -0400 Received: by obbwc20 with SMTP id wc20so6534340obb.3 for <12443@debbugs.gnu.org>; Fri, 14 Sep 2012 12:17:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pxpTOHXWYDDKxffmRMIp2DBXhSsh6nWDI1JXLA5G25s=; b=xaXKVxFfdnIm37oqbNmdv3lPHw20DDxGQubov7H8LubzB8RmlIJZx/f4YI8TPCnJ1X sI9trwa3Ht4cru/VeK+6doD9A+L1onvzEfAaMpSPE9Zq2WPUOjbZKdujW5XbKsfJHIja IVaUaW8+Do5MBtoVsut4Woxbb8X7px7XA3/oPG04Nl+fC+Yl9FwpbiarLRYKCqcryUVj ooP+UEh2HTfFBX94HbkWvcn5/Ph+6Ji3VUO++iXYMVPR7AozEHl7VSszEYddiOLFvcjc mXB4cetnZumpgsrjXFl5p66txGswEpZK5ZOUm3GIXkFyHLQ61J+xYT2Se8797ydZtS7g lIxQ== MIME-Version: 1.0 Received: by 10.60.30.168 with SMTP id t8mr2322179oeh.89.1347650277047; Fri, 14 Sep 2012 12:17:57 -0700 (PDT) Received: by 10.60.50.130 with HTTP; Fri, 14 Sep 2012 12:17:56 -0700 (PDT) In-Reply-To: <6DE0F5273298453C9EF24A012F8DBC17@us.oracle.com> References: <6DE0F5273298453C9EF24A012F8DBC17@us.oracle.com> Date: Fri, 14 Sep 2012 21:17:56 +0200 Message-ID: Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) From: Dani Moncayo To: Drew Adams Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12443 Cc: Stefan Monnier , 12443@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: -2.6 (--) >> > So, hereby I propose to fix this, i.e., to omit the "default " in >> > those commands where this is currently shown. >> >> I find the "(default ...)" text to use up too much space for >> my own taste, so I use the patch below to rewrite it on-the-fly >> to "[...]". > > Just get rid of "(default ...)" altogether. A user can use `M-n' to see the > default value, and `M-n RET' instead of `RET' to choose it. No big deal, and a > lot less noise. But some users may prefer to see the default value in the prompt. > --- > > Or do as I do in Icicles: give users the choice, across all minibuffer prompts. > They have an option, with these possible values: > > nil - Do not insert default value > or add it to prompt. > t - Add default value to prompt > (except for `read-file-name' and > `read-from-minibuffer'). > Do not insert it. > `insert-start' - Insert default value > and leave cursor at start. > `insert-end' - Insert default value > and leave cursor at end. > `preselect-start' - Insert and preselect default value; > leave cursor at beginning. > `preselect-end' - Insert and preselect default value; > leave cursor at end. > That looks like a good improvement, indeed. > The default value of the option is `t' (mainly to be closer to what people are > used to in vanilla Emacs). But what I am suggesting for Emacs is the `nil' > behavior as default: do nothing with the default value. (Personally, I use > `insert-end'.) I'm not sure what would be the more suitable default value (whether nil ot t), in any case, this is secondary, as anyone could customize it. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 15:42:51 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 19:42:51 +0000 Received: from localhost ([127.0.0.1]:34200 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCbmt-00024r-1N for submit@debbugs.gnu.org; Fri, 14 Sep 2012 15:42:51 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:59359) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCbmq-00024k-TM for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 15:42:49 -0400 Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q8EJfnqr022230; Fri, 14 Sep 2012 15:41:49 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 9324CB4071; Fri, 14 Sep 2012 15:41:49 -0400 (EDT) From: Stefan Monnier To: Dani Moncayo Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Message-ID: References: Date: Fri, 14 Sep 2012 15:41:49 -0400 In-Reply-To: (Dani Moncayo's message of "Fri, 14 Sep 2012 21:10:12 +0200") 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: -4.1 (----) X-Debbugs-Envelope-To: 12443 Cc: 12443@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: -4.1 (----) >>> I see no reason for this inconsistency, >> Agreed. The officially sanctioned behavior is to use "(default ...)". > Then all commands should be consistent on that. Agreed. > (Anyway, I don't understand why the way of formatting the default > value in the prompt string should make the job of this mode harder, > because if we know what the default value is and how is formatted in > the prompt string, it should be trivial to identify that part at the > right side of the prompt string. Maybe I'm missing something...) The problem is that we don't always know how it is formatted in the prompt (it might be a shortened version, for example). > Thanks, but if we agree that there is a problem here (or there is room > for improvement), it would be better to fix this in the vanilla Emacs. It's a matter of taste (some people prefer the "(default ...)"). Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 16:43:50 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 20:43:50 +0000 Received: from localhost ([127.0.0.1]:34304 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcjt-0003aS-PG for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:43:50 -0400 Received: from mail-oa0-f44.google.com ([209.85.219.44]:39584) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcjr-0003aL-Df for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 16:43:48 -0400 Received: by oagk14 with SMTP id k14so3138409oag.3 for <12443@debbugs.gnu.org>; Fri, 14 Sep 2012 13:42:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=gip9JWLpPO+ZZeimxokBpWTMGKDi1PFk9mYYQdY6AaM=; b=Au8E9dPO7oBi2zBCRzTOgv2IpLXfKPym3LcU+uAuXmIItjnoz1DzADEiuGZsPiJ5HU fqYup5EiAQA1P7KS5hLdhsXCuGCRVDcamdzVlR2qV3VucYhDFzDiz+6j6wgDTSt5N0KY GKuu0wygFmwCuosQL9AzDr4QtrFwZVuNhghLoPjT753BtifdW1Zv1YEwqkAo61oDxN3A gJQiw91B7nfwvsew3O9VLcNZ0QwMf2sdB/bLzdiBcFxJxih/nsvBNzA86XsXY9pn/9GU +rTUw5bvttSOfsRkgOST3rwq1NUIVUiVhL+k3sGv6EAKkLaXF0YR9/Gx0eJ17XECDCjq yqdw== MIME-Version: 1.0 Received: by 10.182.109.74 with SMTP id hq10mr5288059obb.56.1347655367293; Fri, 14 Sep 2012 13:42:47 -0700 (PDT) Received: by 10.60.50.130 with HTTP; Fri, 14 Sep 2012 13:42:47 -0700 (PDT) In-Reply-To: References: Date: Fri, 14 Sep 2012 22:42:47 +0200 Message-ID: Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) From: Dani Moncayo To: Stefan Monnier Content-Type: text/plain; charset=ISO-8859-1 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 12443 Cc: 12443@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: -2.6 (--) >> Thanks, but if we agree that there is a problem here (or there is room >> for improvement), it would be better to fix this in the vanilla Emacs. > > It's a matter of taste (some people prefer the "(default ...)"). maybe, but other people (Drew, you, me and I guess many others) prefer other behavior. Therefore, it seems that this should be user-configurable. -- Dani Moncayo From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 16:50:37 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 20:50:37 +0000 Received: from localhost ([127.0.0.1]:34311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcqS-0003kt-Oc for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:50:37 -0400 Received: from mail-pb0-f44.google.com ([209.85.160.44]:49641) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcqQ-0003kl-1H for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 16:50:35 -0400 Received: by pbbrr4 with SMTP id rr4so6300073pbb.3 for <12443@debbugs.gnu.org>; Fri, 14 Sep 2012 13:49:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=gk/EdvT3lErLLEKubE2C6YQzlvJjZ7gCdOmqhsABa+o=; b=hoYwCYkCWdq4ifiw3GGRi9blIa3aDObd1jZ+SbXwGUN6NHmrplAcTW+fmw2JKhNqfl SaLCxl3+Q9qBw8dpFes0bWkRQlW43VbUaHSfyh1oU/QflBG7jnqQGZAvPUYJmH40/Ny2 iYuPPf2gdKMOY9g2h214YOWN7DbpJSP8+vVlfFaT4eLWUep7mob0hRm12tdck9ba8tPt Zch/2ZULoGJtICd1JpiuNYeRMyOJNBNz9Z4eMXdB+ZBiwqGsObWHcwLvDPiVwyyM+53J Rf/WfnTRqpN9ZKI2Zyr2iuI1fBy+gBP6hqop69XVP60h/zrHrt4IqKOtV92eKAAe2M7P taow== Received: by 10.68.138.133 with SMTP id qq5mr6500217pbb.86.1347655773758; Fri, 14 Sep 2012 13:49:33 -0700 (PDT) Received: from debian-6.05 ([115.242.167.135]) by mx.google.com with ESMTPS id uh7sm1555879pbc.35.2012.09.14.13.49.30 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Sep 2012 13:49:32 -0700 (PDT) From: Jambunathan K To: Dani Moncayo Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: Date: Sat, 15 Sep 2012 02:20:31 +0530 In-Reply-To: (Dani Moncayo's message of "Fri, 14 Sep 2012 22:42:47 +0200") Message-ID: <87a9wsmiqw.fsf@gmail.com> 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.8 (-) X-Debbugs-Envelope-To: 12443 Cc: Stefan Monnier , 12443@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.8 (-) Dani Moncayo writes: >>> Thanks, but if we agree that there is a problem here (or there is room >>> for improvement), it would be better to fix this in the vanilla Emacs. >> >> It's a matter of taste (some people prefer the "(default ...)"). > > maybe, but other people (Drew, you, me and I guess many others) prefer > other behavior. > > Therefore, it seems that this should be user-configurable. A new/first-time user will need a hint. An experienced user or a user with some experience - one who knows what to expect, where and when - will find it a clutter. I believe I belong to the third camp. -- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 16:56:17 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 20:56:17 +0000 Received: from localhost ([127.0.0.1]:34315 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcvw-0003sx-PH for submit@debbugs.gnu.org; Fri, 14 Sep 2012 16:56:16 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:38933) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCcvu-0003sp-77 for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 16:56:15 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q8EKtCMf015328 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 14 Sep 2012 20:55:13 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q8EKtCHV008396 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Sep 2012 20:55:12 GMT Received: from abhmt102.oracle.com (abhmt102.oracle.com [141.146.116.54]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q8EKtBg0032052; Fri, 14 Sep 2012 15:55:11 -0500 Received: from dradamslap1 (/10.159.182.71) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 14 Sep 2012 13:55:11 -0700 From: "Drew Adams" To: "'Jambunathan K'" , "'Dani Moncayo'" References: <87a9wsmiqw.fsf@gmail.com> Subject: RE: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Date: Fri, 14 Sep 2012 13:55:07 -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: <87a9wsmiqw.fsf@gmail.com> Thread-Index: Ac2Suolgd9wnqGPGRbazdu1g9fpqrQAAEEGw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-Spam-Score: -7.4 (-------) X-Debbugs-Envelope-To: 12443 Cc: 12443@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.4 (-------) > >> It's a matter of taste (some people prefer the "(default ...)"). > > > > maybe, but other people (Drew, you, me and I guess many > > others) prefer other behavior. > > > > Therefore, it seems that this should be user-configurable. > > A new/first-time user will need a hint. > > An experienced user or a user with some experience - one who > knows what to expect, where and when - will find it a clutter. So make the default value do what we do now, if you really think such a hint is important for newbies. But give users the choice. FWIW, I do not think that newbies need such a hint, anymore than they might need hints about hitting TAB for completion or a host of other things one could imagine are as new to them as `M-n'. But I am not adamantly against providing such hints by default. From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 14 19:01:28 2012 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2012 23:01:28 +0000 Received: from localhost ([127.0.0.1]:34431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCet5-0006qE-9e for submit@debbugs.gnu.org; Fri, 14 Sep 2012 19:01:28 -0400 Received: from ps18281.dreamhost.com ([69.163.218.105]:55077 helo=ps18281.dreamhostps.com) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TCesv-0006pc-5x for 12443@debbugs.gnu.org; Fri, 14 Sep 2012 19:01:18 -0400 Received: from localhost (ps18281.dreamhostps.com [69.163.218.105]) by ps18281.dreamhostps.com (Postfix) with ESMTP id 77A00451CC45; Fri, 14 Sep 2012 16:00:14 -0700 (PDT) From: Juri Linkov To: Dani Moncayo Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: JURTA References: Date: Sat, 15 Sep 2012 01:47:31 +0300 In-Reply-To: (Dani Moncayo's message of "Fri, 14 Sep 2012 22:42:47 +0200") Message-ID: <871ui48di4.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: 12443 Cc: Stefan Monnier , 12443@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's a matter of taste (some people prefer the "(default ...)"). > > maybe, but other people (Drew, you, me and I guess many others) prefer > other behavior. > > Therefore, it seems that this should be user-configurable. (defcustom minibuffer-default-prompt-format " (default %s)" "Default format." :type 'string) Example of usage: (let ((default "def")) (read-from-minibuffer (format "Set bookmark%s: " (format minibuffer-default-prompt-format default)))) Other possible values: (setq minibuffer-default-prompt-format " [%s]") (setq minibuffer-default-prompt-format "") From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 08:30:36 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 12:30:36 +0000 Received: from localhost ([127.0.0.1]:60631 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAY5z-0001X3-Rp for submit@debbugs.gnu.org; Tue, 25 Aug 2020 08:30:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40940) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAY5x-0001Wk-58 for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 08:30:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=a6WrrX3WMMp/VDHbtnLN1wgtLc+4rUXvb5N/8RSg/cE=; b=qoYjom+2IsXGmReJOkxP1DhF4j 5bM5NzB5fjiTafzlO66eJaLaYRVyQL8+LEJCEqLqZ7KT8CJ8Mn3cMcn/ENx6Xc2at5CdZzdIvhyRm l/kmGkYvL/GwkrvWn0agdSa8sGlhwB0Qa9MExz0j7hN17hEXK2p4zSXrzKVdcg0JN+c4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAY5l-0005QX-Dj; Tue, 25 Aug 2020 14:30:25 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> X-Now-Playing: DACM's =?utf-8?B?X1N0w4PCqXLDg8Kpb3R5cGllXzo=?= "LN Start" Date: Tue, 25 Aug 2020 14:30:19 +0200 In-Reply-To: <871ui48di4.fsf@mail.jurta.org> (Juri Linkov's message of "Sat, 15 Sep 2012 01:47:31 +0300") Message-ID: <878se2aox0.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > (defcustom minibuffer-default-prompt-format " (default %s)" > "Default format." > :type 'string) > > Example of usage: > > (let ((default "def")) > (read-from-minibuffer > (format "Set bookmark%s: " [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > (defcustom minibuffer-default-prompt-format " (default %s)" > "Default format." > :type 'string) > > Example of usage: > > (let ((default "def")) > (read-from-minibuffer > (format "Set bookmark%s: " > (format minibuffer-default-prompt-format default)))) > > Other possible values: > > (setq minibuffer-default-prompt-format " [%s]") > (setq minibuffer-default-prompt-format "") I think that makes a lot of sense. Does anybody have an opinion here? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 08:44:25 2020 Received: (at control) by debbugs.gnu.org; 25 Aug 2020 12:44:25 +0000 Received: from localhost ([127.0.0.1]:60656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYJN-0001sh-9b for submit@debbugs.gnu.org; Tue, 25 Aug 2020 08:44:25 -0400 Received: from mail-yb1-f171.google.com ([209.85.219.171]:36218) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYJL-0001sU-T1 for control@debbugs.gnu.org; Tue, 25 Aug 2020 08:44:24 -0400 Received: by mail-yb1-f171.google.com with SMTP id g3so7082317ybc.3 for ; Tue, 25 Aug 2020 05:44:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:date:message-id:subject:to; bh=aJuYOwmB4h0+ffOmSvh6eddwusl0biHSNsDRlGQiXkA=; b=OnSfWHnfyi4tu7Z9ji4sA4QTfrn+yhlFS5XqdmmYElj5jJV73s+EVFpC9HDYevPGmD 5aJkHSx5x+R0fGJhAulnpEVGJDEGsolHV1QbN5X+ht8tixf4gm+Rre15Hxu3cKWeaPTK DfGtsPh8JjzUFnW4W1o+An5ICjvMvUiFagxXS7qg80ZRAIRJaeDlMaSVUvSh+7wHBY2h E5Z+gC+5YFDp2NsA9reicf3WpEIig8ueqW+0YuLjArH9t/1CEzM0YnER0EatIlJ/PdEc ci9FVIpJrGU48FlG5la9BUvfP7v2+RTm+34nWbRH7i6VKNveGtSYUcS2MKoS8aDQnDgO qnBg== X-Gm-Message-State: AOAM530xfuk88UPEHypFEJ1xYQ8qJFSIE3LhAmSK6QJRGYnC5h7SeFVw 6kW9rZ4crVV26mMls2m/pRPjHiD5tUoIrwUlHnbkOA64 X-Google-Smtp-Source: ABdhPJyn+TX0adc6cwjpV2eKW9rvvgpGK5uSqvKAwWWmDNX2oMVvN39KI1umPT5A3z1IzWARBnkLzXy+yxr3dK5q/u0= X-Received: by 2002:a25:4ed7:: with SMTP id c206mr14697626ybb.129.1598359458054; Tue, 25 Aug 2020 05:44:18 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Aug 2020 05:44:17 -0700 From: Stefan Kangas MIME-Version: 1.0 Date: Tue, 25 Aug 2020 05:44:17 -0700 Message-ID: Subject: fix typo in title To: control@debbugs.gnu.org Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.5 (/) retitle 12443 24.2.50; Default values in the minibuffer prompt (fix inconsistency) thanks # fix typo From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 08:55:52 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 12:55:53 +0000 Received: from localhost ([127.0.0.1]:60679 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYUS-0002D8-Iu for submit@debbugs.gnu.org; Tue, 25 Aug 2020 08:55:52 -0400 Received: from mail-yb1-f196.google.com ([209.85.219.196]:35491) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAYUR-0002Cr-3b for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 08:55:51 -0400 Received: by mail-yb1-f196.google.com with SMTP id y134so7096838yby.2 for <12443@debbugs.gnu.org>; Tue, 25 Aug 2020 05:55:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=Mp9s8H2Ol4wpZR45Ken+2i3r7hqHc9ePj/C7QbzQkzo=; b=JXajpThgBy8exYDuCBYh8TZTpB2EJh73x/txLCIJd+cOiDO/rFXSgq9eMomfNdMm4k gBF2HKLgOGC+C4zrrdYV0F9Nu8/NoBiv180X3a8ZiD4cnhw6nlk7dG7Y1M92KoqCqTwO vALMTE1OCihbU/ialKr34TiolX75qaoHCD64JHbV3rInnL8ezgut5aA4eXX4HBaAR95E wRMOYbLK6gG1aaO6BgI8jD8ZehLjzFGZ8crvbEQNTynlg17zZ4eClbotkqyOAVzW/EJG dpn+n4i1w3AVBXQGLodwILLzcSKeTCH22pEROxWk3mqWAgwP3Vco91YFBTnhYgTXFnk1 9nKw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=Mp9s8H2Ol4wpZR45Ken+2i3r7hqHc9ePj/C7QbzQkzo=; b=lE51CWi8H9cy8CMRkkaOYiO2pWcf/b5EM+GJ9wk0D0yHYq8mll74dAa6G0CQrBWTu+ BlMEsGyyk/d2UlARzRIQmfujXxs7STJbBEY19Un1JOoaIG1BkxUcOdyCeY0JGshANLPg mR0S4dXtjZN9byb++87zIHs7mPfthfKPC1CBGhJ1Ekj4QPNIxk1aOX7bnHhJ4NhzmE1p 5P7zx/3BGMr3xJU0kBWX7mdR9NwB5G3evcYkayH7nvWsJTlRI9A0HoD1D308PsjsaHS/ SUyBQekYqvG55awjQbvUkEY27hAx+ISZJIiMBls+NfevotiNTY6inc6pAtTlI+8F4dZ9 56Mw== X-Gm-Message-State: AOAM532pArkwQUYAOIa9nnx0EjW968rOaHkeL/LFLpLoiQ9uiH4Axsq7 aZ58oy1nVVaEUutr1dH6vH96UtrWiqQCHYzC9VA= X-Google-Smtp-Source: ABdhPJyB1LAhnGou7p5olWhrRtuJsw3/AdLfDUHGIUDlshsPjgUil7v9LZTfzZFwZLKBHdxbN0UwoAQxHsGd80xuwTw= X-Received: by 2002:a25:4ed7:: with SMTP id c206mr14768255ybb.129.1598360145477; Tue, 25 Aug 2020 05:55:45 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Aug 2020 05:55:44 -0700 From: Stefan Kangas In-Reply-To: <878se2aox0.fsf@gnus.org> References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> MIME-Version: 1.0 Date: Tue, 25 Aug 2020 05:55:44 -0700 Message-ID: Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) To: Lars Ingebrigtsen , Juri Linkov Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Juri Linkov writes: > >> (defcustom minibuffer-default-prompt-format " (default %s)" >> "Default format." >> :type 'string) >> >> Example of usage: >> >> (let ((default "def")) >> (read-from-minibuffer >> (format "Set bookmark%s: " >> (format minibuffer-default-prompt-format default)))) >> >> Other possible values: >> >> (setq minibuffer-default-prompt-format " [%s]") >> (setq minibuffer-default-prompt-format "") > > I think that makes a lot of sense. Does anybody have an opinion here? I think this sounds like a good idea; consistency is good. How about taking it even further? Something along the lines of: (format-prompt PROMPT &optional DEFAULT) (format-prompt "Set bookmark" default) => "Set bookmark [foobar]: " (format-prompt "Goto char") => "Goto char: " (This would avoid having to always remember to use double formats like above.) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 09:46:00 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 13:46:00 +0000 Received: from localhost ([127.0.0.1]:60808 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZGx-0000SV-VR for submit@debbugs.gnu.org; Tue, 25 Aug 2020 09:46:00 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31806) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAZGw-0000MK-K4 for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 09:45:58 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 15CF4440783; Tue, 25 Aug 2020 09:45:53 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 7ABBB4406A0; Tue, 25 Aug 2020 09:45:51 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1598363151; bh=SswPQSUJPF1wks8Vx7MRq8j1mq0kwV280dvmg2A5omA=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=E9I+YacW+Y0guwrG9JNl1XUPhzrQkpYvLIhKSJwABjTFX0sqOHp5z0QFxC7ZU3UTI sZkS24otszKjB6ZddthGELqr9EfyYqXPJ0G64ZNb9vb44SvKHBo9SHIwkDxf/UsKpP pAbcy3yUGXcHWscYov0t8DBQN2id3lqyYxJ2OERn91E+sST7z4QoScAcOGLZhoxLek aQpYqEsOhU0ypCzUQ1yLiwRraMBSyMn5UKlY1ppAcvWKSp4vSa6SE0BQJfiqhNhp2t 3o0NxXymX/8FBeaugc52zZ0JvdpjZ1+sgy0pj1t6NZZqYFvQtPp9DnouQv1UQ6MgkO g1MQY7/RXmKAw== Received: from alfajor (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 1966C12076C; Tue, 25 Aug 2020 09:45:51 -0400 (EDT) From: Stefan Monnier To: Stefan Kangas Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Message-ID: References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> Date: Tue, 25 Aug 2020 09:45:50 -0400 In-Reply-To: (Stefan Kangas's message of "Tue, 25 Aug 2020 05:55:44 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.035 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , Lars Ingebrigtsen , 12443@debbugs.gnu.org, Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >>> (defcustom minibuffer-default-prompt-format " (default %s)" >>> "Default format." >>> :type 'string) >>> >>> Example of usage: >>> >>> (let ((default "def")) >>> (read-from-minibuffer >>> (format "Set bookmark%s: " >>> (format minibuffer-default-prompt-format default)))) Nitpick: `read-from-minibuffer` is a low-level function which you should never use directly but only within other `read-` functions. E.g. here one should probably use `read-string` instead. Please make sure that `minibuffer-electric-default-mode` pays attention to it. > How about taking it even further? Something along the lines of: > > (format-prompt PROMPT &optional DEFAULT) > > (format-prompt "Set bookmark" default) > => "Set bookmark [foobar]: " > > (format-prompt "Goto char") > => "Goto char: " LGTM, Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 11:19:53 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 15:19:53 +0000 Received: from localhost ([127.0.0.1]:35687 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAajp-0007Yp-9b for submit@debbugs.gnu.org; Tue, 25 Aug 2020 11:19:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:43008) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAajn-0007Ya-DL for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 11:19:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JYfSW0kv7OmYcLWf93SDS7Fi+fJZDPnOyGxd4gh8qyM=; b=poGu/8ELCgirAARY7gpfPALDJw 7H5tg+fddSNrESBTVeFmtsTsDKtncxtvgRu1vLVUlEbovTA6hvfNRSd3gVKSCys0SKyo2HuzaJlLu cT8B7qsnB4sOoidRzh7r6zpdIwaymJsiTBeL7WahZcR0Wi6xslpS3rOkG31JrJQ1J9eY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAajc-00077W-F1; Tue, 25 Aug 2020 17:19:44 +0200 From: Lars Ingebrigtsen To: Stefan Kangas Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEXQ8Pykzr/7/PPt 8s/f5a59k3P////3cTrHAAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QIGQ8LDyR3I4cAAAGZSURBVDjL nZPBboMwDIbbSrvjEe6t091LnN0b2b0vGn7/V5mTEqBbpUm1EEL5+H87drLb/RP7breDDvb7vwQa /z+wvGATTYWIBI/RNeDjL7IoJD1VeCmxAZc78LGC5EzmwNnnDEhkyCzwTcmZzsC1AjOqv8L34QxV O4MonDyoug4x1XU+NnDLo/byXgATUWhABgWFaIpiZeS45FCdPvovxJElGrg0IKrgJ7MaqVg1ULxy 4lCAZwp+Bni2jkzi+qooKYTvIHphjc4ZiJ5WKzwByQCu7IPsCeRngDRacqD3A45jb6ApED+tXFc2 GG8Tepw3aCDlIfXcH/CkqkJ6bWDIWTkA4t6ADrqM9pTdFMgZKNMYZFGgkAS0HJ/WrOg4LYeBooGA +JbBEaVVURoZerOyAUdxS7lWp7WbEc/3CT4C5lJFORXTxsoax1cDanPWKa8Kiny30ly2sgIfE0l1 lFvSjcKWyIVag1gXNla20nlvp8Sn2yZ5TcIB65yELw9AYsA5jpvk9qPDJyAgUf8MPMar4OWwO7ze /VfiB8wrhoIKJgx3AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA4LTI1VDE1OjExOjE1KzAwOjAw m6b/BAAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOC0yNVQxNToxMToxNSswMDowMOr7R7gAAAAA SUVORK5CYII= X-Now-Playing: Steve Hackett's _Voyage of the Acolyte_: "The Lovers" Date: Tue, 25 Aug 2020 17:19:38 +0200 In-Reply-To: (Stefan Kangas's message of "Tue, 25 Aug 2020 05:55:44 -0700") Message-ID: <87imd669dh.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Kangas writes: > How about taking it even further? Something along the lines of: > > (format-prompt PROMPT &optional DEFAULT) > > (format-prompt "Set bookmark" default) > => "Set bookmark [foobar]: " > > (format-pro [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org, Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Kangas writes: > How about taking it even further? Something along the lines of: > > (format-prompt PROMPT &optional DEFAULT) > > (format-prompt "Set bookmark" default) > => "Set bookmark [foobar]: " > > (format-prompt "Goto char") > => "Goto char: " > > (This would avoid having to always remember to use double formats like > above.) I like it. I just grepped for '(default %' just to see how this would look in practice. Most of them look good: diff --git a/lisp/dired-x.el b/lisp/dired-x.el index 873d586ca1..5335855d6e 100644 --- a/lisp/dired-x.el +++ b/lisp/dired-x.el @@ -339,8 +339,7 @@ dired--mark-suffix-interactive-spec ('(16) (let* ((dflt (char-to-string dired-marker-char)) (input (read-string - (format - "Marker character to use (default %s): " dflt) + (format-prompt "Marker character to use" dflt) nil nil dflt))) (aref input 0))) (_ dired-marker-char)))) diff --git a/lisp/frame.el b/lisp/frame.el index 081d3010e9..d9e49d50ba 100644 --- a/lisp/frame.el +++ b/lisp/frame.el @@ -760,7 +760,7 @@ close-display-connection (list (let* ((default (frame-parameter nil 'display)) (display (completing-read - (format "Close display (default %s): " default) + (format-prompt "Close display" default) (delete-dups (mapcar (lambda (frame) (frame-parameter frame 'display)) However, there's things like: (setq from-coding (read-coding-system (format "Recode filename %s from (default %s): " filename default-coding) default-coding)) These are surprisingly rare, but, uhm... perhaps format-prompt could take a format string? The function would then look like: (defun format-prompt (prompt default &rest format-args) ) where it would call `format' on PROMPT and FORMAT-ARGS. So that would then be: (setq from-coding (read-coding-system (format-prompt "Recode filename %s" default-coding filename) default-coding)) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 11:35:11 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 15:35:11 +0000 Received: from localhost ([127.0.0.1]:35733 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAayd-00081H-6q for submit@debbugs.gnu.org; Tue, 25 Aug 2020 11:35:11 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:36828) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAaya-00080x-Cl for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 11:35:10 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07PFPJOT028779; Tue, 25 Aug 2020 15:35:02 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=imQIZLjWMAkmQwZ+b4MRb699UoD6RDBIizwIttWldLE=; b=btmVQy3p/ucZjSIVsPDYlRshalNBmbeCoLY8rEski3hWCTwdvkt8fv+F3XYFfeWnVBPh XN+7FAlOfjFz+wBZLRv8/Fyvj6kuST2Iv117C7PXlPBJPRYkhzbL8BLpBtXRKe4w64Ee psV065WSUzgpsJI5pi31NgBnHMs12dig/aNSpz2Be2MT279W82SLhOAQ8US9vzVOI+EP aKKXtYN1Tb/8AzA3jx7fPJuuSMiRh7f2qgxviOBFFiZyJrimTmkeFoAJK2XeNJEdSM3t dDvX80FIduHBgb5VdUjh1Br1ywgJZdjMql7NfN4Y3ePaCDsiyEVzWoKALLEn0WrNMM8j mw== Received: from userp3030.oracle.com (userp3030.oracle.com [156.151.31.80]) by userp2120.oracle.com with ESMTP id 333w6tssju-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 25 Aug 2020 15:35:02 +0000 Received: from pps.filterd (userp3030.oracle.com [127.0.0.1]) by userp3030.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 07PFLJNO037673; Tue, 25 Aug 2020 15:35:02 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userp3030.oracle.com with ESMTP id 333r9jq2vs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Aug 2020 15:35:02 +0000 Received: from abhmp0004.oracle.com (abhmp0004.oracle.com [141.146.116.10]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 07PFYxlX007361; Tue, 25 Aug 2020 15:34:59 GMT MIME-Version: 1.0 Message-ID: Date: Tue, 25 Aug 2020 08:34:58 -0700 (PDT) From: Drew Adams To: Lars Ingebrigtsen , Stefan Kangas Subject: RE: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> In-Reply-To: <87imd669dh.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5044.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9723 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 phishscore=0 suspectscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 mlxscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008250115 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9723 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 impostorscore=0 mlxlogscore=999 suspectscore=0 phishscore=0 malwarescore=0 spamscore=0 priorityscore=1501 clxscore=1011 mlxscore=0 lowpriorityscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2008250115 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) This is what I do in Icicles. ` icicle-handle-default-for-prompt' is called from `(icicle-)completing-read' and `(icicle-)read-string'. ;; In `(icicle-)completing-read': (setq prompt (icicle-handle-default-for-prompt prompt ;; If `insert-default-directory' then make DEF ;; in prompt relative to `default-directory'. (if (and def1 (eq icicle-default-value t) insert-default-directory) (file-relative-name def1) def1) (and (eq icicle-default-value t) ;; Include in prompt only if ;; `insert-default-directory' does not ;; insert it as input. (or (not insert-default-directory) (not (icicle-file-name-input-p)) (not (equal def1 default-directory)))))) ;; In `(icicle-)read-string': (when default-value (setq prompt (icicle-handle-default-for-prompt prompt default-value (eq icicle-default-value t)))) (defun icicle-handle-default-for-prompt (prompt default include) "Return PROMPT, possibly changed to format or remove the DEFAULT value. Argument INCLUDE: * nil means do not include DEFAULT in prompt. Remove it if there. * non-nil means include DEFAULT, formatted according to `icicle-default-in-prompt-format-function'. In the existing PROMPT before modification, recognizes inclusion of a default value according to these possible patterns: `minibuffer-default-in-prompt-regexps' \"(default ___):\" \"(default is ___):\" \" [___] \"" (when (consp default) (setq default (car default))) (dolist ; Remove the default, if already there. (rgx (if (boundp 'minibuffer-default-in-prompt-regexps) minibuffer-default-in-prompt-regexps '(("\\( (default\\(?: is\\)? \\(.*\\))\\):? \\'" 1) ("\\( \\[.*\\]\\):? *\\'" 1)))) (setq prompt (replace-regexp-in-string (car rgx) "" prompt nil nil (cadr rgx)))) (if (and default include) ; Add non-nil DEFAULT, if INCLUDE. (replace-regexp-in-string ".*\\(\\): *\\'" (funcall icicle-default-in-prompt-format-function default) prompt nil t 1) prompt)) (defcustom icicle-default-in-prompt-format-function (lambda (default) (format " (%s)" default)) "Function that formats the default value to include in the prompt. The function must accept the default value (a string) as its (first) argument and return a string, which is prepended to the first occurrence of `: ' in the prompt. This option has no effect unless `icicle-default-value' is t." :group 'Icicles-Miscellaneous :type 'function) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 12:19:23 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 16:19:23 +0000 Received: from localhost ([127.0.0.1]:35800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAbfP-0000hE-Gm for submit@debbugs.gnu.org; Tue, 25 Aug 2020 12:19:23 -0400 Received: from mail-yb1-f177.google.com ([209.85.219.177]:43678) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAbfN-0000gz-B2 for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 12:19:22 -0400 Received: by mail-yb1-f177.google.com with SMTP id m200so7447633ybf.10 for <12443@debbugs.gnu.org>; Tue, 25 Aug 2020 09:19:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:in-reply-to:references:mime-version:date:message-id:subject:to :cc; bh=0ECYlVnVmhIwRBdhIh+zu9FNyu7bSy/LgdyE85ARlD0=; b=nB2Wg9il0eqaQjIDntZDAPgpnPBdcx5aLPWg25xQp7/j7+IvVrnKnAU0l6aLEs+IpT xtjJP6m7Tvch04ZEq6WCQRUTAdauUEmINPHpSpH+DZ76mzNVlm7qXUV76ialUIoa9O7H G7ciqLzWpbCTZ78iZNqiq3wj7O4/HDldArksj687ZwCLVrz9oK0vPOOSraMXHwLdEVXF V70/UO6ezmvORZGqIuaR2wziZ61enwCN0AKLAVsU+DWnxu8WCw+QR9VnSQH69Q4+vvGU 8l8QLhV6cu6cJftiOGJlQ4hEBI8Fr53lECU9pJVTisMiJYiRQbXQc7HSOh4LGFBVf4AH +DyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to:cc; bh=0ECYlVnVmhIwRBdhIh+zu9FNyu7bSy/LgdyE85ARlD0=; b=tnW5rZT0KgQ2zQ8E/jJiW5O6yrelwW+WoQH+EjaIvmvXqE5KqWpvOB6WWTLaNSmLNO 8GTqcbhjoEMzuEdZeOeQq1HsODuZiQuRqhCys+3XrTCHoJ9hAZbrw7Odj/irnwcAx09W Vd7cGVIxtejNSD0U9TKUdhGQ9mxhzYChgZQ/pF+7nUmClsocZLOQ6LYAIXI0TCrHenNs FqaBG/zEtrj6qP5Xh/c65V1CLKhZQKAJ4qWOxjJnEpGoq98w8vYPZLaWndOwvOrAnyPe ndwAL3Xs9DIl1YGEBoWl5wy28rkFbkRe5ZCRzk00zGXiKmods7yrTP8cRcUr9jSVVtbU KhEg== X-Gm-Message-State: AOAM533GjPiPhcc4wkUG0qU9b82Muw3MyHgWslcBI0jNZ4Rf6dW4jt1R WUVW+2U23XBzojIMp9gv5CbkatDXQHg5xLy++mo= X-Google-Smtp-Source: ABdhPJxspRViKG9SPndbHWVbF3oqM6nDlnlbzqMyntSFscwoIE7H8kSBCUNeEdWEVIThNNX3xsMqpc/0z+njcEPXMRE= X-Received: by 2002:a25:4609:: with SMTP id t9mr14799737yba.231.1598372355837; Tue, 25 Aug 2020 09:19:15 -0700 (PDT) Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Tue, 25 Aug 2020 09:19:15 -0700 From: Stefan Kangas In-Reply-To: <87imd669dh.fsf@gnus.org> References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> MIME-Version: 1.0 Date: Tue, 25 Aug 2020 09:19:15 -0700 Message-ID: Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) To: Lars Ingebrigtsen Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org, Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > I like it. I just grepped for '(default %' just to see how this would > look in practice. Most of them look good: Agreed. > (defun format-prompt (prompt default &rest format-args) > ) Sounds good to me. From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 15:09:40 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 19:09:40 +0000 Received: from localhost ([127.0.0.1]:36134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAeKB-00010V-Ph for submit@debbugs.gnu.org; Tue, 25 Aug 2020 15:09:39 -0400 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:50259) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAeK8-00010D-UB for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 15:09:37 -0400 X-Originating-IP: 91.129.102.47 Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 732951C0004; Tue, 25 Aug 2020 19:09:27 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> Date: Tue, 25 Aug 2020 21:23:46 +0300 In-Reply-To: <87imd669dh.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 25 Aug 2020 17:19:38 +0200") Message-ID: <875z961u2l.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Kangas , Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) > However, there's things like: > > (setq from-coding (read-coding-system > (format "Recode filename %s from (default %s): " > filename default-coding) > default-coding)) > > These are surprisingly rare, but, uhm... perhaps format-prompt could > take a format string? The function would then look like: > > (defun format-prompt (prompt default &rest format-args) > ) > > where it would call `format' on PROMPT and FORMAT-ARGS. > > So that would then be: > > (setq from-coding (read-coding-system > (format-prompt "Recode filename %s" > default-coding filename) > default-coding)) Simpler would be to format arguments separately: (setq from-coding (read-coding-system (format-prompt (format "Recode filename %s from" filename) default-coding) default-coding)) that would allow easier replacement of 'format' with 'gettext' later: (setq from-coding (read-coding-system (format-prompt (gettext "Recode filename %s from" filename) default-coding) default-coding)) From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 15:12:41 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 19:12:41 +0000 Received: from localhost ([127.0.0.1]:36152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAeN6-00015k-SC for submit@debbugs.gnu.org; Tue, 25 Aug 2020 15:12:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44882) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAeN5-00015W-5w for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 15:12:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=At+1xyaLeuXMzhLA4TJ/pE+gVw9TEJ9u74vQ9PL4mR0=; b=Xagzs3FcuKuBslZ3l6bKbgJzt+ YOuakTjq7ybk8Ifv4JEfPGMwup5ILyBRzpZuHRHV1Eb6PKOLwKJCwIbdVZKuBvzA82sJwE/yDc5Is +gEArPTh0YYd+WBDLEYvP3uuVuSHJP5+QXnzz9FN1CoCYUlfz/4i4CxoPYslZCUYWgtA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAeMv-0000wP-A8; Tue, 25 Aug 2020 21:12:31 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAFVBMVEUBAgEnMS1UYls4 SkKcp514hnz///9NkLG6AAAAAWJLR0QGYWa4fQAAAAd0SU1FB+QIGRMLBz+Q8aEAAAF8SURBVDjL vZNBcoMwDEVJMt1jfAGQ0D6WcoBOxuxbat//Kv0Q7ISZtJNu+pmxwc/Slww0zX+p3T8etvloPb2P iT4uzWDHvqO3suHc9722PZ1a0nPnaNhA13+6i7qhG9qRqBtUNuADnTyRtNx47s50OlaztvlVBwet wzPgnoPg/PNUP3mEF0+qevp1MLMNECQxxplW5TxXkDPW43QDJAWoDC4thEpIieCDlyw53fZTmmoq 55W17JdYQSIODsVIXhXj1lfOREqmSJ6nRxABxjiniAqmKcodoM6J1rriiipYlGNR2gN6Bq4JNhLv 2sC0gjBeDW3w0ssG5EpsyhIzfNNEJaLxRgOAjnJFETtwYTKciZnuTtf57kvVNH55ZyrVAxHIg5gE L1xKcwU3KSnPLDKXCLu96IUwAmBWwCaCe6AlcQVwYGMKhqlDk3ewlMlmeFsBm+jBHJmNB7eyChZr LKN/3AFw+eBKUUscgFZQlmG1B4fyn59C69oXP/g/6Bv0wWzDJd3VcAAAABBlWElmSUkqAAgAAAAA AAAAAAAAAJw8uSgAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDgtMjVUMTk6MTE6MDcrMDA6MDBa KVdIAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA4LTI1VDE5OjExOjA3KzAwOjAwK3Tv9AAAAABJ RU5ErkJggg== X-Now-Playing: Tuxedomoon's _Live in San Francisco (1979)_: "What Use-" Date: Tue, 25 Aug 2020 21:12:27 +0200 In-Reply-To: <875z961u2l.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 25 Aug 2020 21:23:46 +0300") Message-ID: <87wo1m4k10.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> (setq from-coding (read-coding-system >> (format-prompt "Recode filename %s" >> default-coding filename) >> default-coding)) > > Simpler would be to format arguments separately: > > (setq from-codi [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Kangas , Stefan Monnier , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: >> (setq from-coding (read-coding-system >> (format-prompt "Recode filename %s" >> default-coding filename) >> default-coding)) > > Simpler would be to format arguments separately: > > (setq from-coding (read-coding-system > (format-prompt (format "Recode filename %s from" > filename) > default-coding) > default-coding)) Yeah, but that's longer and more awkward, isn't it? > that would allow easier replacement of 'format' with 'gettext' later: > > (setq from-coding (read-coding-system > (format-prompt (gettext "Recode filename %s from" > filename) > default-coding) > default-coding)) I don't think we have to have gettexting in mind, because that's never gonna happen. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Aug 25 16:00:25 2020 Received: (at 12443) by debbugs.gnu.org; 25 Aug 2020 20:00:25 +0000 Received: from localhost ([127.0.0.1]:36190 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAf7J-0002Fx-AQ for submit@debbugs.gnu.org; Tue, 25 Aug 2020 16:00:25 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:41844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAf7G-0002Fg-Q4 for 12443@debbugs.gnu.org; Tue, 25 Aug 2020 16:00:23 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 1C84D1002CF; Tue, 25 Aug 2020 16:00:17 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 63AD7100283; Tue, 25 Aug 2020 16:00:15 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1598385615; bh=4lGFXUr/gueNF2lPX9oI2C59AArT8ctyJsDWA/wn1Ko=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ENDp7v8DKpI+eqH9n1KnC3J+OfCe/VAUel8ma8k/53gmLKcHIwJENZI0Nh0xdGBFh bYHTxtMia99xFoRj39+KZe+gzEfecllYqhSQVGo5MQD5rjgd1gRmqrADnyjjWEJy11 uiHvUNUz0dwLL/D64DUBR5XsUYZYp9hvbH+s3lZxNQU7B7M4CkiArrndW38N4u1GTr Rcd+YPogoYe5B1yFLqQ1w959123/+TnJ6yuH+PBrXi+/92EuQrpKvjxbL9ZPgm12xT n/xCJ8oU+b5uKZCVIXP2IEqetHzKzyERffblVkXJNQuv0dqk7szK+tPtyT4DAeONq6 FxpFIuU3BH9eA== Received: from alfajor (unknown [45.72.246.108]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 244C2120263; Tue, 25 Aug 2020 16:00:15 -0400 (EDT) From: Stefan Monnier To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Message-ID: References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> Date: Tue, 25 Aug 2020 16:00:13 -0400 In-Reply-To: <875z961u2l.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 25 Aug 2020 21:23:46 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.054 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12443 Cc: Lars Ingebrigtsen , 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > that would allow easier replacement of 'format' with 'gettext' later: > > (setq from-coding (read-coding-system > (format-prompt (gettext "Recode filename %s from" > filename) > default-coding) > default-coding)) Couldn't `format-prompt` do the `gettext` internally? Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Aug 26 08:10:40 2020 Received: (at 12443) by debbugs.gnu.org; 26 Aug 2020 12:10:40 +0000 Received: from localhost ([127.0.0.1]:37625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAuGG-0003dz-EC for submit@debbugs.gnu.org; Wed, 26 Aug 2020 08:10:40 -0400 Received: from quimby.gnus.org ([95.216.78.240]:54708) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kAuGE-0003dl-93 for 12443@debbugs.gnu.org; Wed, 26 Aug 2020 08:10:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TAPXHFnpdLMjyEbFaKFx+2ww6QBPOAFGRKrchRzW/v8=; b=AUsSyXnaG2gzicJR8sS3I2bSHJ kH+2FBZ08Y6KoQujyk19i8gf0cQcLGt1Qu6SA1byP3fXqUeaFgktgyieV8vRl5OnyKw+KIVV9tpHt OT5a3VyYCUx1OoGC+m8jtOVzl08XBzpbPovoxSLQLYNd1+Duq5qaVYr0toQIVFt8cgwQ=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kAuG0-0005H4-KC; Wed, 26 Aug 2020 14:10:30 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEXg4N7+/v7V1dT8 /Pz7+/toZ2c4ODdLSkmgoKAZFxjl5eUgHh4kIyNAPj////+AAYbXAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+QIGgwIJLMVmLMAAAEmSURBVDjLxZK/TsMwEIevE7PrDKwWDAwsJn2BiA6sDOVPxdyqzEBk wQICKS+AWgsjgXgKFHbk6B6KixsnoUkGJKR8QxTfp591PhsGrB3oVYhehexuN/QLflgTu+NyxRkb l8DJbH5WCDl8upl5QGmtp9wFhvm/fvnMP0jiC5duN7lvMC+ugdPYor2PSAQLtN+xB0SwZeyV28ng 80e9KypkfC0yXj/HtsHLIpGFlUiSC7THsplQ2qAVLeIW0a44a0vopRvkpoiTRBQH/y3upoxHbUKZ Rxo8MTogEYQeUPj64BKMEquoSpwba+YTB/V3PfHA3sJgMVBE1NV0xZFy8yfSNMUS2GF0b1ireCFG dBNv0ETI+tvYfFdhk+4H169gHWLwZ/H+b+IHPSnZwUhkZqoAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjAtMDgtMjZUMTI6MDg6MzYrMDA6MDCBS6REAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA4LTI2 VDEyOjA4OjM2KzAwOjAw8BYc+AAAAABJRU5ErkJggg== X-Now-Playing: Alva Noto's _Xerrox Vol. 04_: "Xerrox Calypsoid 2" Date: Wed, 26 Aug 2020 14:10:22 +0200 In-Reply-To: (Stefan Monnier's message of "Tue, 25 Aug 2020 16:00:13 -0400") Message-ID: <871rjt1uc1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: > Couldn't `format-prompt` do the `gettext` internally? Yup -- all the prompts fed to format-prompt are meant for display, so that should be fine. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: > Couldn't `format-prompt` do the `gettext` internally? Yup -- all the prompts fed to format-prompt are meant for display, so that should be fine. Anyway, I went ahead and pushed this to Emacs 28, but I've only converted two (2) of the (at least) couple hundreds of callers, because I wanted to see if there were any further comments on the concept (or the interface) before digging into the rest of the call sites. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Thu Aug 27 14:58:43 2020 Received: (at 12443) by debbugs.gnu.org; 27 Aug 2020 18:58:43 +0000 Received: from localhost ([127.0.0.1]:44028 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBN6h-0000nl-F1 for submit@debbugs.gnu.org; Thu, 27 Aug 2020 14:58:43 -0400 Received: from relay2-d.mail.gandi.net ([217.70.183.194]:65339) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBN6f-0000nW-Hq for 12443@debbugs.gnu.org; Thu, 27 Aug 2020 14:58:42 -0400 X-Originating-IP: 91.129.102.47 Received: from mail.gandi.net (m91-129-102-47.cust.tele2.ee [91.129.102.47]) (Authenticated sender: juri@linkov.net) by relay2-d.mail.gandi.net (Postfix) with ESMTPSA id 2150340003; Thu, 27 Aug 2020 18:58:31 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> Date: Thu, 27 Aug 2020 21:48:18 +0300 In-Reply-To: <871rjt1uc1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Wed, 26 Aug 2020 14:10:22 +0200") Message-ID: <878se0gc25.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.4 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Dani Moncayo , Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.4 (-) > Anyway, I went ahead and pushed this to Emacs 28, Maybe the final separator (colon) should be customizable as well. What if someone wants to use the same character as used in shell, i.e. '$'. Then moving the currently hard-coded colon to the default value " (default %s): " will allow the users to customize it to " (default %s)$ " > but I've only converted two (2) of the (at least) couple hundreds of > callers, because I wanted to see if there were any further comments on > the concept (or the interface) before digging into the rest of the > call sites. Shouldn't one of these calls (namely 'describe-function') be further simplified with diff --git a/lisp/help-fns.el b/lisp/help-fns.el index d302c05283..617f6ae5e8 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -151,9 +151,7 @@ describe-function (let* ((fn (function-called-at-point)) (enable-recursive-minibuffers t) (val (completing-read - (if fn - (format-prompt "Describe function" fn) - "Describe function: ") + (format-prompt "Describe function" fn) #'help--symbol-completion-table (lambda (f) (or (fboundp f) (get f 'function-documentation))) t nil nil But something is still wrong - with the nil default value the prompt becomes: "Describe function (default nil): " whereas it should be "Describe function: " It seems 'format-prompt' should not use 'minibuffer-default-prompt-format' when 'default' is nil. From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 28 10:11:18 2020 Received: (at 12443) by debbugs.gnu.org; 28 Aug 2020 14:11:18 +0000 Received: from localhost ([127.0.0.1]:47034 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBf66-0000fF-1O for submit@debbugs.gnu.org; Fri, 28 Aug 2020 10:11:18 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBf63-0000ey-LD for 12443@debbugs.gnu.org; Fri, 28 Aug 2020 10:11:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=ofnoiSZzS3LtbIK8+/Y2krA6iYjXVKbg5VcMgkjAEUg=; b=u83Q+hfhj+V+fTD3bxQUePrCJT r58HfbhjesEKh2Rx0R0cAJdflga/pKIjcIwoTN0N8Vi1TpNFVRZQ5fVlSoOnxk53YXzjhCCo+3lik L7R7z2sVKa4RTtwAFOCSSDvpQRN0EwnkBbQ1KUW71+6dSIIwYBzDjY9NZu8HuhAhHPsI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBf5s-0002xN-Ne; Fri, 28 Aug 2020 16:11:09 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWpuctxj8g9R1r/ //8QJ8S9AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QIHA4FDBXhxbYAAAFlSURBVCjPTZIxj9swDIUf jVMGTyrQ3JCps38FPWS5yQHMAPXcpf4V7trJGW73kBxs/so+ykXuOAj6RIl8TxIgZh2ecTTkT+jT Z8rMdF8FZNj2hPYc3B/AsG3gWrVB3GfUExNVzIIXQl37HgWqMh19FuA0/Xh118Y7Aw5LSqaHzrXl 0Q0Xa5dqLc3G6Tt+ymkOMVrfRebMbkdodP0l9R2UmxR+0zxqsnBzGe5yWJGo85vZFXmcIcWNzFI5 zb4EJOTmbeqtDRjb6uGPYtfMl8b/3s49bRM+3D8WBWsT3JMvOa4s4I5mTQF6pK00uKgZdw4b+/qk YkyWGKcsccbsbHZaXpACWuKw7tqMj2LXtXk/o8hIlpyuCB21Ghvc+lKg4zj4e1cOMdde3XKBEmz9 nEd8hb2AfMko5Anxruh0h/+fQGjb/c/+C/iABLoG77DyLcBDasbrA2vjzh9w7CAt3mKf6G/WvPwD bX2cIoGJqjYAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDgtMjhUMTQ6MDU6MTIrMDA6MDBCuCXs AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA4LTI4VDE0OjA1OjEyKzAwOjAwM+WdUAAAAABJRU5E rkJggg== X-Now-Playing: Mike Oldfield's _Tubular Bells (1)_: "Tubular Bells Part Two" Date: Fri, 28 Aug 2020 16:11:03 +0200 In-Reply-To: <878se0gc25.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 27 Aug 2020 21:48:18 +0300") Message-ID: <87imd2vp1k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Maybe the final separator (colon) should be customizable as well. > What if someone wants to use the same character as used in shell, i.e. '$'. > Then moving the currently hard-coded colon to the de [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Dani Moncayo , Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Maybe the final separator (colon) should be customizable as well. > What if someone wants to use the same character as used in shell, i.e. '$'. > Then moving the currently hard-coded colon to the default value > " (default %s): " will allow the users to customize it to > " (default %s)$ " Good idea. I'll adjust the variable and the code. > Shouldn't one of these calls (namely 'describe-function') be further > simplified with > > diff --git a/lisp/help-fns.el b/lisp/help-fns.el > index d302c05283..617f6ae5e8 100644 > --- a/lisp/help-fns.el > +++ b/lisp/help-fns.el > @@ -151,9 +151,7 @@ describe-function > (let* ((fn (function-called-at-point)) > (enable-recursive-minibuffers t) > (val (completing-read > - (if fn > - (format-prompt "Describe function" fn) > - "Describe function: ") > + (format-prompt "Describe function" fn) > #'help--symbol-completion-table > (lambda (f) (or (fboundp f) (get f 'function-documentation))) > t nil nil > > But something is still wrong - with the nil default value the prompt becomes: > > "Describe function (default nil): " > > whereas it should be > > "Describe function: " Yes, that's why you can't use format-prompt when there's no default value. > It seems 'format-prompt' should not use 'minibuffer-default-prompt-format' > when 'default' is nil. nil is a perfectly valid default value in many prompts. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 28 10:13:49 2020 Received: (at 12443) by debbugs.gnu.org; 28 Aug 2020 14:13:49 +0000 Received: from localhost ([127.0.0.1]:47045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBf8W-0000jJ-Nz for submit@debbugs.gnu.org; Fri, 28 Aug 2020 10:13:49 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBf8V-0000j1-SL for 12443@debbugs.gnu.org; Fri, 28 Aug 2020 10:13:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nglT6kaIePAZuFfy0nrYF0iYieOOJ5jFZnar0oIoPZ4=; b=VAyPlQVlH+yRwvh5RBx2ibdfjo UPNPsVqps93PVt2hSpr3Fc9X1FTsM1LWAYmZtQSKXwqxMHU2EVwSMgApYDooF8ZxwqAeYN8wPZHuk 6lM/zieMk7exQPfD5Dp2B9YhJ+CSI4KqjvFdiNOQ5LeMaS/Hruemc+uukLuviWIK62Bs=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kBf8N-0002y7-56; Fri, 28 Aug 2020 16:13:41 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEWpuctxj8g9R1r/ //8QJ8S9AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QIHA4FDBXhxbYAAAFlSURBVCjPTZIxj9swDIUf jVMGTyrQ3JCps38FPWS5yQHMAPXcpf4V7trJGW73kBxs/so+ykXuOAj6RIl8TxIgZh2ecTTkT+jT Z8rMdF8FZNj2hPYc3B/AsG3gWrVB3GfUExNVzIIXQl37HgWqMh19FuA0/Xh118Y7Aw5LSqaHzrXl 0Q0Xa5dqLc3G6Tt+ymkOMVrfRebMbkdodP0l9R2UmxR+0zxqsnBzGe5yWJGo85vZFXmcIcWNzFI5 zb4EJOTmbeqtDRjb6uGPYtfMl8b/3s49bRM+3D8WBWsT3JMvOa4s4I5mTQF6pK00uKgZdw4b+/qk YkyWGKcsccbsbHZaXpACWuKw7tqMj2LXtXk/o8hIlpyuCB21Ghvc+lKg4zj4e1cOMdde3XKBEmz9 nEd8hb2AfMko5Anxruh0h/+fQGjb/c/+C/iABLoG77DyLcBDasbrA2vjzh9w7CAt3mKf6G/WvPwD bX2cIoGJqjYAAAAldEVYdGRhdGU6Y3JlYXRlADIwMjAtMDgtMjhUMTQ6MDU6MTIrMDA6MDBCuCXs AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA4LTI4VDE0OjA1OjEyKzAwOjAwM+WdUAAAAABJRU5E rkJggg== X-Now-Playing: Mike Oldfield's _Tubular Bells (1)_: "Tubular Bells Part Two" Date: Fri, 28 Aug 2020 16:13:37 +0200 In-Reply-To: <878se0gc25.fsf@mail.linkov.net> (Juri Linkov's message of "Thu, 27 Aug 2020 21:48:18 +0300") Message-ID: <87eenqvoxa.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Maybe the final separator (colon) should be customizable as well. > What if someone wants to use the same character as used in shell, i.e. '$'. > Then moving the currently hard-coded colon to the de [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Dani Moncayo , Stefan Monnier , Stefan Kangas X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Maybe the final separator (colon) should be customizable as well. > What if someone wants to use the same character as used in shell, i.e. '$'. > Then moving the currently hard-coded colon to the default value > " (default %s): " will allow the users to customize it to > " (default %s)$ " Actually, I changed my mind -- the format-prompt function is about formatting the default value. There'll still be many, many prompts out there that aren't sent through the function, so it'd be inconsistent to allow changing the ": " on some prompts but not others. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Aug 28 11:21:56 2020 Received: (at 12443) by debbugs.gnu.org; 28 Aug 2020 15:21:56 +0000 Received: from localhost ([127.0.0.1]:47178 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBgCS-0006tn-7f for submit@debbugs.gnu.org; Fri, 28 Aug 2020 11:21:56 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11960) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kBgCQ-0006ta-U0 for 12443@debbugs.gnu.org; Fri, 28 Aug 2020 11:21:55 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 15868808BB; Fri, 28 Aug 2020 11:21:49 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 66A1780917; Fri, 28 Aug 2020 11:21:47 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1598628107; bh=/3eg1igO/uh4W4E7mxmaR/tYnClm3gV7jawmI0YniLM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=C1pja5Lqs5VBBaRMaIWqPQz0QC+YoLjWHz23/htu48e0CIelvxvBxq8eBziv3hdNq qkHH5pxhsRuwyONLFt5ee8XRGRR2GOCQPl441xTijPQ6+0giZ18AQOUDqZOn0ZAI9T V7O7t2kBYSyq2f4KASA3WZRrXGhCtZSj6qx/wtdmHyCT4lGuthMGCXS4ifBE4l1Rug 26piNzy2COGOH3W8JxSwKsgnAaCE6S0LS27jiRKxBfKunHi40TeyN2BOxdxejfCf3G UVd7GXNo8jlhkJ6wOQmnx+ZXuVKOKDZHWN4lb+THfw93w0xoR9m/kfO9txTA3E4a28 IPDXhJz7sVCOw== Received: from alfajor (unknown [45.72.232.131]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 0759B1204C4; Fri, 28 Aug 2020 11:21:46 -0400 (EDT) From: Stefan Monnier To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Message-ID: References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> Date: Fri, 28 Aug 2020 11:21:40 -0400 In-Reply-To: <87imd2vp1k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 28 Aug 2020 16:11:03 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.060 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) >> It seems 'format-prompt' should not use 'minibuffer-default-prompt-format' >> when 'default' is nil. > nil is a perfectly valid default value in many prompts. No, `nil` should mean there's no default. `"nil"` is a perfectly valid default value, OTOH. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sun Aug 30 09:16:29 2020 Received: (at 12443) by debbugs.gnu.org; 30 Aug 2020 13:16:29 +0000 Received: from localhost ([127.0.0.1]:49607 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCNC9-0006PO-G7 for submit@debbugs.gnu.org; Sun, 30 Aug 2020 09:16:29 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kCNC7-0006P8-3y for 12443@debbugs.gnu.org; Sun, 30 Aug 2020 09:16:28 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=AU3V3+51zTQ8Y6ssYmKgj4nTOoIoayLJogkzyGDrHdo=; b=C6DKoemxajq4xpjmBlEKqih9Tr DbDrNRL8iE9OsB4zyDecmpzgt6Tvla+PQukXpT5zR6RCiDB+VHcl9Yi5BzUrJ1xfNNcj1Hw0P1Trw XbKw3Oilw18Yvzr7d4aXAVXm4+kfAyUG9Hv2bEXCO82fbGY09AcpgzXPtXSWIIx6WSl8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kCNBt-0000u3-Ki; Sun, 30 Aug 2020 15:16:19 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEXVzQ2vb05FPRHd 1CTYtlnz4Kb8+M3hqpD///+XVK9fAAAAAWJLR0QIht6VegAAAAd0SU1FB+QIHg0MNERusLMAAAGl SURBVDjLbdRdjqMwDABgaC8w7iDxunCCkeACqGbyvJqYXKDJezV4fP11YNsmYSIkUD7F+bOpqqqq Lxfourfq0KDvO31eHX3/J75q7Vbo9fM84pDC1vR7pCWQ/XiFOsE7wPswkyOixQ7D8KBFO4h5gxAo 3B4wa4cVFtYBIfjlCZ8RjCBtEPwtDeUmoQf4FFYR+Q8hB3JieQf7hBCjiCBvy/oFZIfX5MHHda3Y 7rOUgNjKEZjNejdGuISVZZ0aXXMJwCINtK6Evw2IGDDOcbrB4F0DiJOiFGABrjihyJzvgwgaO7at yFrCfUajk4iUO1/lrrOLuGXxXylctbMVa3TrlIKNYL7HeLuUnK6HxvB1xGs8eLrlQDga2kYkECyP jMhewWdAs2GLP9uNLdkIFHaGA/8CekyyHMCjwNSu5hBKlzVBg0iOE/iMgBHiCJdBWBER9Bw1jXKw EwBgzPsSzpPeIR3Bz5pXMa1IQgZ68vuAA8RsXGJGUgmv9oTzUEMNb7F4Idbvs2qr6rTX+qPiU+gu +4+g77octh9KH7WATgPVl1MZ6tD+AZTn6uPDFIGIAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA4 LTMwVDEzOjEyOjUyKzAwOjAwbGa9+wAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOC0zMFQxMzox Mjo1MiswMDowMB07BUcAAAAASUVORK5CYII= X-Now-Playing: Archie Shepp's _The Cry Of My People_: "The Cry Of My People" Date: Sun, 30 Aug 2020 15:16:12 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 28 Aug 2020 11:21:40 -0400") Message-ID: <87k0xgtgtf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Stefan Monnier writes: >>> It seems 'format-prompt' should not use 'minibuffer-default-prompt-format' >>> when 'default' is nil. >> nil is a perfectly valid default value in many prompts. > > No, `nil` should mean there's n [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Stefan Monnier writes: >>> It seems 'format-prompt' should not use 'minibuffer-default-prompt-format' >>> when 'default' is nil. >> nil is a perfectly valid default value in many prompts. > > No, `nil` should mean there's no default. > `"nil"` is a perfectly valid default value, OTOH. I imagined there was a read-symbol function in use somewhere that used symbols for completion/defaults, but apparently not -- it's all completing-read with an intern at the end? I'll adjust read-prompt to interpret a nil default as "no default". -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 11:02:41 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 15:02:41 +0000 Received: from localhost ([127.0.0.1]:46817 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEwBk-0004Ic-U2 for submit@debbugs.gnu.org; Sun, 06 Sep 2020 11:02:41 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45742) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEwBj-0004DS-1X for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 11:02:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=omAUrtKjU1YdLgfdQlIZ1GNyEaPftX13zHuu3R6VMNc=; b=Tirc76vDaNOVLsSscN5TT5SDnt kewB+HWhA3s+3GlkKpH6RvG4VUiew0Fw8CfBpIvEdeSeUNWlq5Cj43Z7Ucv4SViryEdBV4yG0grar ycHHXmwAFw9PMW3pC8XH+PYq2PVa22/WCkkSOMUJM8iF2VXBiDnCl+hK1Nzh4AluPTLU=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEwBZ-0008Qy-HB; Sun, 06 Sep 2020 17:02:32 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> X-Now-Playing: Sylvan Esso's _WITH_: "Uncatena" Date: Sun, 06 Sep 2020 17:02:28 +0200 In-Reply-To: (Stefan Monnier's message of "Fri, 28 Aug 2020 11:21:40 -0400") Message-ID: <87sgbv7xtn.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: OK, the first sweep has now landed on master (I basically grepped for " (default %" and then did the changes. Boy, were there many different ways to "optionally add some defaults" in the code... 78 files changed, 316 insertions(+), 453 deletions(-) Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) OK, the first sweep has now landed on master (I basically grepped for " (default %" and then did the changes. Boy, were there many different ways to "optionally add some defaults" in the code... 78 files changed, 316 insertions(+), 453 deletions(-) Look at all the lines saved! :-) There's also some of the prompting functions that have some support for this general idea, but in different ways: (defun read-regexp (prompt &optional defaults history) [...] (input (read-from-minibuffer (cond ((string-match-p ":[ \t]*\\'" prompt) prompt) ((and default (> (length default) 0)) (format "%s (default %s): " prompt (query-replace-descr default))) (t (format "%s: " prompt))) nil nil nil (or history 'regexp-history) suggestions t))) and (defun read-input-method-name (prompt &optional default inhibit-null) [...] (if default (setq prompt (format prompt default))) Hm. I had some further notes in here, but... I put them in a buffer I didn't save. *sigh* I should go have lunch. I mean dinner. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 13:46:53 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 17:46:53 +0000 Received: from localhost ([127.0.0.1]:47079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEyke-0004Fz-QQ for submit@debbugs.gnu.org; Sun, 06 Sep 2020 13:46:53 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47108) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEykc-0004Fl-KR for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 13:46:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zGx7uZLH4WHQGj25V+LEY1/hl8Z1Ic7cf8t/IK8Ep3U=; b=o3JXRKIcGnJ2LaogJ4IlgZnPBl EYf06XyEMfeUhlLrabNFK9c9s9w5RJFVUXxWRCv8Yiw7KfWEAFyksvnVC9Lw2xAR6xLHi7ruZ/OQx 2Ve6cB35unhTqErIHjL+FGUaQscsIp+/JrfhC6QEAwUVuJb6TgqDFRsxme8+8Iu3CbmM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEykS-0004EU-7y; Sun, 06 Sep 2020 19:46:43 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEVBLzo3O5Q6QJv/ ///qBynDAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJBhEaCMpodTcAAAGRSURBVCjPPVExjtswEBwa RwJJdUVUyNU1AYK8ggLuAQzAIWRXKizjTq+Qr0jtIjTOrlycC/OVGeqCEAK1g92dnVkC/88aeDTP n7FvAoI7d16xydMV4Wu5HBX73TgAP0u5mqvz38YAjKmU9buBzTOwc6WUDxWe1RrtpEKBfiEVmLHC j89ph3uA83iqwB3uY9h6DEvKlcvt5M1VaYf1Nm/G7AbY0M7rQnLPCtZ+unC/SqtBolqWkpNLRhmw TCU50gc0HW+/T71ABNSasK9AcviaIkYacgMk8kU2usyTr2U8nHknuyOiaF6VfkvSpoTncuYnBAGT Fb9pBYbT/Ctn8Uf5kZHxvSWRZUaWtruWvaGXUJiP0HLjBPThKOW8JY9OJOpauBFi3QJtnQc0VOrx H7C65gf7pZYJHM1sk2UbKhjsbGmi21U9WlbbI5pF3HM7NxFErGxTma1HWvV4aEQ66OGoB2r67978 UUEQoNQZLtMEOgbH6rcCcuc4VvMLkK+qLMcKlks7CstfsyS9OlWvuOoT+L/9yo/D5a1fkAAAACV0 RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0wNlQxNzoyNjowOCswMDowMAev8gQAAAAldEVYdGRhdGU6 bW9kaWZ5ADIwMjAtMDktMDZUMTc6MjY6MDgrMDA6MDB28kq4AAAAAElFTkSuQmCC X-Now-Playing: Stephan Mathieu's _Radiance (9): Feldman_: "Feldman" Date: Sun, 06 Sep 2020 19:46:38 +0200 In-Reply-To: <87sgbv7xtn.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 17:02:28 +0200") Message-ID: <877dt6er29.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > OK, the first sweep has now landed on master (I basically grepped for > " (default %" and then did the changes. The next step here is probably to fix the cases where there's a default, but where the prompt doesn't mention them. Like: Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > OK, the first sweep has now landed on master (I basically grepped for > " (default %" and then did the changes. The next step here is probably to fix the cases where there's a default, but where the prompt doesn't mention them. Like: (defun last-chance (symbol) [...] (completing-read "Symbol: " obarray nil nil one nil one))))) `one' is the default here. Has anybody written an Emacs-Lisp-aware grep? That can list all hits of completing-read where the seventh parameter isn't nil? It doesn't sound that difficult to do, but I thought I'd ask before I start typing... -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 14:10:56 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 18:10:56 +0000 Received: from localhost ([127.0.0.1]:47131 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEz7w-0004pc-0f for submit@debbugs.gnu.org; Sun, 06 Sep 2020 14:10:56 -0400 Received: from quimby.gnus.org ([95.216.78.240]:47336) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEz7u-0004pO-5o for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 14:10:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=tbDtS3P1JYJovPIAxm8fHu0mqwVVTuJhPEJL19o21lE=; b=gqOjmlLn1ysxvKR6lnQaDS2RTk RrhZM3NydvbSGDGaDVX+/K5LHEWXgaIO3fmP05s2HgsEsKZC60L0OFmue6wAtq0mqO8yRIOKPGcr0 ZAEhBQXZt/GB8Wsv0MvUvV2A+VwtWKK+ifXuZstTDwGKwrP25TLCVI9W0vIVTZ2LjaEY=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEz7k-0004Tz-9a; Sun, 06 Sep 2020 20:10:46 +0200 From: Lars Ingebrigtsen To: Stefan Monnier Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEVBLzo3O5Q6QJv/ ///qBynDAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJBhEaCMpodTcAAAGRSURBVCjPPVExjtswEBwa RwJJdUVUyNU1AYK8ggLuAQzAIWRXKizjTq+Qr0jtIjTOrlycC/OVGeqCEAK1g92dnVkC/88aeDTP n7FvAoI7d16xydMV4Wu5HBX73TgAP0u5mqvz38YAjKmU9buBzTOwc6WUDxWe1RrtpEKBfiEVmLHC j89ph3uA83iqwB3uY9h6DEvKlcvt5M1VaYf1Nm/G7AbY0M7rQnLPCtZ+unC/SqtBolqWkpNLRhmw TCU50gc0HW+/T71ABNSasK9AcviaIkYacgMk8kU2usyTr2U8nHknuyOiaF6VfkvSpoTncuYnBAGT Fb9pBYbT/Ctn8Uf5kZHxvSWRZUaWtruWvaGXUJiP0HLjBPThKOW8JY9OJOpauBFi3QJtnQc0VOrx H7C65gf7pZYJHM1sk2UbKhjsbGmi21U9WlbbI5pF3HM7NxFErGxTma1HWvV4aEQ66OGoB2r67978 UUEQoNQZLtMEOgbH6rcCcuc4VvMLkK+qLMcKlks7CstfsyS9OlWvuOoT+L/9yo/D5a1fkAAAACV0 RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0wNlQxNzoyNjowOCswMDowMAev8gQAAAAldEVYdGRhdGU6 bW9kaWZ5ADIwMjAtMDktMDZUMTc6MjY6MDgrMDA6MDB28kq4AAAAAElFTkSuQmCC X-Now-Playing: Stephan Mathieu's _Radiance (9): Feldman_: "Feldman" Date: Sun, 06 Sep 2020 20:10:42 +0200 In-Reply-To: <877dt6er29.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 19:46:38 +0200") Message-ID: <87363uepy5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > It doesn't sound that difficult to do, but I > thought I'd ask before I start typing... Well, whaddaya know, I started typing. *sigh* Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > It doesn't sound that difficult to do, but I > thought I'd ask before I start typing... Well, whaddaya know, I started typing. *sigh* Anyway, this seems to actually work, and I'm amazed at how speedy an all Emacs solution for this is: Running it over all the Lisp files on trunk takes 3.2s (on this laptop). Is this something Emacs should have? It's not very... user-friendly; you have to write the predicate yourself, but it should allow people to refactor with slightly more ease than with `M-x grep'. Usage example: (lars-find-sexp-in-files "~/src/emacs/trunk/lisp" "[.]el\\'" 'completing-read (lambda (form) (and (nth 7 form) (stringp (nth 1 form))))) (defun lars-find-sexp-in-files (directory match symbol predicate) (pop-to-buffer "*matches*") (let ((inhibit-read-only t)) (erase-buffer) (dolist (file (directory-files-recursively directory match)) (message "%s" file) (lars-find-sexp-in-file file symbol predicate)) (grep-mode))) (defun lars-find-sexp-in-file (file symbol predicate) (let ((lines (with-temp-buffer (insert-file-contents file) (lars-find-sexp-in-buffer symbol predicate)))) (dolist (line lines) (insert file ":" line)))) (defun lars-find-sexp-in-buffer (symbol predicate) (let ((lines nil)) (while (re-search-forward (format "(%s[^-a-zA-Z0-9]" symbol) nil t) (let ((start (match-beginning 0))) (goto-char start) (let ((form (ignore-errors (read (current-buffer))))) (when (and (eq (car form) symbol) (funcall predicate form)) (goto-char (1+ start)) (push (format "%d:%s\n" (count-lines (point-min) start) (buffer-substring-no-properties (line-beginning-position) (line-end-position))) lines))))) (nreverse lines))) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 14:49:19 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 18:49:19 +0000 Received: from localhost ([127.0.0.1]:47165 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEzj5-0005mG-5x for submit@debbugs.gnu.org; Sun, 06 Sep 2020 14:49:19 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:49984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEzj3-0005m2-MJ for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 14:49:18 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 086IiHdV064422; Sun, 6 Sep 2020 18:49:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=07IvyBHTCFG0n3nsyDYWYcQUo6O2k05TKIC+aPT09jE=; b=kgTgQfBwS7m/b8M5Jx7+Wy2T9u0d+oEv7ZTF5I0FsyDRqKZY+tHEOvqK8s6O5lFG3r11 jpYCzwog7nGe1mCjvKc5kNqm6JNi6W0KN7sOA3xFCrUvKTf4UdRqDDQ1e85oWmqSbjjs vAPBYirNUQ9YUDAJMH83UTnnpBF+6LPJqfryLSGmmNqZvSItEmZoc6yOZj67FW2kNsVE Djnztq0+kMCPZ3MJjHfH5zEycREQVs6D+bZ1hi5D1XCbYiUimxBPGs1MOuabunsNIBqY QcZH1Oei0JMFo1MoPzA1DyYGpDKHrs/Rxs/NgEWKY5pMNuMqK7PlEkQ5q4sYwRVxjmTE Pg== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2120.oracle.com with ESMTP id 33c3amkghc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Sun, 06 Sep 2020 18:49:11 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 086IiqGd021355; Sun, 6 Sep 2020 18:49:10 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3020.oracle.com with ESMTP id 33cmjxg9dt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 06 Sep 2020 18:49:10 +0000 Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 086In4Dh018218; Sun, 6 Sep 2020 18:49:09 GMT MIME-Version: 1.0 Message-ID: Date: Sun, 6 Sep 2020 11:49:03 -0700 (PDT) From: Drew Adams To: Lars Ingebrigtsen , Stefan Monnier Subject: RE: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> In-Reply-To: <877dt6er29.fsf@gnus.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.5044.0 (x86)] Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9736 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 malwarescore=0 phishscore=0 mlxlogscore=788 bulkscore=0 adultscore=0 mlxscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009060192 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9736 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 priorityscore=1501 clxscore=1011 bulkscore=0 malwarescore=0 lowpriorityscore=0 mlxlogscore=802 suspectscore=0 adultscore=0 mlxscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009060191 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12443 Cc: Michael Heerdegen , 12443@debbugs.gnu.org, Stefan Kangas , Dani Moncayo X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Has anybody written an Emacs-Lisp-aware grep? That can list all > hits of completing-read where the seventh parameter isn't nil? > It doesn't sound that difficult to do, but I thought I'd ask > before I start typing... Yes. See Michael Heerdegen's `el-search.el', in GNU ELPA: https://elpa.gnu.org/packages/el-search.html Not a grep. Better. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 16:18:35 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 20:18:35 +0000 Received: from localhost ([127.0.0.1]:47223 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF17T-0007rD-Bz for submit@debbugs.gnu.org; Sun, 06 Sep 2020 16:18:35 -0400 Received: from mout.web.de ([217.72.192.78]:44979) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF17R-0007qz-DF for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 16:18:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1599423494; bh=I54CcqoHlu0YvbgiHA5YYdCpN3217/IfBv2PqRX6OSg=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=BLhyrtPYAoQCoaYnwUCWhh2nJ8SR0mWN2JTAek0zYvH7awHbGsKOXRI0dKS3xueSb rqKgrU86fvRocFFOdDm2SOHkcpJV2iVj8qN1LaNc1ysW9wvQv4uRa8C1EbXYtjmJhK bzy3WUCbwHYGimkO8c71294HcYFb+v8c+UqjcupY= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.218.220.78]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1M6HK6-1kCqKL45TU-006vt0; Sun, 06 Sep 2020 22:18:14 +0200 From: Michael Heerdegen To: Drew Adams Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> Date: Sun, 06 Sep 2020 22:18:12 +0200 In-Reply-To: (Drew Adams's message of "Sun, 6 Sep 2020 11:49:03 -0700 (PDT)") Message-ID: <87tuwaslq3.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:nfHIMLhsE0yRo19c1onteStdeI7yaCwbQdobAxl8Ghr9f/V0UnS i0zPIDl80FdZVfGDtz59dzyNNhP5divMbjGTbmnt+uESUitJYrjCYTYFnLXYbaBaNmCSfYu lj+yONzKYeGkJW+HkTuU90CMuBufLklv0GYi6KTVsQNB78OB2SBH5qIPgFMHLf86kc8Kr5g 9I0xmlo8bjbTXC2Fjczpw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:f5B6N7Xa3Ps=:WorDWPI1hwX7x1wy4MzWNM /69VP8Ik0YpCJuWiI/t+PoOttyPv3P1b7QSKfZP74+v3BehKS8QMXpJWccfPmzEHPYJSiZaLq AE//8HYP6iZ6ZhPaCu2aJzYmQp5yJmQhT4aZJd6sc0AS+RauTF6WQ+LEXt5cGwKTXWj37ZLco Rg5LneJDyOrDo55s9X0r2NCMMS8cRNbguGdX6wP26S3otPZzVwwkNXgEN+Y6yGz3lvoCrUTgV 4uYBZqZ4g1PjvHLXHq5p2c7FF5tfiOXKN3mtxKv0Of1WBevs9cMd3wTnYsqcvQ71JI05YHdx1 IwMz4ssl/pyi97yACBD47fNYu8zQ4oJgZSDBagp6Le/erKU46bQ4unnNywrTbs3SyS89uxor9 Ejdj7PcAH0Mc1CvIV/4Ofo/zyZqbokILt7/D/PR51ETpJlsm9vpATjx2Uy8nT6i42w5R+Lj0c ZChLJH1RzspCyEw6DxOLobvmorIpZvW9/GGKqPZ4RppgVBdhbLEL3tfdEFatxXHdbp5dzKhQe SC4acr/SAceMRngEF7uv4EJQTksxo2+nm76mBnPXXuBrDqpFV6qcSbD/UVxH91Ej6Y8Ab+LUR Usu6uMsonZutrZwyMqLD6AWSZkYO4rmHoAXq9wnnMKJzW3Mlr1ih1ekEHZXMGPeRWvyfUvkRE aUVEQHnx0VB7bJGFBxw6Un9NPi12ToWhGMhkpZpRN+9d0fZFk9jnYarNn9s+9HhysuRoSUsyS CqCTSHcP7M/XWcSFIfzIp2Y4Pp9CmUUOU9ptCUYeXb9L/CNP5fO4vWU9/pidTi1X5s7hoSOW3 csXMX18Zha7oDO14Ak+MVMLN7HTyR2McM8hNtzcmWXI6MJ/oTLZCO8QkBaNOIctQF0YtydsM4 24G/PEk+XcndZh2sMPb3BTlljvLRKTVBlEjHj1NLugrXrRhsmXJ3a+WF9mcsdlZzoOt6QDGbQ kTuBmVW1VOJX4ee1/jzjCMHdl/iWjUDXXkDNAaaL5yf2UvhkS3vMcNxvICraNeFYny4sD5JNv WzmWZNjQxtNsdcN3zCdqY0VDEZlCbMl0VtPAbdLP0yvNxMEmnLFY7LaqTq83Q+Q0UuynuzJ0P ulR6b5VqmNnZ6d4sgRQo/fEqj4bMhmEH2VRyL0lIEO8jbyYIne/KGC2bs7VbtmCeo0WngvRsI 2ACc567da4OyvSctdsxPgEH2QkKJYRmNwdpl5oAZihemqef5QaNMAJ2s5LNw++ua8FUHkrcEl uk3AbenZ3jQ+nmWjDuHl2odlLSzbETKnK8ec99w== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12443 Cc: Lars Ingebrigtsen , Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Drew Adams writes: > > Has anybody written an Emacs-Lisp-aware grep? That can list all > > hits of completing-read where the seventh parameter isn't nil? > > It doesn't sound that difficult to do, but I thought I'd ask > > before I start typing... > > Yes. See Michael Heerdegen's `el-search.el', > in GNU ELPA: > https://elpa.gnu.org/packages/el-search.html Yes, thanks for the mention. I heard the author is thankful for any feedback. Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 16:39:08 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 20:39:08 +0000 Received: from localhost ([127.0.0.1]:47229 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF1RM-0008Jz-4n for submit@debbugs.gnu.org; Sun, 06 Sep 2020 16:39:08 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF1RJ-0008JT-Lc for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 16:39:06 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=5sP1sYA2XjpS+G2PRD6RjysM8G/KKfa8gHKegk0OLUo=; b=NT109hwFZ8v2F5nPN8GQe87aeq rK6MQbtud+yAQuQrK9NRd1plUU5qkVBtMkr9uWeNIAGf11QnmT1YkfGLRhwGt6Xj0Da0tS2ZwDhcB mO5ec4fgoC+Me5yMhyinfz6BPy00bURnqwlOS3cKusJXZVzw9mjndVFzqrovS/j0gM4U=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kF1R5-0005fN-Qy; Sun, 06 Sep 2020 22:38:57 +0200 From: Lars Ingebrigtsen To: Michael Heerdegen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87tuwaslq3.fsf@web.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUDAwUnIBVUSi5f XE9KNxwuLiurqYqXkWmcbR+jeDzW1afTrTs+Pj309Nv///8Q/LkRAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+QJBhQfHkUA9sgAAAGbSURBVDjL5ZLPSwJBFMe/o+59xtp7GkGHDsYkXQwK7L7LMnXxEAQZ UaAutRF0KCIq/wEjOsRGUeCpIDOCQpYgvNZB8n/prZbFuv9A9Abmx/u8efPm8QXYsCRLJrPZWfFj HH/UlCkEwPo+EFnaPNwzERvdCYDoxcGNHz1wGwRX5VLyGdBKQbBcn/AB7CCoXI/kzBAQ278USljr kEFQPwf4lItGEDwWqKZJAeu3N0XgepxHnY9AOMVGLkb4VPuNQ+95TcYVV1GXo9oqGrAYFA0dWjrj mZ6YL3JWbRkcw15D5VQzBy2TVg0prQTX2nkDWFLSkjKtoJlg9AajpbpKmV0YjETCoIExOvvw1aXN Ir4aT0D4bTc6t0A/7wGw7o6N+bPeA8rUu8qLSLpF5ZodKVJVGUVGb8e7QEk6eooSe7ofAyub9jNY etMPVL0GaE5pBhCIB1XCNvIJztYx2Kefla2SPXf2XeKvDq85jr290C84fuo4TrsQAsq13aP36X6A 8l3lnof4cXJ/nIgPhYDth9rhVioEvDi2PfmEf2OfB6phSa7JzhIAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMDktMDZUMjA6MzE6MzArMDA6MDCYj1y6AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5 LTA2VDIwOjMxOjMwKzAwOjAw6dLkBgAAAABJRU5ErkJggg== X-Now-Playing: Mike Oldfield's _Tubular Bells (2)_: "Tubular Bells Part One" Date: Sun, 06 Sep 2020 22:38:50 +0200 In-Reply-To: <87tuwaslq3.fsf@web.de> (Michael Heerdegen's message of "Sun, 06 Sep 2020 22:18:12 +0200") Message-ID: <87pn6yd4it.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael Heerdegen writes: >> Yes. See Michael Heerdegen's `el-search.el', >> in GNU ELPA: > >> https://elpa.gnu.org/packages/el-search.html > > Yes, thanks for the mention. I heard the author is thankful for any > feedback. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , Drew Adams , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Heerdegen writes: >> Yes. See Michael Heerdegen's `el-search.el', >> in GNU ELPA: > >> https://elpa.gnu.org/packages/el-search.html > > Yes, thanks for the mention. I heard the author is thankful for any > feedback. Looks very impressive. The emphasis on interactive searches is a bit awkward, though (at least for me): I don't really want to be typing in pcase forms in the minibuffer, and I just want to get a occur-like buffer in one step. Is that possible? That would allow the users (i.e., programmers) to just put the stuff in a function and use at will. For instance (el-search-occurs "~/src/emacs/trunk/lisp" '`(read-string ,(pred stringp) nil ,_ ,t) 'recursive) or something. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 16:42:31 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 20:42:31 +0000 Received: from localhost ([127.0.0.1]:47233 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF1Ud-0008P4-Jo for submit@debbugs.gnu.org; Sun, 06 Sep 2020 16:42:31 -0400 Received: from quimby.gnus.org ([95.216.78.240]:48494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF1Ub-0008Op-BF for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 16:42:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=aUJegCBxIikrlDG5Apcq7413Yr5pTaqraELZx71iiQQ=; b=NIcDXnfQSL+txZSVK11ZKQ5nxm 9tc082ks3zPK5lFwutQn4vis6ZUrwWrOANDFO7v96R0j5JLIomhdAO7M8KhMFrU/NuXuaS6V4RToO 9zh81HdofOuPG7Ay0S1OC5GH9Jw1xQ9x9FSMVwllR0ddmVCwS9F1J6w50+lpgjDXiDVg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kF1UR-0005jS-TN; Sun, 06 Sep 2020 22:42:22 +0200 From: Lars Ingebrigtsen To: Michael Heerdegen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87tuwaslq3.fsf@web.de> <87pn6yd4it.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAALVBMVEUDAwUnIBVUSi5f XE9KNxwuLiurqYqXkWmcbR+jeDzW1afTrTs+Pj309Nv///8Q/LkRAAAAAWJLR0QOb70wTwAAAAd0 SU1FB+QJBhQfHkUA9sgAAAGbSURBVDjL5ZLPSwJBFMe/o+59xtp7GkGHDsYkXQwK7L7LMnXxEAQZ UaAutRF0KCIq/wEjOsRGUeCpIDOCQpYgvNZB8n/prZbFuv9A9Abmx/u8efPm8QXYsCRLJrPZWfFj HH/UlCkEwPo+EFnaPNwzERvdCYDoxcGNHz1wGwRX5VLyGdBKQbBcn/AB7CCoXI/kzBAQ278USljr kEFQPwf4lItGEDwWqKZJAeu3N0XgepxHnY9AOMVGLkb4VPuNQ+95TcYVV1GXo9oqGrAYFA0dWjrj mZ6YL3JWbRkcw15D5VQzBy2TVg0prQTX2nkDWFLSkjKtoJlg9AajpbpKmV0YjETCoIExOvvw1aXN Ir4aT0D4bTc6t0A/7wGw7o6N+bPeA8rUu8qLSLpF5ZodKVJVGUVGb8e7QEk6eooSe7ofAyub9jNY etMPVL0GaE5pBhCIB1XCNvIJztYx2Kefla2SPXf2XeKvDq85jr290C84fuo4TrsQAsq13aP36X6A 8l3lnof4cXJ/nIgPhYDth9rhVioEvDi2PfmEf2OfB6phSa7JzhIAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMDktMDZUMjA6MzE6MzArMDA6MDCYj1y6AAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5 LTA2VDIwOjMxOjMwKzAwOjAw6dLkBgAAAABJRU5ErkJggg== X-Now-Playing: Mike Oldfield's _Tubular Bells (2)_: "Tubular Bells Part One" Date: Sun, 06 Sep 2020 22:42:18 +0200 In-Reply-To: <87pn6yd4it.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 22:38:50 +0200") Message-ID: <87lfhmd4d1.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: >> Yes, thanks for the mention. I heard the author is thankful for any >> feedback. > > Looks very impressive. Oh, and `C-x `' (`next-error') doesn't work when jumping to the next match in the El Occur buffer. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: >> Yes, thanks for the mention. I heard the author is thankful for any >> feedback. > > Looks very impressive. Oh, and `C-x `' (`next-error') doesn't work when jumping to the next match in the El Occur buffer. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 17:50:27 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 21:50:27 +0000 Received: from localhost ([127.0.0.1]:47286 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2YN-0003iI-4x for submit@debbugs.gnu.org; Sun, 06 Sep 2020 17:50:27 -0400 Received: from mout.web.de ([212.227.15.4]:60271) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2YK-0003i3-ON for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 17:50:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1599429007; bh=BanP3nmg0Ij4KW71XrN+q/3Gq3QoN4Q9Dh0ARaD6eso=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=eggsustzvta3b0oNAkdxQk0v15v0RWbm7S9sKl9OEFKsYLP+g2DRddPAj1zeiBS11 d6fYwCofI+UBu0XaLGa9tu7Vp6dFC0fdJu8EpVqltijzS1nBSV7r+2jXgr4bHSfscN KDg4jwrm3XNvghR0H4IpcFVMIeJIGap1RAJSS+So= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.218.220.78]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0LsNpI-1khjU72agy-011z0W; Sun, 06 Sep 2020 23:50:07 +0200 From: Michael Heerdegen To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87tuwaslq3.fsf@web.de> <87pn6yd4it.fsf@gnus.org> Date: Sun, 06 Sep 2020 23:50:06 +0200 In-Reply-To: <87pn6yd4it.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 22:38:50 +0200") Message-ID: <87pn6yshgx.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:hTfBVX8XJUJzNDET1oU1El6HPBa7Q3J0RSq0d8hXcbHKO3aAlWX 6H+SrF6fagnUN8uK+G52kTYkAq79l2cWQ8OS0E7GjQ6CoAOucMM6ujiB27G/NykIw7VgC+L yfg9r5nbXs05P6IT6Ty/wDj5vcApyvieGaUjqmig/k7dS7zfKMviqQKt+79kI53N0SFJGb0 jDUYwcC9hCHj+jHCgCtnQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:yHby4anvF+Q=:pi//YX2OZkqYqDd4LzNiV5 HHJA5EbncrOuRmWZ0CUtTmpEZi4fGN88V0ujCt2y3F0zqle2pxU9qqdDcisgpfZ05ZSbBQ8J/ WrRXRWEFIpb/ZCbEjtqsB90L9kqTgxdsih7ygabOZnbKCVLn0nBpRzaJ4BqyZa67C552yzsQH ks3b8R4ZBrBIHvS9Yj+LiqFlVRIjB7twxoaHWnbbdTosFzy4LQjXn3MWHgsn2qtGFGYXBO7NX Wrunhl3VCCAIqrK0ZxNcLygGXUpzOx6mtztir+Fs3sUvJj10x6NbALZd6Bm70wLYWJjwVzKEC +WyAqjqosdocz7riSwScpTzHyxZa1282tkWxlAXsAljWqEjek1m5Ama4SU9/l2hcX83UoKzP3 HixOnR95Ho+Ir3gK695sc1GEVxgsGV9uLB8wApH1GbF8TsbhwdgLXU5owsF4ETbFfTXEqDULJ PsYNjxnB2k6QzB+hhXxuhWPOQM7vVqwuCWVUyTKyL/wsF6NHLyylT6qEJ01m+FCUCLqcNvzRu XAnInzrEP3h3abphlX3vrkt4zKPxR9jTn3EX/Uot6cukPd1xT2kstnpM0AvbCtUWKtKPjC/ob RbugUWJ90bKCibm5mXirHjvWrfnEOqo1jdV62wYx6mQEEj3Vf042A0mUszorZCgRNzC6PcZTb Z34e7LF+G8DbwHhcdwlHS9x3EagsspSthiEvqCVEcT7hL80KmMPoD9wmbNtYE6VwAhutgsqqk /B41MNFMonJxk6NpnWwat8tqmpAuVuAERae7WHhpKdfWpFq+VkbZ46b8bQpiOz0BE4X6JJKYS hJKwU/lHkvrwS2zNApj1NNk29gEj2ws5cZ5DdDp16W0wb36lM+MFixO5LvnCybqV1zDr4SLfe MBzuvJ51xpQsrZGxfQWc+9Jav2NaWBkvCe+ZKoJRidsOIboEgkht/k+W0ImQ6E6RmsRukchSx 6DCKxxgvT+wnS/3djTFg5bjUhlBtIUsS7kNt3lR5OMitg7UMPe2x90jm6Dp7HJt8uoY0eYx3K grfiCMuHfC1DQ7J4g5lepbpjh1GWnNnMeNEUQ1NVQNFRrxFnQPp3nvW24bz0N6dH773/6APzd /pmCizXwVjwFU9SK3wx4j5G3aAXG24t7QAz0WUAC74EbAv8mlqaGRL3KDAqBkq9iwha64lMV3 sfP11WWTWWwIU6zgCbZycVbXqM6/nV2FsyhOSDQIJdiTya/bjbsxN65cWPr68Wv0YDCHZXcpn rJ6eaWtoV1K2Yu1uU6w8z7+WP5D0Q5REIl5riDQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12443 Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , Drew Adams , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > I don't really want to be typing in pcase forms in the minibuffer The prompt has Elisp mode bindings and a separate history. M-RET to start occur. If you really want everything to be non-interactive > and I just want to get a occur-like buffer in one step. Is that > possible? > > That would allow the users (i.e., programmers) to just put the stuff in > a function and use at will. For instance > > (el-search-occurs > "~/src/emacs/trunk/lisp" > '`(read-string ,(pred stringp) nil ,_ ,t) > 'recursive) I didn't have this use case in mind. The current way to do this would write like #+begin_src emacs-lisp (el-search--occur (el-search-make-search '`(read-string ,(pred stringp) nil ,_ ,t) (lambda () (el-search-stream-of-directory-files (expand-file-name "~/src/emacs/trunk/lisp"))))) #+end_src I think. Do you think this is worth an own defun? Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 17:55:26 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 21:55:26 +0000 Received: from localhost ([127.0.0.1]:47294 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2dC-0003pI-1B for submit@debbugs.gnu.org; Sun, 06 Sep 2020 17:55:26 -0400 Received: from mout.web.de ([212.227.15.14]:41675) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2dA-0003p5-Fv for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 17:55:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=dbaedf251592; t=1599429315; bh=V+4YyAbXbIu0EUuqQB/Fmppu+6BDbmGDWzpziI8Dyp8=; h=X-UI-Sender-Class:From:To:Cc:Subject:References:Date:In-Reply-To; b=V0XpcdMHTTxPcB/HN6kSElKDNwZ4NtUdpMLHuUQeGQ3VdIxqvS2Sekq8HfuW3Hgj5 kbwj4f1sUG8MLRzwG+ims6eu5xHpHv64tzTUPGu/Mt/zYEiZMZO13WxmoXeKE0NMX5 jmDQ7pcTia+Oad3kNachkk5fap3KEDGhdn9FbjKw= X-UI-Sender-Class: c548c8c5-30a9-4db5-a2e7-cb6cb037b8f9 Received: from drachen.dragon ([94.218.220.78]) by smtp.web.de (mrweb006 [213.165.67.108]) with ESMTPSA (Nemesis) id 1MUCut-1k6TuD48Yd-00RHCp; Sun, 06 Sep 2020 23:55:15 +0200 From: Michael Heerdegen To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87tuwaslq3.fsf@web.de> <87pn6yd4it.fsf@gnus.org> <87lfhmd4d1.fsf@gnus.org> Date: Sun, 06 Sep 2020 23:55:13 +0200 In-Reply-To: <87lfhmd4d1.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 22:42:18 +0200") Message-ID: <87lfhmsh8e.fsf@web.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:I+2TC2XA7WtLqL8ZYNM/+HTGwQOOcIhNB7OPsFkWQYpGx9F6PqE 3gO7fjDK0IwhtK4dSMBENDqPTzZVFbv65HgkcQ2gTlqeOw+7ScDd6vqh6m6ELgFP3TaDk1h gztddcp+En007/ZOxmEiRV1NsCoo4OVW/5KgQUI8w+xdaKCBWfBGvowd0Agw4O5OpJKe3MG 6MWMB15xz7wgvDc4Wjp4g== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lNItAPvrzzI=:X2v9RVbJ3z9Odf6j54Lg8g rCCwFpa3rU9JeDjE2fMIqMj4JJRBKCF5M/pN1Njp6wUy8RFrxxKAF4IHggaKKCx7+euiroeQ2 3wzrlgUdln7bcCgiQedj8mhZyu87kDnMA3MtYaQuax4E9cKjeT+GnwDrq6TfC7wdS9HeOX0h9 1SWbONtxaWBWWIjHo1tDFd80l9vwfWWDsCqSvDGdBF7pc+Zm2wIYhy27JzBCPzEhGJm7MMp+T xnxKwRQMJ+rDK/ol14xkOi0i6cx+95T9PW7f+NSj5qJLiCk6Gp9CYsSHTyVRhx//1JPvNaY0u wJDbcX6fzakMuAUZ2TECpjEKRwVr65t9PqiS1ovj0BJ5GJofOR1aFABCmj9rKyv930TD1noTU DxZQQ7JCvC3klpkI6CyAnQzvJmSt8wQisjWiRuWydRZwsrLGzpy5jBa5/KWgPdFsuGX0Qgp6k W3la9gYS57kmJ6otv+JxB1/NxR1q0kEUGRgWeVgXF0h3QfgHHlhDZuSeKh7yftZJSzGPnJ2tr pPMJ5Yj7LGxWw9rewhuVEjflfqqPeZe7gYrsJLBGt2/c+3CgSCTNXD5feEhI4lcBlB3NZ8+yn EXYgemYC8njMrcIuILbn6MXVAQi03YK6hDRXqcidFkzmNGbPeSACAQSGksM+3UW/dGwe3kxG4 d2XUeZ5HZi5dPfNG4MAiWpLJCOm4l9ckm0i/LDFiYUQgfOzq1b2YWUzGsLLcd+gs3KLahSyyf FpUkAqU2MjEwNRqhoUVR7Oj3QaEzh3B6zJF8jJLyUL/iILBkX4Rw3nOaEcIIZcZ8v63J4UdFI PpnDhXm70wCoUNJIegDmRvBSePnxiexiLaG65ZMU6wslXZXTm0hGEPsQNYfD36QMqXaDqgxt5 TSBCOrL2+vY0SJAJhfRSDY6080XCHIUbEldTDi0B/T0pW92fy2+ri78KRkfUMmf2q+wskVZQY rOzedQUY+zIURYsfWRB3OythilVHHg5JeGpS0K03GFKdbduAdKonXzDiuIlDiNp4I2RzoY1M7 rctM0JoUD43NYlMbeGoAsu7hQSP5ClZVEydP/N8UQAhfo8pjelOP0ltAsIDyneGq4khXka4rU qY2yz9dP478tnJyPQsy8koQ4zPBYc6KOYXxmnJYf9IYIJsvb/QJEz7DPoa9os91YufE46oRis hSnRKo8h4gtHADvDpDuvEs0zoqMHxEiRS2iPRc/CSdkJyYuCz+/evkDz6Ae7IDqdyeRqvq03W VAOYiKWdXGPqkpOzR1lsPCbwNz0FTGJwMlt1tFQ== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12443 Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Lars Ingebrigtsen writes: > Oh, and `C-x `' (`next-error') doesn't work when jumping to the next > match in the El Occur buffer. Does `C-x `' mean you need to type these two keys repeatedly? (I made `n' and `p' jump to the matches.) Thanks, Michael. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 17:56:36 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 21:56:36 +0000 Received: from localhost ([127.0.0.1]:47302 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2eK-0003rM-Kt for submit@debbugs.gnu.org; Sun, 06 Sep 2020 17:56:36 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49096) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2eJ-0003r9-03 for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 17:56:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=jpwzkganj/r7eJLmJz21MAElfWMdO2mviucMToIaduk=; b=fGeyArb6B+p7MyYVtld1lJtkJm 8RVppzHGtDwfTmqZP/7z/TLsSqKkDVeWfZ2BH270QeTUVBjb8IIPUlNE90+nbWtG0gkSwSnF77ihh MfE7ExAw2h5NI0ywttGL7kzJgtztREHYLXJZek0AD6UJIfK7F5pyuDNkt/BFHFypKNhI=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kF2e8-0006LR-Jz; Sun, 06 Sep 2020 23:56:27 +0200 From: Lars Ingebrigtsen To: Michael Heerdegen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87tuwaslq3.fsf@web.de> <87pn6yd4it.fsf@gnus.org> <87pn6yshgx.fsf@web.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXw8PBdXV2joqP/ //8t2MV5AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJBhU0H0W1UQAAAAFTSURBVCjPjZGxasMwEIYv ojF2phI6ZDShMa6ewkuGbg00xngKpRLGT6GaJiSeMpQQMgnTmuSesifZqV269IaTvtPp190J4Jfd 5O8rt3S3O0UwFPXqXgopDXjzu2iYybk0aY6onz1nvhaRBZl46/XnI6XxAgvEM0fEI3C8XJYIVbiF WwN5BqyanMGHAE+ablYcCXjqG03EShMoW0elNIRg440PSaIxZiIt0H0yA0yjslfHBl7yRmZ87PXG L7qDKaoOxr2D5jkG5dmmGTdA1CNKn5gDlqLyQ/vo7E1qBE0wbcTIF9oKuH5PrVRUs3uV1u3GN520 LdIy0x2w/EP9wMB1ulJdzq5DoIRRG+z56/If481H0YfhHh7S+KteYp6e8j3AIanUNiwcr6a34nix yAIhNgeaRRSn1dPsVZTUNkvSJIsCKXZmWLFYJKtgtxFB19efcr4ByGtiboM3kVUAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjAtMDktMDZUMjE6NTI6MzErMDA6MDDg7P/LAAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIwLTA5LTA2VDIxOjUyOjMxKzAwOjAwkbFHdwAAAABJRU5ErkJggg== X-Now-Playing: Neil Young & Crazy Horse's _Zuma_: "Pardon My Heart" Date: Sun, 06 Sep 2020 23:56:22 +0200 In-Reply-To: <87pn6yshgx.fsf@web.de> (Michael Heerdegen's message of "Sun, 06 Sep 2020 23:50:06 +0200") Message-ID: <877dt6d0xl.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael Heerdegen writes: > I didn't have this use case in mind. The current way to do this would > write like > > #+begin_src emacs-lisp > (el-search--occur > (el-search-make-search > '`(read-string ,(pred stringp) nil ,_ ,t) [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , Drew Adams , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Heerdegen writes: > I didn't have this use case in mind. The current way to do this would > write like > > #+begin_src emacs-lisp > (el-search--occur > (el-search-make-search > '`(read-string ,(pred stringp) nil ,_ ,t) > (lambda () > (el-search-stream-of-directory-files > (expand-file-name "~/src/emacs/trunk/lisp"))))) > #+end_src > > I think. Do you think this is worth an own defun? I think so -- I've been using el-search now for a few hours, and what takes 90% of my time is typing `C-u M-x el-search-directory RET ~/src/emacs/trunk/lisp/ RET M-p' and then I can edit the pcase form, and then RET, wait a bit, and O, wait some more, and then I can start working. Well, OK, it's really `C-u M-x M-p RET M-p RET M-p', but that's not kind on the fingers, either. :-) I'd just like to plop the some expression in *scratch* and eval it after each pcase edit. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 06 17:57:21 2020 Received: (at 12443) by debbugs.gnu.org; 6 Sep 2020 21:57:21 +0000 Received: from localhost ([127.0.0.1]:47306 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2f2-0003sf-Tv for submit@debbugs.gnu.org; Sun, 06 Sep 2020 17:57:21 -0400 Received: from quimby.gnus.org ([95.216.78.240]:49120) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kF2f0-0003sR-FA for 12443@debbugs.gnu.org; Sun, 06 Sep 2020 17:57:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/uGlSooymwoUJWZ1zd8QP1DUfJ2rs/UUYj6C7TY2KmA=; b=XTx1SMS8TgoXrqQWs2V4FDBiJQ R2LE6OfMkzEPp3YS4qUfTUf1CaZQmU2ypkAzfpjXElJx5HHItDHEADaR/Rcn021vFIY/ewOfQ896D lctRHRxIhh1S4MWdIDQBhbZjFLmG5I/NBUMElaLiR91InyQIB/9cx33R4wektPaHFAps=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kF2er-0006Lk-BK; Sun, 06 Sep 2020 23:57:11 +0200 From: Lars Ingebrigtsen To: Michael Heerdegen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87tuwaslq3.fsf@web.de> <87pn6yd4it.fsf@gnus.org> <87lfhmd4d1.fsf@gnus.org> <87lfhmsh8e.fsf@web.de> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEXw8PBdXV2joqP/ //8t2MV5AAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJBhU0H0W1UQAAAAFTSURBVCjPjZGxasMwEIYv ojF2phI6ZDShMa6ewkuGbg00xngKpRLGT6GaJiSeMpQQMgnTmuSesifZqV269IaTvtPp190J4Jfd 5O8rt3S3O0UwFPXqXgopDXjzu2iYybk0aY6onz1nvhaRBZl46/XnI6XxAgvEM0fEI3C8XJYIVbiF WwN5BqyanMGHAE+ablYcCXjqG03EShMoW0elNIRg440PSaIxZiIt0H0yA0yjslfHBl7yRmZ87PXG L7qDKaoOxr2D5jkG5dmmGTdA1CNKn5gDlqLyQ/vo7E1qBE0wbcTIF9oKuH5PrVRUs3uV1u3GN520 LdIy0x2w/EP9wMB1ulJdzq5DoIRRG+z56/If481H0YfhHh7S+KteYp6e8j3AIanUNiwcr6a34nix yAIhNgeaRRSn1dPsVZTUNkvSJIsCKXZmWLFYJKtgtxFB19efcr4ByGtiboM3kVUAAAAldEVYdGRh dGU6Y3JlYXRlADIwMjAtMDktMDZUMjE6NTI6MzErMDA6MDDg7P/LAAAAJXRFWHRkYXRlOm1vZGlm eQAyMDIwLTA5LTA2VDIxOjUyOjMxKzAwOjAwkbFHdwAAAABJRU5ErkJggg== X-Now-Playing: Neil Young & Crazy Horse's _Zuma_: "Barstool Blues" Date: Sun, 06 Sep 2020 23:57:07 +0200 In-Reply-To: <87lfhmsh8e.fsf@web.de> (Michael Heerdegen's message of "Sun, 06 Sep 2020 23:55:13 +0200") Message-ID: <87363ud0wc.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Michael Heerdegen writes: > Lars Ingebrigtsen writes: > >> Oh, and `C-x `' (`next-error') doesn't work when jumping to the next >> match in the El Occur buffer. > > Does `C-x `' mean you need to type these two [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Michael Heerdegen writes: > Lars Ingebrigtsen writes: > >> Oh, and `C-x `' (`next-error') doesn't work when jumping to the next >> match in the El Occur buffer. > > Does `C-x `' mean you need to type these two keys repeatedly? (I made > `n' and `p' jump to the matches.) Sorry -- not in the buffer itself, but from the .el buffers. Like grep/compile/etc works. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 15:08:19 2020 Received: (at 12443) by debbugs.gnu.org; 7 Sep 2020 19:08:19 +0000 Received: from localhost ([127.0.0.1]:50880 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFMV1-00058D-91 for submit@debbugs.gnu.org; Mon, 07 Sep 2020 15:08:19 -0400 Received: from relay7-d.mail.gandi.net ([217.70.183.200]:58559) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFMUy-00057w-7c for 12443@debbugs.gnu.org; Mon, 07 Sep 2020 15:08:17 -0400 X-Originating-IP: 91.129.97.241 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay7-d.mail.gandi.net (Postfix) with ESMTPSA id 7A3E320007; Mon, 7 Sep 2020 19:08:07 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> Date: Mon, 07 Sep 2020 21:46:11 +0300 In-Reply-To: <877dt6er29.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 19:46:38 +0200") Message-ID: <87363tbe58.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > The next step here is probably to fix the cases where there's a default, > but where the prompt doesn't mention them. Like: Are you sure about this change in 1921d2176b? diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index d8f932e7a4..56c936e773 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -1028,7 +1028,7 @@ tab-bar-rename-tab (tab-index (or current-prefix-arg (1+ (tab-bar--current-tab-index tabs)))) (tab-name (alist-get 'name (nth (1- tab-index) tabs)))) (list (read-from-minibuffer - "New name for tab (leave blank for automatic naming): " + (format-prompt "New name for tab" tab-name) nil nil nil nil tab-name) current-prefix-arg))) (let* ((tabs (funcall tab-bar-tabs-function)) @@ -1057,7 +1057,7 @@ tab-bar-rename-tab-by-name (alist-get 'name tab)) (funcall tab-bar-tabs-function))))) (list tab-name (read-from-minibuffer - "New name for tab (leave blank for automatic naming): " + (format-prompt "New name for tab" tab-name) nil nil nil nil tab-name)))) (tab-bar-rename-tab new-name (1+ (tab-bar--tab-index-by-name tab-name)))) I'm not the author of this code, so I don't know how it should work, but the old prompt with text "leave blank for automatic naming" makes sense to me. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 15:27:51 2020 Received: (at 12443) by debbugs.gnu.org; 7 Sep 2020 19:27:51 +0000 Received: from localhost ([127.0.0.1]:50911 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFMnv-0005br-0I for submit@debbugs.gnu.org; Mon, 07 Sep 2020 15:27:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:60900) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFMns-0005bc-Ew for 12443@debbugs.gnu.org; Mon, 07 Sep 2020 15:27:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=zEJpJGOSNfWnlxmeaEp5eXbUNeffhz8Z8mxFUpaoWPU=; b=gi+4Qj69kvDx1ZY00JMoN+XE8v KgCT+VRnUz8/4mF8EALyRjkotBOmQl6Th9OOw+1i3si59iO/3QOmWuLf1nzxl4M1ExgFXJs9WeuMf ZyztArLPif+nWv+Cj3gq3ICvIFcunUPOjonATYT/16c7FAyg6by1LvX0STHSxtZeKbz4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFMng-0002op-7H; Mon, 07 Sep 2020 21:27:42 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEXFxMGBgHxZV1U/ PTv////44gDoAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+QJBxMXDbSUTP4AAAGRSURBVDjLZVSJkQQh CFQjEC4BgQRuJf/cjsdRZ4+t2hqnaRp5phSzCsjLAKCXbdWOCyCwwwYOwRA07CHwbcg7Wvqr/ZYO JhDh7W8yyGgRbRxCRxhcOQAmypTs0Vx7sWz6EoSXNAqZ8PTH8UgIKxEQRBIezAiZk6h7yscAdeiJ KbpMZrr0jMS6beoCvhhqDFM0oPjrqbe5PgWg3yaT4uLyD5nJ8ETe4SYnIxOY8mKgX5b4K+vISnVV 44gZo/opG3LpPADZNNAdKsVVwTv1CsVeXVVkHCgiL0aKYxbtlMVCmV+vPTu2Od4p1hlD0W0GN/Lr U6KfHKOSgmHedJQEbE42MHNCfYxqb8NHKWLxmtGsmOEpwnva7f7VNwAC4ANg7E4CdjfaC1J9NoET MIF27RSaCPnKucTPBXTPDgwQu7Ts970WCPOijDL7EbGrRRu9cI17uc3iuPYsDd5AtSaKVwnr5b0+ A1ElugitpHSU9Q7UCGOBnFDvMG2toY7jHNu+gOhMPwRcXxP1m10pIfuIzNXQZX+u5HN3t7nWpwAA ACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0wN1QxOToyMzoxMiswMDowMN3S+7EAAAAldEVYdGRh dGU6bW9kaWZ5ADIwMjAtMDktMDdUMTk6MjM6MTIrMDA6MDCsj0MNAAAAAElFTkSuQmCC X-Now-Playing: Baby Huey's _The Baby Huey Story: The Living Legend_: "California Dreaming" Date: Mon, 07 Sep 2020 21:27:34 +0200 In-Reply-To: <87363tbe58.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 07 Sep 2020 21:46:11 +0300") Message-ID: <87wo154cbd.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Are you sure about this change in 1921d2176b? No, I found it kinda puzzling. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Are you sure about this change in 1921d2176b? No, I found it kinda puzzling. > (tab-name (alist-get 'name (nth (1- tab-index) tabs)))) > (list (read-from-minibuffer > - "New name for tab (leave blank for automatic naming): " > + (format-prompt "New name for tab" tab-name) > nil nil nil nil tab-name) The "automatic naming" defaults to tab-name, which is (alist-get 'name (nth (1- tab-index) tabs)) In my tests that was never nil, so the "leave blank" didn't seem possible (and seemed misleading). But I may well have missed something? That is, there is no real way to get "automatic naming" interactively? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 07 16:11:20 2020 Received: (at 12443) by debbugs.gnu.org; 7 Sep 2020 20:11:21 +0000 Received: from localhost ([127.0.0.1]:50974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFNU0-0006iV-MT for submit@debbugs.gnu.org; Mon, 07 Sep 2020 16:11:20 -0400 Received: from quimby.gnus.org ([95.216.78.240]:33084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFNTy-0006iI-Ln for 12443@debbugs.gnu.org; Mon, 07 Sep 2020 16:11:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=vAwo89TzsdCx37brj5gVjZP5rvg6N1gpXjG2y+BvpY0=; b=vSdJbFQJ9bCWIvr+edlUIr9dJw 8KBeVxy3EtPM6rH/FniltWbLSJUnK499MoeH4kC4W4KmA+Sg88RgDqtJdrwQtaS10+QD45YRqS//y EfqIf6NKTXIMiDN1b+81UdCoi1Wc4yFr54bw2AgMx2iPeuAIEhmSSx3/Va18XNwyd3Eg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFNTp-0003DI-Pf; Mon, 07 Sep 2020 22:11:12 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEX+/v7Lyshyb2qD gXyAfnmvraoZFA0iHRZUUEpHQjw1MSpCPTcoIxz///8W+sBnAAAAAWJLR0QN9rRh9QAAAAd0SU1F B+QJBxQKHCQHFpUAAACASURBVDjLY2AYBUMICBkbG7sYuzgbOasYG6siSYSlpVXMWr161cqVu9LS spEkwtecObWqAwjmrKk5U4GsAyi+qqO7o3PVqjU1GSgSpzs6ds3s6NjR2YUiEX7mzPEVHas6ZnSV oxlVlpZWnjOzY1kaEGQiSUh0IIGmgQ68UTD0AQBxSDi16xIgDQAAACV0RVh0ZGF0ZTpjcmVhdGUA MjAyMC0wOS0wN1QyMDoxMDoyOCswMDowMH4MUS0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDkt MDdUMjA6MTA6MjgrMDA6MDAPUemRAAAAAElFTkSuQmCC X-Now-Playing: Delroy Edwards & Dean Blunt's _Desert Sessions_: "(untitled)" Date: Mon, 07 Sep 2020 22:11:08 +0200 In-Reply-To: <87363tbe58.fsf@mail.linkov.net> (Juri Linkov's message of "Mon, 07 Sep 2020 21:46:11 +0300") Message-ID: <87h7s9cppf.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: (And perhaps I should have skipped that transform because it was puzzling and less than "obviously right".) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) (And perhaps I should have skipped that transform because it was puzzling and less than "obviously right".) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 08 14:46:15 2020 Received: (at 12443) by debbugs.gnu.org; 8 Sep 2020 18:46:15 +0000 Received: from localhost ([127.0.0.1]:56435 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFidD-0004Qb-61 for submit@debbugs.gnu.org; Tue, 08 Sep 2020 14:46:15 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:52653) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFidA-0004QK-5A for 12443@debbugs.gnu.org; Tue, 08 Sep 2020 14:46:14 -0400 X-Originating-IP: 91.129.97.241 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id 43D5D1BF207; Tue, 8 Sep 2020 18:46:03 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> Date: Tue, 08 Sep 2020 21:32:44 +0300 In-Reply-To: <87wo154cbd.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 07 Sep 2020 21:27:34 +0200") Message-ID: <87ft7si0fn.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) >> Are you sure about this change in 1921d2176b? > > No, I found it kinda puzzling. > >> (tab-name (alist-get 'name (nth (1- tab-index) tabs)))) >> (list (read-from-minibuffer >> - "New name for tab (leave blank for automatic naming): " >> + (format-prompt "New name for tab" tab-name) >> nil nil nil nil tab-name) > > The "automatic naming" defaults to tab-name, which is > > (alist-get 'name (nth (1- tab-index) tabs)) > > In my tests that was never nil, so the "leave blank" didn't seem > possible (and seemed misleading). But I may well have missed something? > > That is, there is no real way to get "automatic naming" interactively? Here is what I see when trying the old prompt: (read-from-minibuffer "New name for tab (leave blank for automatic naming): " nil nil nil nil "tab-name") Typing RET returns the empty string "". From debbugs-submit-bounces@debbugs.gnu.org Tue Sep 08 16:37:24 2020 Received: (at 12443) by debbugs.gnu.org; 8 Sep 2020 20:37:24 +0000 Received: from localhost ([127.0.0.1]:56557 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFkMm-00075k-H4 for submit@debbugs.gnu.org; Tue, 08 Sep 2020 16:37:24 -0400 Received: from quimby.gnus.org ([95.216.78.240]:45732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kFkMk-00075W-81 for 12443@debbugs.gnu.org; Tue, 08 Sep 2020 16:37:22 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=q908FMjX9ewIUoxTAW+5G/0WLevu2PDr8JHAyMG++yI=; b=PBPvpfQ8Y/452XMB6P4vJwSWdT Cp0G+fO7flFcAYU9icVdC7fwAt6En9zDII1QGQGccEzfOg7GbYTQxc4eGq4a3fsPyp8sqMCMQF9l5 JXPfQYm3QOPJjF2BCxh/gajUYHw7OmICdTOYusU9ktNeoPflARO7if7pn6jJ48psZUQA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kFkMa-0008SS-Oa; Tue, 08 Sep 2020 22:37:15 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAADFBMVEUUDw1MNS17UkH/ //8HMBPWAAAAAWJLR0QDEQxM8gAAAAd0SU1FB+QJCBQcK9hBFhsAAAFySURBVCjPbVLBbhQxDH0e OQg4OSiROpyLtPyFgzKr7i1ByWqPHAoSf8Ei1DM9cOdSpPYrcWa3EkV9Gk387HmW/SaIANPDHQyM mUU+33/teV4YLGhNJCzYihXlYG9nJCEwEUNqhrqTcBoH1B5ZgwDHeHsdc5S+y/vYMIeJi5Qb/tIY 2qbYat6h98OqJMo4oXYCBD5YHFJfWuziN3GH4Fsr9AIpzC/BNXiPWgjxAk9QzieNsDhVsKajIsOJ kYaU1AalMioYCcOnVcCrUEYHWv5sB7Gqz1lEki0ct/7jj+z7LbkDKLsk+qbfHuuViVwJV76mal2f wJ3nWdOxd7f0vv+1v+sgLUVGYTMR6vHb7/cfbn5i83pBVRs8XZj90xbv+iMe7vFf7zmwfA+JXgVI Z2HvQiGOkMjihLK5OtsubOVkFmv4R2xOso1AdOZGqv1MD9VL80LVKZxZJXgeY6FIVMIjYUr2sa6X wAitSqXT5ma4jIT8BVdfQzaANhV8AAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA5LTA4VDIwOjI4 OjQzKzAwOjAwvrtNnwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wOS0wOFQyMDoyODo0MyswMDow MM/m9SMAAAAASUVORK5CYII= X-Now-Playing: I Start Counting's _My Translucent Hands_: "You and I" Date: Tue, 08 Sep 2020 22:37:11 +0200 In-Reply-To: <87ft7si0fn.fsf@mail.linkov.net> (Juri Linkov's message of "Tue, 08 Sep 2020 21:32:44 +0300") Message-ID: <87v9gogg3s.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Here is what I see when trying the old prompt: > > (read-from-minibuffer > "New name for tab (leave blank for automatic naming): " > nil nil nil nil "tab-name") > > Typing RET returns the empty stri [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Here is what I see when trying the old prompt: > > (read-from-minibuffer > "New name for tab (leave blank for automatic naming): " > nil nil nil nil "tab-name") > > Typing RET returns the empty string "". D'oh. I missed this bit: Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used as the default to =E2=80=98read=E2=80=99 if READ is non-nil and the user = enters empty input. But if READ is nil, this function does _not_ return DEFAULT-VALUE for empty input! Instead, it returns the empty string. I'll go over that commit and revert the bits with a nil READ. But what a... strange interface.=20=20 --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Wed Sep 09 15:04:07 2020 Received: (at 12443) by debbugs.gnu.org; 9 Sep 2020 19:04:07 +0000 Received: from localhost ([127.0.0.1]:34716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG5O2-0005PR-VC for submit@debbugs.gnu.org; Wed, 09 Sep 2020 15:04:07 -0400 Received: from relay8-d.mail.gandi.net ([217.70.183.201]:56989) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kG5O0-0005Ou-9M for 12443@debbugs.gnu.org; Wed, 09 Sep 2020 15:04:05 -0400 X-Originating-IP: 91.129.97.241 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay8-d.mail.gandi.net (Postfix) with ESMTPSA id B8F9F1BF205; Wed, 9 Sep 2020 19:03:56 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> Date: Wed, 09 Sep 2020 21:50:06 +0300 In-Reply-To: <87v9gogg3s.fsf@gnus.org> (Lars Ingebrigtsen's message of "Tue, 08 Sep 2020 22:37:11 +0200") Message-ID: <87mu1y6c59.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) > Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used > as the default to ‘read’ if READ is non-nil and the user enters > empty input. But if READ is nil, this function does _not_ return > DEFAULT-VALUE for empty input! Instead, it returns the empty string. > > But what a... strange interface. It seems this "default" value is needed here only for convenience of retrieving it into the minibuffer for editing using the M-n key. From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 10 09:14:15 2020 Received: (at 12443) by debbugs.gnu.org; 10 Sep 2020 13:14:16 +0000 Received: from localhost ([127.0.0.1]:37619 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGMP1-0006VD-LO for submit@debbugs.gnu.org; Thu, 10 Sep 2020 09:14:15 -0400 Received: from quimby.gnus.org ([95.216.78.240]:38368) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGMOz-0006V0-Fm for 12443@debbugs.gnu.org; Thu, 10 Sep 2020 09:14:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :In-Reply-To:Date:References:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=i2JIbTJPKHxaCPWS7xN1kIqBrjyRueKnDwaTepT3Oj4=; b=HyUsVAk/8BuABI5Z2l2u3CQ/U0 RuAdaNUSzzXge8oPW77Zj7bMJC47V3qAh/FxHIM1WEVIPevy4bWV22tBBuLe1/bj+Pkk9iTQ8Xtjw 4XdB4EiyHAlwDQEJus1nr3cEE/rm/wy/SpKoWyt2MobW6PZlhSGdi8r+PRzA0KTg5om0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGMOr-0006kB-8d; Thu, 10 Sep 2020 15:14:07 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAD1BMVEX75gwxKgWMeg6/ ow3///96YCDpAAAAAWJLR0QEj2jZUQAAAAd0SU1FB+QJCgwgHzI6oRIAAAGmSURBVDjLbZOLtaww CEUxNBBCA/k0QLT/3i6fRH2+cc0YZU/gHMgAABSAQwAqYAVIjDMLoMYtasAZNA0IB8AMR3Ug9qzX CABswPLobgewQHfgoaO+QfP3LlHvP4BFfgPA/gV9pU7yqcEWsrcKKSTI9qHWhoPQ1m7n+t49FdBj EItvmgCn/YqXVSASB2mcHmiFfD1LCMTOmgxmhlPWhuwPqdRpzWVoO1NuDrJLLQz0gBzApOaxgcBo 5d6BDzAdFGCK3usLTBOcSHz2b3AEMNMTrn9AjVTWEPymQraeFUD5FEfvvd7qDcTl2o5qLcsLlMZu EM1EIhr5ds5NwgeUwyiV3gNc+6Q1O15M5JPYbQ/h+q0twDoUKuzsffiEqFuOqJS0DvVObK7IlgUu NA9aRZBWjSX6CJDydMAbsIpif2hqQ+0soNYWaLN4kySAhx3Mxt7WGkCNlQ3yGkRdh7T9BNM+L3Cn 8n/Mr+JqulWOKWy547p0/npldt23QVtGtpDrrGm3xJZiBUs5uw15N7Fr+m6Fus7BZ3PSeCaEoqUE 9IsXgr680Otu1x/5dTOCZ3HoagAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAyMC0wOS0xMFQxMjozMjoz MSswMDowMB3F3joAAAAldEVYdGRhdGU6bW9kaWZ5ADIwMjAtMDktMTBUMTI6MzI6MzErMDA6MDBs mGaGAAAAAElFTkSuQmCC X-Now-Playing: Various's _Disco Rallado_: "Jason Forrest - Song For My Grandmother" Date: Thu, 10 Sep 2020 15:14:03 +0200 In-Reply-To: <87mu1y6c59.fsf@mail.linkov.net> (Juri Linkov's message of "Wed, 09 Sep 2020 21:50:06 +0300") Message-ID: <87imcl7p0k.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: >> Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used >> as the default to ‘read’ if READ is non-nil and the user enters >> empty input. But if READ is nil, this function does [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: >> Sixth arg DEFAULT-VALUE, if non-nil, should be a string, which is used >> as the default to =E2=80=98read=E2=80=99 if READ is non-nil and the us= er enters >> empty input. But if READ is nil, this function does _not_ return >> DEFAULT-VALUE for empty input! Instead, it returns the empty string. >> >> But what a... strange interface. > > It seems this "default" value is needed here only for convenience > of retrieving it into the minibuffer for editing using the M-n key. Ah, right. --=20 (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 05:11:58 2020 Received: (at 12443) by debbugs.gnu.org; 11 Sep 2020 09:11:58 +0000 Received: from localhost ([127.0.0.1]:42292 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGf65-00038k-PZ for submit@debbugs.gnu.org; Fri, 11 Sep 2020 05:11:57 -0400 Received: from mail-lf1-f46.google.com ([209.85.167.46]:32861) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGf63-00038U-Az for 12443@debbugs.gnu.org; Fri, 11 Sep 2020 05:11:55 -0400 Received: by mail-lf1-f46.google.com with SMTP id x77so5136301lfa.0 for <12443@debbugs.gnu.org>; Fri, 11 Sep 2020 02:11:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=Uhalqr+INEeTdf/a9Jjr33HPs0NW5PysUcEuEUq5HaE=; b=rZxNCW/PTBSLouaJ2nJQMbwCiMJjmPNYXPv9fD1IEop5+GAIQIpNZWjGi3ZOxWmTWw zFxyo0VJUhwfhgboEwtpSwqp2Zk1UTvbJsjIT/4d5jV+PGzDGteIb5Ru8q3WDkPOE8yP SbgFcOMOAKCegMzYOYMJzjUQwiz/sD+h+lIdkVjqhUwb6NhD/64nbs+4+uj/YvITmgWb sfunpzhoARgMj9kt60EOp2kRKLo7cuH5ZVAMiw3tjSOASmAivRLm6ezDWeF6G+L3v1X1 cTFCKkxLamrFjBpS6yfDx6pTH4w5Ofx7xTUS297lk2Pkwrr+72aBZ9dBmMMrTaHltbo9 BGpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=Uhalqr+INEeTdf/a9Jjr33HPs0NW5PysUcEuEUq5HaE=; b=CIMpZbcb9LQV7rhwwxohxtBYFqkkWebhFKxVE8xQkuFVpxWNe4y+qbIvEPTiR7FpwD 6bYttgr3D0xMlXvBrslnvpSq6tk4mjl8I1Az2eoZhMCRMh6bL38GQxPcI6Ud5hcyaSF2 H2rvyufG6Ca4UGw3rJCfCeLTLZwPvmPGdKI6ZgCgRwCEiMsFhqPpoPGdMXK0Sjs6hTOi uy2WfcCkQRIfjTXJiJRtKubs3XtLTsA+EvbsDQWFE2+PpVNuvX+b95QXpq4wBffmiB4n ePfa0IJEWnLjCL1vPFcq/3KSfZivbF3Mp9XpkoAs/7FBQCOko3v4b7Fj5lKlR4+yZJOJ yahw== X-Gm-Message-State: AOAM532wvjxJFCAS/vO2OHjmy8EHBO+3O9D4iaX+hDuctgzfcg+uvUmb g44WoTl7TkTGjfxVvm3jecaNjXbgOTU= X-Google-Smtp-Source: ABdhPJw9g2AcS1VIKtIbICsApuYGRvrCNnZNX0CrU/FNX32whUIdsCL6dGSSOzvGsiBMoLA3JJa3qA== X-Received: by 2002:a19:8148:: with SMTP id c69mr2064lfd.295.1599815508885; Fri, 11 Sep 2020 02:11:48 -0700 (PDT) Received: from muffinmac (102-26-207-82.ip.ukrtel.net. [82.207.26.102]) by smtp.gmail.com with ESMTPSA id u26sm430260ljd.47.2020.09.11.02.11.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 02:11:47 -0700 (PDT) From: Andrii Kolomoiets To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> Date: Fri, 11 Sep 2020 12:11:39 +0300 In-Reply-To: <87imcl7p0k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 10 Sep 2020 15:14:03 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Juri Linkov writes: > >> It seems this "default" value is needed here only for convenience >> of retrieving it into the minibuffer for editing using the M-n key. > > Ah, right. Is it possible that changes related to this bug leads to broken minibuffer-electric-default-mode? Code to evaluate: (custom-set-variables '(minibuffer-eldef-shorten-default t)) (minibuffer-electric-default-mode) (read-string "prompt (default foo): ") In Emacs 27 prompt looks like "prompt [foo]: ". After input "z" prompt will looks like "prompt: z". In Emacs 28 prompt looks like "prompt (default foo): ". And after input "z" prompt will looks like "promptz". From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 11 08:53:32 2020 Received: (at 12443) by debbugs.gnu.org; 11 Sep 2020 12:53:32 +0000 Received: from localhost ([127.0.0.1]:42909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGiYQ-0006yL-Gh for submit@debbugs.gnu.org; Fri, 11 Sep 2020 08:53:32 -0400 Received: from quimby.gnus.org ([95.216.78.240]:50996) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGiYP-0006y8-5H for 12443@debbugs.gnu.org; Fri, 11 Sep 2020 08:53:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=fMgoU6EKOO16u9dYFCw2NR8Gu/EVIDEVmOFugFHzbpU=; b=A7pVz3Qrdo20xxxa4g2VvbBFfL Leb3Z850nY2XEijwpDu2WvdhnyjQT3UZjlkkvcXBZwK+dZoScgyPsdEhQphFLmGS9oJGMKxcicMwD Pu6Pxw6Ree1yIWrT3hfKI1jjBqJb4AbKuSEYeXQO+iu98o9LV5OWGXlfkiEo+lanEjB0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGiYG-0002Ey-0G; Fri, 11 Sep 2020 14:53:18 +0200 From: Lars Ingebrigtsen To: Andrii Kolomoiets Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAG1BMVEUMCQckKCFbXFjN 0s2doJyAm38xYxxIii/////FnjXSAAAAAWJLR0QIht6VegAAAAd0SU1FB+QJCwwOAXuO8jgAAAGt SURBVDjLtZNBr5wgEMcZtT0zT59nBTa9tq5urwra88s+d/f6vOC5TQpfv7DdvABteuskQJwf/5lh EEII/jbmpxaRkncD73p8h/5/WsYbwh76JgSyeClG58woKcNgHz57DctKRpkIBflIpKqELLngKehy 3ihezSUPQdGB4mq+lMotUXJ1djVRCgQA4nJL+cUt7I/j8bz1wA+MgMhnFGw4STmxWJKraj0Np2Ho hhhUufo29MPXruNx8p4dh2VZbre5jRVI1fWqvaWF4fNy1dYaqyM3EPS7rbNYgljf3bvZMAGod6vT /f7W6107YPY3SIA2DhiXZ4MEbFojaLuhjsG9d7V2fh0n9/NHg6Q2YX6Ae5Ha4Xo3NFLQR0z9d1D7 00T1wrvfmuSITgL3Zn2PuwsbBa3Nbj+9xaCtt911xP6wcbeeWl+P3S/nJNJKni+39ecyy+QGJchZ vc7yOCWp+7WfuRq645iAVSI+sVZMSaSsQTd8DSRJMbVE+taMQEMNdJX7o2E6y0WwMH1ZuhBjJqW4 HOZQUbKeFn13EJId4hfl3xJSJMkpHlY0gpL/YL8AJH1codXpGjkAAAAldEVYdGRhdGU6Y3JlYXRl ADIwMjAtMDktMTFUMTI6MTQ6MDErMDA6MDBoUIHOAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5 LTExVDEyOjE0OjAxKzAwOjAwGQ05cgAAAABJRU5ErkJggg== X-Now-Playing: Laraaji & Lyghte's _Celestial Realms_: "Celestial Realms" Date: Fri, 11 Sep 2020 14:53:14 +0200 In-Reply-To: (Andrii Kolomoiets's message of "Fri, 11 Sep 2020 12:11:39 +0300") Message-ID: <87een8xyo5.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Andrii Kolomoiets writes: > Is it possible that changes related to this bug leads to broken > minibuffer-electric-default-mode? > > Code to evaluate: > > (custom-set-variables > '(minibuffer-eldef-shorten-default t)) > (minibu [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrii Kolomoiets writes: > Is it possible that changes related to this bug leads to broken > minibuffer-electric-default-mode? > > Code to evaluate: > > (custom-set-variables > '(minibuffer-eldef-shorten-default t)) > (minibuffer-electric-default-mode) > (read-string "prompt (default foo): ") > > In Emacs 27 prompt looks like "prompt [foo]: ". After input "z" prompt > will looks like "prompt: z". > > In Emacs 28 prompt looks like "prompt (default foo): ". And after input > "z" prompt will looks like "promptz". Yup -- it was 19bff57f609854f257780f20043e96fb2eddc713 that included the ": " bit in the portion to be replaced. This should now be fixed on the trunk. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 12 15:09:08 2020 Received: (at 12443) by debbugs.gnu.org; 12 Sep 2020 19:09:08 +0000 Received: from localhost ([127.0.0.1]:49057 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHAtY-0002hB-JE for submit@debbugs.gnu.org; Sat, 12 Sep 2020 15:09:08 -0400 Received: from relay10.mail.gandi.net ([217.70.178.230]:46665) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHAtW-0002gf-FG for 12443@debbugs.gnu.org; Sat, 12 Sep 2020 15:09:07 -0400 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay10.mail.gandi.net (Postfix) with ESMTPSA id D242E240003; Sat, 12 Sep 2020 19:08:58 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> Date: Sat, 12 Sep 2020 22:04:53 +0300 In-Reply-To: <87imcl7p0k.fsf@gnus.org> (Lars Ingebrigtsen's message of "Thu, 10 Sep 2020 15:14:03 +0200") Message-ID: <87y2leke96.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) There is another consequence from the commit de4f347901a. Is there a real need to duplicate the default value in read-file-name when the default value is already shown as initial input? For example, now after typing 'C-x 5 d' (dired-other-frame), the prompt becomes overly long with the duplicate long default value that now doesn't fit into the frame width: Dired in other frame (directory) [/very/long/path/with/lots/of/subdirectories/]: /very/long/path/with/lots/of/subdirectories/ Here the default value is in square brackets [...] because of my customized prompt " [%s]" for minibuffer-default-prompt-format. But with the default format " (default %s)" the prompt would be even longer. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 05:07:51 2020 Received: (at 12443) by debbugs.gnu.org; 13 Sep 2020 09:07:51 +0000 Received: from localhost ([127.0.0.1]:49420 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHNzD-0005uy-7H for submit@debbugs.gnu.org; Sun, 13 Sep 2020 05:07:51 -0400 Received: from relay12.mail.gandi.net ([217.70.178.232]:41821) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHNzB-0005uk-Fw for 12443@debbugs.gnu.org; Sun, 13 Sep 2020 05:07:50 -0400 Received: from mail.gandi.net (m91-129-97-241.cust.tele2.ee [91.129.97.241]) (Authenticated sender: juri@linkov.net) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B89DC200002; Sun, 13 Sep 2020 09:07:41 +0000 (UTC) From: Juri Linkov To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) Organization: LINKOV.NET References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> <87y2leke96.fsf@mail.linkov.net> Date: Sun, 13 Sep 2020 11:53:10 +0300 In-Reply-To: <87y2leke96.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 12 Sep 2020 22:04:53 +0300") Message-ID: <87r1r6oxpt.fsf@mail.linkov.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > There is another consequence from the commit de4f347901a. Sorry, I meant “another case from another commit”. > Is there a real need to duplicate the default value in read-file-name > when the default value is already shown as initial input? > > For example, now after typing 'C-x 5 d' (dired-other-frame), the prompt > becomes overly long with the duplicate long default value that now > doesn't fit into the frame width: > > Dired in other frame (directory) [/very/long/path/with/lots/of/subdirectories/]: /very/long/path/with/lots/of/subdirectories/ > > Here the default value is in square brackets [...] because of my > customized prompt " [%s]" for minibuffer-default-prompt-format. > But with the default format " (default %s)" the prompt would be even longer. Another case is just ‘C-x d’ (dired) - it displays the duplicate directory name too: in the default value and the same in the initial input: Dired (directory) (default /tmp/foo/bar/): /tmp/foo/bar/ From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 09:00:45 2020 Received: (at 12443) by debbugs.gnu.org; 13 Sep 2020 13:00:46 +0000 Received: from localhost ([127.0.0.1]:49681 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHRcb-0001LE-MW for submit@debbugs.gnu.org; Sun, 13 Sep 2020 09:00:45 -0400 Received: from quimby.gnus.org ([95.216.78.240]:44518) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHRcY-0001Ky-0P for 12443@debbugs.gnu.org; Sun, 13 Sep 2020 09:00:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9HnilTE9CQdp0EVd73zSYLHjpQaudTpod4znachFmEA=; b=oORmrQQOlIWWnmKWb0vh1r3PVd je4kbddT1w+/nZsjE/gnuP/vBD/zBjbgaDKl0Y529zWgRPb47fwby0YYvZc0V/ZSAxW12zMSg1axU LYXwUPiCiIcQ+FUfsFOI6IFp0HoJwi8L3fSQDJTv5EEbj29IulHHv42KitYgLo3FMCxg=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHRcO-00036b-Uz; Sun, 13 Sep 2020 15:00:35 +0200 From: Lars Ingebrigtsen To: Juri Linkov Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> <87y2leke96.fsf@mail.linkov.net> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAIVBMVEUXRGsgTHciS3gd S3UfT3s+V201VHAnUHVCWm0VPmX////RkgCaAAAAAWJLR0QKaND0VgAAAAd0SU1FB+QJDQw7Il6z HiAAAAFESURBVDjLpZJBUsMwDEXV8Yql4sx0SwwHiJEOQLEuwIbhAgxrVu0xODKy4qRx4qxQM9NY T9KXFMMJh3A3xBA6/edHOGF26AHDEDpE7AZ8eZJXBZ3FBBww6g99jH1S4KYgfaLGU/RExEQJHGkU ojoi5adYyhnLaQGcgY8fX+/55Iv39vltgOh6/qGVna8Di4G9HQLhDPweeDkAfbq0gYiYRml/FcGh iMdNipVqtrVZyR2grqQBWN7A9Xtp1XwGN+tWQLoJxJ2GdoUtvw0Y9RvW00uaJ982xgUs0nOisABU 615pQD421KsMXwO7T3XTSVeSM9D8q9Z4KsVWpNJZuqoHpEverr1tJsS5q1JmqVbmyA6/A87OWGfQ orFV5wJ89DXh/fUpAXJwr4j+CcY1AAc6pI7p7N2NZLsYoW3jETi2B4DfNvgDP43BVCENp28AAAAl dEVYdGRhdGU6Y3JlYXRlADIwMjAtMDktMTNUMTI6NTk6MzQrMDA6MDB2YHTbAAAAJXRFWHRkYXRl Om1vZGlmeQAyMDIwLTA5LTEzVDEyOjU5OjM0KzAwOjAwBz3MZwAAAABJRU5ErkJggg== X-Now-Playing: Nils Frahm's _Encores 2_: "A Walking Embrace" Date: Sun, 13 Sep 2020 15:00:31 +0200 In-Reply-To: <87y2leke96.fsf@mail.linkov.net> (Juri Linkov's message of "Sat, 12 Sep 2020 22:04:53 +0300") Message-ID: <871rj5zv9s.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Juri Linkov writes: > Is there a real need to duplicate the default value in read-file-name > when the default value is already shown as initial input? > > For example, now after typing 'C-x 5 d' (dired-other-frame), the [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Juri Linkov writes: > Is there a real need to duplicate the default value in read-file-name > when the default value is already shown as initial input? > > For example, now after typing 'C-x 5 d' (dired-other-frame), the prompt > becomes overly long with the duplicate long default value that now > doesn't fit into the frame width: > > Dired in other frame (directory) > [/very/long/path/with/lots/of/subdirectories/]: > /very/long/path/with/lots/of/subdirectories/ > > Here the default value is in square brackets [...] because of my > customized prompt " [%s]" for minibuffer-default-prompt-format. > But with the default format " (default %s)" the prompt would be even longer. Yup; I didn't test read-file-name enough before doing these changes, and I have now reverted them. read-file-name's DEFAULT is kinda like other function's INITIAL, if you squint at it a bit. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 13 10:30:15 2020 Received: (at 12443) by debbugs.gnu.org; 13 Sep 2020 14:30:15 +0000 Received: from localhost ([127.0.0.1]:51271 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHT1C-00043Z-MB for submit@debbugs.gnu.org; Sun, 13 Sep 2020 10:30:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHT1A-00043J-SA for 12443@debbugs.gnu.org; Sun, 13 Sep 2020 10:30:13 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58700) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kHT15-0005gL-Ii; Sun, 13 Sep 2020 10:30:07 -0400 Received: from [176.228.60.248] (port=3799 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kHT14-0007fI-Mt; Sun, 13 Sep 2020 10:30:07 -0400 Date: Sun, 13 Sep 2020 17:30:09 +0300 Message-Id: <83363lda1a.fsf@gnu.org> From: Eli Zaretskii To: Juri Linkov In-Reply-To: <87r1r6oxpt.fsf@mail.linkov.net> (message from Juri Linkov on Sun, 13 Sep 2020 11:53:10 +0300) Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> <87y2leke96.fsf@mail.linkov.net> <87r1r6oxpt.fsf@mail.linkov.net> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 12443 Cc: larsi@gnus.org, 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Juri Linkov > Date: Sun, 13 Sep 2020 11:53:10 +0300 > Cc: 12443@debbugs.gnu.org > > Another case is just ‘C-x d’ (dired) - it displays the duplicate > directory name too: in the default value and the same in the initial input: > > Dired (directory) (default /tmp/foo/bar/): /tmp/foo/bar/ Yes, I've noticed this as well. We need to fix this. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 04:41:11 2020 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2020 08:41:11 +0000 Received: from localhost ([127.0.0.1]:52467 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHk2w-0003ic-RV for submit@debbugs.gnu.org; Mon, 14 Sep 2020 04:41:11 -0400 Received: from mail-lj1-f176.google.com ([209.85.208.176]:37805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHk2u-0003iL-Cq for 12443@debbugs.gnu.org; Mon, 14 Sep 2020 04:41:09 -0400 Received: by mail-lj1-f176.google.com with SMTP id n25so17896099ljj.4 for <12443@debbugs.gnu.org>; Mon, 14 Sep 2020 01:41:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=7fqQ5pebWYBSev/J8ELvaisnR5dnXZXfD9gv9HZn+LQ=; b=sN776JK2e6G2zxx2WZWDlIO8VcB58MmZX2FJ1XCe0DGfe6YFjqHqy4gbnI6aSgijLA c2b52fchMPli2JHLLmBFruxAhPiFHh/68oS9XLj2ed7rIxH6mS0Rzc/94At4/hB9Ut8J pVj/BCBPKIzVVbFUsigO1XDhel6aBolWTZLM7TmmRVDquZWsVuKWQBI2EQzgGR5nXuQu HegwFUKPfuU5pzeB0LpSnqS/sBU5CJ3+uF7WeEHFUDAMxX3fakNIQPeMMU6uq33N1UD7 OM8ukCDBBuEZX93M6VEnjOH/Xpf0MCS/ZbQTbzMt1kgttXhaBzG8ExHeHPZKrvwZeYcq XMmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=7fqQ5pebWYBSev/J8ELvaisnR5dnXZXfD9gv9HZn+LQ=; b=YCmLZ8TYuHBFQNhHEJ6tLPLcLk5cc95Se1dXjjCmL/O69LEiUG0qUZBGLGBrKcELx6 4rCjKuZ5aVYmgsWLtiYh1c8P9QWAG0bOeAMdgS0lZTnFFsTkdizkigqGzWYoZhOJ0nCd 1bZ2toSzlHGSOyujAzYCNzJMSD1Cfw2VbDuHypNEoMPXAhFAW+4I/Mm6bV7+LOITaPXf Q21PSMHxzY25TkgK60Lb3xmAV/vSjr58Ck32TwAuatVewIDGkDJI1Vn/w3Knx5fO9Y+d dfjPTCS8jJlYMZEIsvszcURX2IXJSwI5JulFMQuxhImacdRkoeLNGWBGHK/ISDgK/YRg C+qQ== X-Gm-Message-State: AOAM531utzhz4uuph+SduO3cICW5FXWRA9lN63wPT/1UIdSunmQOvnJD WLnODp8bm6bxdztz7nyD8nkyXquDDxE= X-Google-Smtp-Source: ABdhPJyYB2VwQ8OjQbKmd4QLRYjEdwZScA7Gc5Tyboa1Rz5Qb17NmgJG8pltrduHkXzhCTGh/9BCeA== X-Received: by 2002:a2e:a554:: with SMTP id e20mr5181661ljn.458.1600072861834; Mon, 14 Sep 2020 01:41:01 -0700 (PDT) Received: from muffinmac ([91.206.110.141]) by smtp.gmail.com with ESMTPSA id q24sm3280267lfo.149.2020.09.14.01.41.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 01:41:01 -0700 (PDT) From: Andrii Kolomoiets To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> <87een8xyo5.fsf@gnus.org> Date: Mon, 14 Sep 2020 11:40:59 +0300 In-Reply-To: <87een8xyo5.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 11 Sep 2020 14:53:14 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Andrii Kolomoiets writes: > >> Code to evaluate: >> >> (custom-set-variables >> '(minibuffer-eldef-shorten-default t)) >> (minibuffer-electric-default-mode) >> (read-string "prompt (default foo): ") >> >> In Emacs 27 prompt looks like "prompt [foo]: ". After input "z" prompt >> will looks like "prompt: z". >> >> In Emacs 28 prompt looks like "prompt (default foo): ". And after input >> "z" prompt will looks like "promptz". > > Yup -- it was 19bff57f609854f257780f20043e96fb2eddc713 that included the > ": " bit in the portion to be replaced. This should now be fixed on the > trunk. Indeed. Thanks! But the 'minibuffer-eldef-shorten-default' variable is still ignored. The "(default ...)" part of the prompt is not shortened to "[...]". From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 14 07:15:38 2020 Received: (at 12443) by debbugs.gnu.org; 14 Sep 2020 11:15:38 +0000 Received: from localhost ([127.0.0.1]:52886 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHmSQ-0007zU-Fq for submit@debbugs.gnu.org; Mon, 14 Sep 2020 07:15:38 -0400 Received: from quimby.gnus.org ([95.216.78.240]:57556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kHmSN-0007zE-VK for 12443@debbugs.gnu.org; Mon, 14 Sep 2020 07:15:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=TmhNIUZUubAyyka/6UCEIJuBff6gSvEycUjqtrGsqRw=; b=iWLWnROI5uxFBF0veZCdxGUIP2 Xi0EjoxBFo34b7zhYWBl9JvVptkGiiKVwr/7Css+G25c/HXImKfYMJLfw+ijN53p/IV2Ds2uDlEQe tWm13ueMs3dlu/a5IRZf7O2MgsKN9wcsL5+VRnJ5eewwiM4jqHtJV575pZDCcQNu8cPM=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kHmSB-0000fz-8b; Mon, 14 Sep 2020 13:15:29 +0200 From: Lars Ingebrigtsen To: Andrii Kolomoiets Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> <87een8xyo5.fsf@gnus.org> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAKlBMVEX18+zo5dvh3dLZ 1cqmoZbLxrvAu7AvKCFkXVVDPDVJQjqKhXuCfHP///8XYhd7AAAAAWJLR0QN9rRh9QAAAAd0SU1F B+QJDgoxBGBpoAsAAAGbSURBVDjLfZSxTsMwEIZtxMZiO30Bp2JjaBKhrh2CqBhpYa4ESAxMMCTp XEiLGJHaZkYyRSxsQSxslLfCdtLknKTc4Dj+cv+dz+cgJA0ThKia6AFT/Sje9VodYNwElBRqkkKG VMVgcBMQtaQ0KSVQhG5ojhvAPx5GDLIFbPXYDrhK1yZG6ZQxl2PK2hobgKqP9YB2OEy35Q/9K9+/ GHbKkmrrBvHyNRCP89tKDbsz0U9m4iv8qIOXYCZ68XcVxOIy+BRH67sqCMRzcDxfRNUYB0/9h/Q6 vU97Zla4tZyEJ+vfyWpkOuC9aBHGqygKOxWwGy7G8Ti8CYnZEhIkiQSpBLpWuJSKgrdlg1Qrmfbf pz8TMcpOoDDrfMB42+PyqOQI4lhnrs0tz6EI7w8gYHKNMumB8OHAIQC4fHO0UgoA6qq70Fa7sE7p RkpOaNEM2HKKrEjel1kbMBd2Ay273XJhVtDDgx5Zz2TAhjtnTunBQYVxlpWOwWCtMIyhAG0KbsOs stPRGqx+1XB+nSGAfwO4nt9zUgfaH9uoiPQHHR1Rs3csTsoAAAAldEVYdGRhdGU6Y3JlYXRlADIw MjAtMDktMTRUMTA6NDk6MDQrMDA6MDCkxOHGAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDIwLTA5LTE0 VDEwOjQ5OjA0KzAwOjAw1ZlZegAAAABJRU5ErkJggg== X-Now-Playing: Ossia's _Devil's Dance_: "(untitled)" Date: Mon, 14 Sep 2020 13:15:21 +0200 In-Reply-To: (Andrii Kolomoiets's message of "Mon, 14 Sep 2020 11:40:59 +0300") Message-ID: <87k0wwd2ye.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Andrii Kolomoiets writes: > But the 'minibuffer-eldef-shorten-default' variable is still ignored. The > "(default ...)" part of the prompt is not shortened to "[...]". Ah, yes. That bit wasn't tested enough (or perhaps at all, come to think of it). I've now pushed a fix (after testing and comparing with how this worked in Emacs 27), so I think this should work now. Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: 12443@debbugs.gnu.org, Juri Linkov X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Andrii Kolomoiets writes: > But the 'minibuffer-eldef-shorten-default' variable is still ignored. The > "(default ...)" part of the prompt is not shortened to "[...]". Ah, yes. That bit wasn't tested enough (or perhaps at all, come to think of it). I've now pushed a fix (after testing and comparing with how this worked in Emacs 27), so I think this should work now. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 12 22:31:17 2020 Received: (at 12443) by debbugs.gnu.org; 13 Oct 2020 02:31:17 +0000 Received: from localhost ([127.0.0.1]:44636 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSA5t-0007uX-Ju for submit@debbugs.gnu.org; Mon, 12 Oct 2020 22:31:17 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSA5s-0007uK-38 for 12443@debbugs.gnu.org; Mon, 12 Oct 2020 22:31:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=/Cu7FJkIVHHvngLRy8K6v0xBvRZVOuLhAQ67MCDXMGw=; b=jllmGy2GM2ntKavwoIfwBg5BYX FUyF3husQUJa9GxLbLj8t4jAn+paYVyPMuyUqtIrN+4YTO2UtEEMHWUY71mQK/h8Y5U1fqvrjaW5y qG8Db0oXewD7FLVo1XBIc7XYn3s7swRsB+Qu9bCikdgO/T8Bf8pm1CZmlimMAzzyKKa0=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSA5i-00013w-Fj; Tue, 13 Oct 2020 04:31:09 +0200 From: Lars Ingebrigtsen To: Andrii Kolomoiets Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix inconsisntecy) References: <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <877dt6er29.fsf@gnus.org> <87363tbe58.fsf@mail.linkov.net> <87wo154cbd.fsf@gnus.org> <87ft7si0fn.fsf@mail.linkov.net> <87v9gogg3s.fsf@gnus.org> <87mu1y6c59.fsf@mail.linkov.net> <87imcl7p0k.fsf@gnus.org> <87een8xyo5.fsf@gnus.org> <87k0wwd2ye.fsf@gnus.org> X-Now-Playing: Oval's _Wohnton_: "AllesinGedanken" Date: Tue, 13 Oct 2020 04:31:05 +0200 In-Reply-To: <87k0wwd2ye.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 14 Sep 2020 13:15:21 +0200") Message-ID: <87362i97rq.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Lars Ingebrigtsen writes: > Andrii Kolomoiets writes: > >> But the 'minibuffer-eldef-shorten-default' variable is still ignored. The >> "(default ...)" part of the prompt is not shortened to "[...]". > [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > Andrii Kolomoiets writes: > >> But the 'minibuffer-eldef-shorten-default' variable is still ignored. The >> "(default ...)" part of the prompt is not shortened to "[...]". > > Ah, yes. That bit wasn't tested enough (or perhaps at all, come to > think of it). I've now pushed a fix (after testing and comparing with > how this worked in Emacs 27), so I think this should work now. I think basically we've gotten as far as we're going to in this bug report -- the basic mechanism has been introduced, and the majority of the callers have been converted, so I'm closing this bug report. I'm sure there's more details to be fixed here, but handling those in new, individual bug reports would probably be better. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 12 22:31:25 2020 Received: (at control) by debbugs.gnu.org; 13 Oct 2020 02:31:25 +0000 Received: from localhost ([127.0.0.1]:44639 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSA60-0007uw-Uu for submit@debbugs.gnu.org; Mon, 12 Oct 2020 22:31:25 -0400 Received: from quimby.gnus.org ([95.216.78.240]:40792) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kSA5z-0007ue-Fm for control@debbugs.gnu.org; Mon, 12 Oct 2020 22:31:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=4SxPkLNIXl8OerR9Ou2wBOwZjudZ9VkqpxzqdhrSvqw=; b=h6nrCYvZmwQdanlubKsLKr3Cd6 /aJ2eZRtEO5m4MUTio5HozRFTLFz6+ubfhWpfzqOBYfHV0/6uaMFP3TSfsNM2cnuA0HYDI7camy2Y ytNBir/BuvQz3QjipLDkKvvL1xBEEvJrZxvugSJ93z8fzwgcSqG3SX3e3ToGDjjvbmQA=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kSA5r-000144-Mj for control@debbugs.gnu.org; Tue, 13 Oct 2020 04:31:17 +0200 Date: Tue, 13 Oct 2020 04:31:14 +0200 Message-Id: <871ri297rh.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #12443 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: close 12443 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) close 12443 28.1 quit From unknown Fri Jun 20 20:12:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 10 Nov 2020 12:24:07 +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 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 14:01:02 2021 Received: (at control) by debbugs.gnu.org; 17 Jan 2021 19:01:02 +0000 Received: from localhost ([127.0.0.1]:45665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1DIL-00029W-R5 for submit@debbugs.gnu.org; Sun, 17 Jan 2021 14:01:02 -0500 Received: from mail-wm1-f50.google.com ([209.85.128.50]:52101) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1DIK-000295-LT for control@debbugs.gnu.org; Sun, 17 Jan 2021 14:01:01 -0500 Received: by mail-wm1-f50.google.com with SMTP id h17so11510352wmq.1 for ; Sun, 17 Jan 2021 11:01:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=message-id:date:to:from:subject; bh=uw6H2IlMdgZqBGyzyNj8rGWSvFVtsBLZolmzda4jpL8=; b=OzPTPEgVSzqrzVw8p16Yb74qRwIhUYaChA2punqq9e8Fy0HJoWX2hCw4FHbS3ob6Vq BrYrwuyefEAA1hM8TP6lZVkWnsxI22QeSTR+4fO+VJEsGaqU3i61eQcUHbqu+aMqqH6e Sc8pJxCFuGmFC78fJgHAvQPlXwnBvtKPkWMsrtAQXAxgEIhbVuinuICHHju0vMLTvR6W y+10pivf49P4Ty/v2SGZJZwON2uUKyGW7ypTXXoaOqEatk5GchQP99aLA2ESkA6un0nW zBU9xjAIdrl4sjeyF0dJgjT03tvNHMK4uRwOifW189lYyflfx3pDImrzSlquGneU8otG rKiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:date:to:from:subject; bh=uw6H2IlMdgZqBGyzyNj8rGWSvFVtsBLZolmzda4jpL8=; b=njODwLTSV6qdCe659gyJej/wgoENidGYvvE1FwEV7z0WhWAFlkpuiBt9StQC7cq0uR wBc4b9pz8znPhgTxB2y4uE3R+0OiMhntsY4nsgqEcJ3gtW8SKSErsfEFaq4iC87UknzS jzJQRh0Ia+d3n/ou/bDZD33pENxEpOaVu5UHDMTltRnK4Ui9Rh9StOPEtV8iRzTolha7 tAZEGIJYaB5NDLDKB8Zeskx5m0OhhHyyqtjBVIrH1oMNV37gzTfXwjZ9mUMCotWJkbE1 YUpbjtxFlyvxxgXpL7v9qdwz36nxmSDoqwGuprOWRbrij5edW8iJ/kMDhjJUGaGyWGoe NLaA== X-Gm-Message-State: AOAM532CgTYpB17QgajLl1mga7LXfWBv8AnMyTbV7uRdXoTdUPrZPI7F GbtjVKTuIzby61Xz9r5ClVbrSPDrOfHVInW/yPE= X-Google-Smtp-Source: ABdhPJxZzXDocl8mhL4Nm+2WfiRGjGL/uVx4Ww+yHeV35nZxV7mhNi70x3VkrUEeaW+6jRcNL5hLTg== X-Received: by 2002:a1c:9a8c:: with SMTP id c134mr4414655wme.134.1610910054037; Sun, 17 Jan 2021 11:00:54 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id v126sm10879952wma.22.2021.01.17.11.00.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 11:00:53 -0800 (PST) Message-ID: <60048965.1c69fb81.b342f.ff7a@mx.google.com> Date: Sun, 17 Jan 2021 19:00:52 +0000 To: control@debbugs.gnu.org From: "Basil L. Contovounesios" Subject: control message for bug #12443 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) unarchive 12443 quit From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 17 14:05:16 2021 Received: (at 12443) by debbugs.gnu.org; 17 Jan 2021 19:05:16 +0000 Received: from localhost ([127.0.0.1]:45670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1DMS-0002Fz-Eu for submit@debbugs.gnu.org; Sun, 17 Jan 2021 14:05:16 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:36345) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1DMQ-0002Fl-Pw for 12443@debbugs.gnu.org; Sun, 17 Jan 2021 14:05:15 -0500 Received: by mail-wm1-f53.google.com with SMTP id v184so7802771wma.1 for <12443@debbugs.gnu.org>; Sun, 17 Jan 2021 11:05:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=cO6EFgDCHnGFdqLLG1UdrRPh9VsW5m8xXgukXyBSUzI=; b=cHIyZx9UOdi8BykNj0KIHAivgK1tBZjSL3ixBlWCVmtRC3m5H5C27fCcNtLiltUAZs UYba2YXb6FNG/T9fD+pirShKKpMtVzZcmRrvN+XKxxmZahR1wyhe9MIxe/3oixspw1Nm Rvwci27BY5jYFqJ9rToFshAQpgC806DSgxxcn7HHBSWZZNRx8XbR+2pavKQlnwe6HR0d QNWtwH6feuY9QPgiR7uxOakw1DMllqF8UmDN1Vs3QqmfR0G6iLxhN9wrzqPyRYEs6Ued v6+iJY2njSIYWBV+HtVKItp+z8tgxOeXRFUP0VsxUGZlOYE4+6x/3qw6x1Grsj+1/sYb AWwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=cO6EFgDCHnGFdqLLG1UdrRPh9VsW5m8xXgukXyBSUzI=; b=dDbdV+sC5BVdkWRolFVAzJRCjpvWPeBHg+1vaspsksg0/MzsEMzATcRKNJI1ehxxkN 4lwxDpuwcTru7qk2D1ravFvD1xSqdMCwGlh+HHVw5qCTUzcmky9zfctoNH7sXBTWC0+l bKpUpmXkuaE4o7um247WhHeOjDWM/por/5XiyE4Eo/kb2HWYh7o4gpVvJ8Z2ZtCiUxqX n2jMcMf85vb8sRXPw2S2ZENYmqmI0/dnLsIbOezfvoFu/cYN1APgRU4ZMNzxywjLupmg 96xTqIT2pD+jlLOQPZsbd0NDMzkUYSOlJJDfvT3JCyHh068aKqR04YUku4MKWdsonRLK JegA== X-Gm-Message-State: AOAM530vL/+/J005PVGPrEHudNFWeCBWybzNYxydiJiTwVcBTlxzNWod JG5nCdOsBZdVwCp4ed7JDQbSAg== X-Google-Smtp-Source: ABdhPJzDKF6jFIFPiCmQMaGbrE8zRCBnunOjx14Vn+DrS9G9sZ0gPl3TsJaFrd8mLJ2y57TGkDuyTg== X-Received: by 2002:a05:600c:268b:: with SMTP id 11mr6427744wmt.132.1610910309301; Sun, 17 Jan 2021 11:05:09 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:f410:82e8:3a21:eedf]) by smtp.gmail.com with ESMTPSA id c10sm27728806wrb.92.2021.01.17.11.05.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 Jan 2021 11:05:08 -0800 (PST) From: "Basil L. Contovounesios" To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> Date: Sun, 17 Jan 2021 19:05:06 +0000 In-Reply-To: <87sgbv7xtn.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 06 Sep 2020 17:02:28 +0200") Message-ID: <875z3vxu3h.fsf_-_@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > OK, the first sweep has now landed on master (I basically grepped for > " (default %" and then did the changes. Boy, were there many different > ways to "optionally add some defaults" in the code... > > 78 files changed, 316 insertions(+), 453 deletions(-) > > Look at all the lines saved! :-) > > There's also some of the prompting functions that have some support for > this general idea, but in different ways: > > (defun read-regexp (prompt &optional defaults history) > [...] > (input (read-from-minibuffer > (cond ((string-match-p ":[ \t]*\\'" prompt) > prompt) > ((and default (> (length default) 0)) > (format "%s (default %s): " prompt > (query-replace-descr default))) > (t > (format "%s: " prompt))) > nil nil nil (or history 'regexp-history) suggestions t))) Any reason this function wasn't changed in the end? --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-Use-format-prompt-in-read-regexp.patch >From 3d3423ef6705cf157e279c95e5eb8a35b8ca78fb Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Sun, 17 Jan 2021 18:56:50 +0000 Subject: [PATCH] Use format-prompt in read-regexp. * lisp/replace.el (read-regexp): Use format-prompt (bug#12443). --- lisp/replace.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lisp/replace.el b/lisp/replace.el index d41dc98a0d..8f8cbfac54 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -866,13 +866,10 @@ read-regexp ;; Do not automatically add default to the history for empty input. (history-add-new-input nil) (input (read-from-minibuffer - (cond ((string-match-p ":[ \t]*\\'" prompt) - prompt) - ((and default (> (length default) 0)) - (format "%s (default %s): " prompt - (query-replace-descr default))) - (t - (format "%s: " prompt))) + (if (string-match-p ":[ \t]*\\'" prompt) + prompt + (format-prompt prompt (and (length> default 0) + (query-replace-descr default)))) nil nil nil (or history 'regexp-history) suggestions t))) (if (equal input "") ;; Return the default value when the user enters empty input. -- 2.29.2 --=-=-= Content-Type: text/plain -- Basil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 11:41:04 2021 Received: (at 12443) by debbugs.gnu.org; 18 Jan 2021 16:41:04 +0000 Received: from localhost ([127.0.0.1]:48098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1XaR-0006ot-Ul for submit@debbugs.gnu.org; Mon, 18 Jan 2021 11:41:04 -0500 Received: from quimby.gnus.org ([95.216.78.240]:48158) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1XaQ-0006oB-8x for 12443@debbugs.gnu.org; Mon, 18 Jan 2021 11:41:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=Dg2zWDMCgWiOjHibHA3lrTfoSUSRVqRguQuFaQrNnt8=; b=sstxd/KUcTev4EiWhczfsUmB/H a/hwO2SrdEGak6P2WPuMpl51nSxhkl0efplQ7TH72Jx1KJCWWgQusSa3ghPgc8usbArZYaTDz1vf+ immEeTz9ddCMQLkjO4UV8YtIsTP3bbwIKpVok58UFswgk9H2jckv9fW/iMvM3/sUBGfE=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby.gnus.org with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1l1XaH-0004b7-AR; Mon, 18 Jan 2021 17:40:55 +0100 From: Lars Ingebrigtsen To: "Basil L. Contovounesios" Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <875z3vxu3h.fsf_-_@tcd.ie> Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAABGdBTUEAALGPC/xhBQAAACBj SFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAElBMVEUQERdCPUGraBrW nkJeVIr///9/2pvpAAAAAWJLR0QF+G/pxwAAAAd0SU1FB+UBEhAnKlB1TvYAAAGWSURBVDjLdZKN sawgDIUTZwtI0AKENLBCA8sd+q/pJgFR976HOzvI5zn5AwBTSgS60P5CGgsMRJgALwBDAPiQ+NZB p7DcAdwAXgCjHw8AFwB2gH1zBpnpAK/lh68gE9BaSjnoAdyeiy2a0eFcq4P4F4iDY6Z1nqNkE3QQ Hoo0FbvZXYpSNOGs23h1YwRXpmDZvZgJlhEc0+6NmQBL1udQdwfhWxHG2JbzewwO9kdt3i7uIQzs d0K0RjXp/aA7YbTi0KcRz1HY2oiv+d0VCug/ALaqjv8CaGbcWoMv0BPfWntmNUttje+EsY8eCNuH ngoHpLE+Uz+qVx8DevwEesJ83cC7wsGZ3v6WJZbA7xS0EgWt+2A+JOUiIYsO3MhWnSxHzkmyiCTp hSo0N4zJbpg/7kCest2bUI68SIr5gEdKIlBKkrTkPtLZj7WA3htJZMHt/UxXo2piEkP8AhnL/g7q VXqM12eARvW1bVz11w9oa1VnSKHVV+NWK42KifC1ahKBKuvXqtgG0NdkDZ1TOTej9/zd+85/Afnl QwMf1uSIAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIxLTAxLTE4VDE2OjM5OjQyKzAwOjAwcyu61QAA ACV0RVh0ZGF0ZTptb2RpZnkAMjAyMS0wMS0xOFQxNjozOTo0MiswMDowMAJ2AmkAAAAASUVORK5C YII= X-Now-Playing: Hannah Jones's _The Remixes (CD3)_: "Feels Like Heaven (Julian Gingell & Barry Stone Mix)" Date: Mon, 18 Jan 2021 17:40:51 +0100 In-Reply-To: <875z3vxu3h.fsf_-_@tcd.ie> (Basil L. Contovounesios's message of "Sun, 17 Jan 2021 19:05:06 +0000") Message-ID: <87pn22ryek.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: "Basil L. Contovounesios" writes: > Any reason this function wasn't changed in the end? [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) "Basil L. Contovounesios" writes: > Any reason this function wasn't changed in the end? [...] > * lisp/replace.el (read-regexp): Use format-prompt (bug#12443). No, I think I just missed it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 18 13:06:34 2021 Received: (at 12443) by debbugs.gnu.org; 18 Jan 2021 18:06:34 +0000 Received: from localhost ([127.0.0.1]:48418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1YvC-0002m3-Ll for submit@debbugs.gnu.org; Mon, 18 Jan 2021 13:06:34 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:42440) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l1YvA-0002ln-Hv for 12443@debbugs.gnu.org; Mon, 18 Jan 2021 13:06:32 -0500 Received: by mail-wr1-f53.google.com with SMTP id m4so17326287wrx.9 for <12443@debbugs.gnu.org>; Mon, 18 Jan 2021 10:06:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=iNlHnNtVMB319lkcNqwJRjsT8D8d22fjDOBpgiN7R/Y=; b=G+DxQ4gkwBrpxvXPB/1nc6AFdzDpn1pJZCmBiI6Zdlul4MMMDAnOqyXPxvBsGkos79 VVFCqqWYlAaP/jr2ZAQw1zPiPVnmzMXyIZkPS1kgtQ2667LjtHQDOpo21PRJMrhBHXO+ 7AkpZDxmwu+Qnwhf7besMrT/iRCpAbZE3QKz5S1dmSMU8ITm7uhNyUeAG9uKrYxtaSp7 LQ56ftQai7k3C2zvId31CU+oic/MushBuvEnpGn2J9T3awauv/pD6ZyrF4cdwLTN3tQN PZunDF3XVFD/V91vRnDxjRaSR+BVDC3HxVm/wYE1aCQME4VbvW7bhmJ0V0EM7eskNNcX atmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=iNlHnNtVMB319lkcNqwJRjsT8D8d22fjDOBpgiN7R/Y=; b=QKOsT71Qe+JGZxz0XSM3j6oiWRZPeVIa7aj2+iUkiMOXy2maXSzygRhadjdgDpXlhb wW8b4pX29HQ2bkGErDnMsSQQT1kSZAgLZDlAvNqohG2yN0IrY/kLRokOhAnh032pDMA5 8iIQv6I92zke54MFOliCXcL4hZg5k9XA2cYmp2pBJfVtCV9gczdBg5rI6MDzt+4OLCU9 LJoMMrw9MdhCiJ1clOIzLaqDZitlY63h7kGC1HJ9yjqBvr3X7GxTCarIzkCPZAgqew3S AmzhJO5Wk3XSbt4A0wKO+1R5yLBlAwosei0BN/oHU1zU6eCwNSfuVfgR0PMde8B4oRhz PcNA== X-Gm-Message-State: AOAM531dupMg77my6NZYbNkDxRkV3ASugFa6GlAPMmafXrWoYFIMcgsm i+rtJ1ubXssKXOmb3ydLWc8bjiyW9pXVKjvX X-Google-Smtp-Source: ABdhPJw2w5p39WCF4/MS5SUIQmG8OdG7J5gtJYhlke5aZuN76jCV4TTcTVv0E9fb73KZe4EIRiAZxw== X-Received: by 2002:a5d:4e8c:: with SMTP id e12mr621546wru.321.1610993187079; Mon, 18 Jan 2021 10:06:27 -0800 (PST) Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id l1sm32080280wrq.64.2021.01.18.10.06.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 10:06:26 -0800 (PST) From: "Basil L. Contovounesios" To: Lars Ingebrigtsen Subject: Re: bug#12443: 24.2.50; Default values in the minibuffer prompt (fix References: <871ui48di4.fsf@mail.jurta.org> <878se2aox0.fsf@gnus.org> <87imd669dh.fsf@gnus.org> <875z961u2l.fsf@mail.linkov.net> <871rjt1uc1.fsf@gnus.org> <878se0gc25.fsf@mail.linkov.net> <87imd2vp1k.fsf@gnus.org> <87sgbv7xtn.fsf@gnus.org> <875z3vxu3h.fsf_-_@tcd.ie> <87pn22ryek.fsf@gnus.org> Date: Mon, 18 Jan 2021 18:06:25 +0000 In-Reply-To: <87pn22ryek.fsf@gnus.org> (Lars Ingebrigtsen's message of "Mon, 18 Jan 2021 17:40:51 +0100") Message-ID: <87pn2286hq.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 12443 Cc: Juri Linkov , Dani Moncayo , Stefan Kangas , Stefan Monnier , 12443@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Lars Ingebrigtsen writes: > "Basil L. Contovounesios" writes: > >> Any reason this function wasn't changed in the end? > > [...] > >> * lisp/replace.el (read-regexp): Use format-prompt (bug#12443). > > No, I think I just missed it. Thanks, pushed. Use format-prompt in read-regexp. bdb9889f78 2021-01-18 17:58:42 +0000 https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=bdb9889f784dc6113a74c259a53cf0623e49ab2d -- Basil From unknown Fri Jun 20 20:12:22 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 16 Feb 2021 12:24:06 +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