From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 01 21:08:50 2019 Received: (at submit) by debbugs.gnu.org; 2 Nov 2019 01:08:50 +0000 Received: from localhost ([127.0.0.1]:57702 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQhuM-0004z4-3k for submit@debbugs.gnu.org; Fri, 01 Nov 2019 21:08:50 -0400 Received: from lists.gnu.org ([209.51.188.17]:45968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQhuL-0004yv-1B for submit@debbugs.gnu.org; Fri, 01 Nov 2019 21:08:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33337) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iQhuJ-0005Cx-3v for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 21:08:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iQhuH-000754-Pw for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 21:08:46 -0400 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21458) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iQhuH-0006yy-5W for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2019 21:08:45 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1572656920; cv=none; d=zohomail.com; s=zohoarc; b=KhGpitgCb1ILmK5mvGG3MQBDaNEhihT18zUDy96pd5J0FsJyiGWXdt0+EIuLglBUWVpUBGwBJWHaRQazGkf5M82cY+eGLg1jmnavabF/6KyoL1k6B+Mn9dQM3ogryhSmm7yIeCiKVQPorHS/8rmfXS9WsEIA3DTzin8gv8eDIn4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1572656920; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=uyYuLTnRg3hZZqGJV0Oi4D6ZNqy965PTxv5whFk8kO0=; b=crtAAG5JaN6lZ4OoHfWRS2g36TkVYPeyZ5dOyr2n2QJqGk0SRTwhmTyk7AouTxvgRpCdifeGH368Vnsrg+cxqtQfFPzcgwfeEBE7b3664X2SjZrJ8PyGl/y2yBeWiNPYyZxgG4x/2/ezOUPiqDy895OP2qU+ufQJyH+I+PyiskM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1572656920; s=zoho; d=topbug.net; i=hong@topbug.net; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; l=1802; bh=uyYuLTnRg3hZZqGJV0Oi4D6ZNqy965PTxv5whFk8kO0=; b=AJnNz9qDvi7lDyu7/JCzijASO1WGIZ37uW87VbXNE+GeMbL2Q0xF7nA2hkEO/0IF 7An48OhiSE5JZahHbL+LT4Xcqje6POBIttxHS9eaHyRDIzGKIXSEW65Y7xlBInYebCl KJFro3KwMjIJRABZKUSEfX0FnfWhmSlwE1J501SE= Received: from home (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1572656918820630.791776761643; Fri, 1 Nov 2019 18:08:38 -0700 (PDT) From: Hong Xu To: bug-gnu-emacs@gnu.org Subject: [PATCH] Explain negative NABS in `goto-history-element'. Date: Fri, 01 Nov 2019 18:08:38 -0700 Message-ID: <8736f7ccfd.fsf@topbug.net> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 136.143.188.54 X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit 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: -2.3 (--) * doc/lispref/minibuf.texi (Minibuffer Commands): Explain negative NABS. * lisp/simple.el (goto-history-element): Explain negative NABS. --- doc/lispref/minibuf.texi | 5 +++++ lisp/simple.el | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index d36babd69873..a9bb3aec9583 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2339,6 +2339,11 @@ Minibuffer Commands minibuffer. The argument @var{nabs} specifies the absolute history position in descending order, where 0 means the current element and a positive number @var{n} means the @var{n}th previous element. + +@{nabs} being a negative number @var{n} means the @var{n-1}th element +of @code{minibuffer-default} if it is a list, or otherwise the value +of @code{minibuffer-default}. This is usually an intelligent guess of +what the user intends to input." @end deffn @node Minibuffer Windows diff --git a/lisp/simple.el b/lisp/simple.el index 10aecd651f39..e95e2bc22972 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2130,7 +2130,12 @@ goto-history-element "Puts element of the minibuffer history in the minibuffer. The argument NABS specifies the absolute history position in descending order, where 0 means the current element and a -positive number N means the Nth previous element." +positive number N means the Nth previous element. + +NABS being a negative number N means the (N-1)th element of +`minibuffer-default' if it is a list, or otherwise the value of +`minibuffer-default'. This is usually an intelligent guess of +what the user intends to input." (interactive "p") (when (and (not minibuffer-default-add-done) (functionp minibuffer-default-add-function) -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 04:03:25 2019 Received: (at 38026) by debbugs.gnu.org; 2 Nov 2019 08:03:25 +0000 Received: from localhost ([127.0.0.1]:58041 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQoNZ-0001E0-76 for submit@debbugs.gnu.org; Sat, 02 Nov 2019 04:03:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40401) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQoNX-0001Do-WD for 38026@debbugs.gnu.org; Sat, 02 Nov 2019 04:03:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:50053) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQoNS-0006g1-MV; Sat, 02 Nov 2019 04:03:18 -0400 Received: from [176.228.60.248] (port=3271 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQoNO-0002da-GU; Sat, 02 Nov 2019 04:03:17 -0400 Date: Sat, 02 Nov 2019 10:03:19 +0200 Message-Id: <83h83mk8mw.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <8736f7ccfd.fsf@topbug.net> (message from Hong Xu on Fri, 01 Nov 2019 18:08:38 -0700) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. References: <8736f7ccfd.fsf@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38026 Cc: 38026@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: Hong Xu > Date: Fri, 01 Nov 2019 18:08:38 -0700 > > > --- a/doc/lispref/minibuf.texi > +++ b/doc/lispref/minibuf.texi > @@ -2339,6 +2339,11 @@ Minibuffer Commands > minibuffer. The argument @var{nabs} specifies the absolute history > position in descending order, where 0 means the current element and a > positive number @var{n} means the @var{n}th previous element. > + > +@{nabs} being a negative number @var{n} means the @var{n-1}th element > +of @code{minibuffer-default} if it is a list, or otherwise the value > +of @code{minibuffer-default}. This is usually an intelligent guess of > +what the user intends to input." Thanks, but I don't see how this clarifies the issue. Can you tell more about your motivation? From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 13:07:15 2019 Received: (at 38026) by debbugs.gnu.org; 2 Nov 2019 17:07:15 +0000 Received: from localhost ([127.0.0.1]:33016 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQwro-0007YA-5m for submit@debbugs.gnu.org; Sat, 02 Nov 2019 13:07:15 -0400 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21499) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQwrl-0007Xz-QU for 38026@debbugs.gnu.org; Sat, 02 Nov 2019 13:07:10 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1572714426; cv=none; d=zohomail.com; s=zohoarc; b=VMk6ZO4OYrsDkJa5HdThBd9+KcorbA1szEkvB0vYeHoty4YNNl4KLN8Kvwxs2ren3vRZbWr7y1MVfp/KVaK3WspDfDBIkQQ4fVuqeMAQ92Ox5rj2fRxm0jCpMV+32bWwqTw4D//DH5QzzsKJiaJRyHFFx4OTxK0sx1uvIDwp/k8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1572714426; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=mtBxQroToj87o0aiZEnwsIVZZDEfuNwZjI54ZdRA62k=; b=CJCrndqKjdEKcUGGagkaUiKJ3ERyu/IDTS8Qe3+7tJlIA+/sFX+H62Ykb8WPbPqjN91GBvuPK+kbB2KPMlkhmKuNzvPpY0i/DbP9zvx5PTI8sDUw+A3/ymTU24MmOO3zm98LQUjPBxgXPknvCbdiXWth7RbyFTbhDV6IFO9s15Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1572714426; s=zoho; d=topbug.net; i=hong@topbug.net; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; l=274; bh=mtBxQroToj87o0aiZEnwsIVZZDEfuNwZjI54ZdRA62k=; b=ez7AJst+nWddbvLPFFbuEZ9h/24UjuXT344cMY0Ocwy0B7nmaPrdvQv5vkA8++kk MfGDVhfKsBOnMmjCPqEoAMg1Vec3Dp5qpu3jMPKkOuVg2n0XR2UC4TlzDtV1ZJeq+rX /Ta1/JKgD0VOn+0DVjJHEc0UMUDb1Y8jOuiaatfo= Received: from [192.168.88.88] (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1572714423876192.63322610466923; Sat, 2 Nov 2019 10:07:03 -0700 (PDT) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. To: Eli Zaretskii References: <8736f7ccfd.fsf@topbug.net> <83h83mk8mw.fsf@gnu.org> From: Hong Xu Openpgp: preference=signencrypt Message-ID: <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> Date: Sat, 2 Nov 2019 10:07:03 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <83h83mk8mw.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38026 Cc: 38026@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 (-) On 11/2/19 1:03 AM, Eli Zaretskii wrote: > Thanks, but I don't see how this clarifies the issue. Can you tell > more about your motivation? > The motivation is to clarify what a negative NABS means. From the current document, it is unclear that NABS can be negative. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 02 13:54:33 2019 Received: (at 38026) by debbugs.gnu.org; 2 Nov 2019 17:54:33 +0000 Received: from localhost ([127.0.0.1]:33061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQxbc-0002Sw-MY for submit@debbugs.gnu.org; Sat, 02 Nov 2019 13:54:32 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iQxba-0002Sh-SV for 38026@debbugs.gnu.org; Sat, 02 Nov 2019 13:54:31 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:58590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iQxbV-0006Ln-Gb; Sat, 02 Nov 2019 13:54:25 -0400 Received: from [176.228.60.248] (port=4249 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iQxbS-0007m3-Q7; Sat, 02 Nov 2019 13:54:25 -0400 Date: Sat, 02 Nov 2019 19:54:14 +0200 Message-Id: <83sgn6i2pl.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> (message from Hong Xu on Sat, 2 Nov 2019 10:07:03 -0700) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. References: <8736f7ccfd.fsf@topbug.net> <83h83mk8mw.fsf@gnu.org> <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38026 Cc: 38026@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 (---) > Cc: 38026@debbugs.gnu.org > From: Hong Xu > Date: Sat, 2 Nov 2019 10:07:03 -0700 > > On 11/2/19 1:03 AM, Eli Zaretskii wrote: > > Thanks, but I don't see how this clarifies the issue. Can you tell > > more about your motivation? > > > > The motivation is to clarify what a negative NABS means. From the current document, it is unclear that NABS can be negative. In that case, the patch is insufficient. First, we don't document minibuffer-default in the manual, so referencing it will leave the reader wondering what it is, and how it is set and used. Second, the doc string of goto-history-element should also explain what is the meaning of negative values. And third, several functions bind minibuffer-default to certain values, and I'm not sure this variable can usefully be documented in a manual. So I think the text needs not reference minibuffer-default, but instead talk about "future history", like the Emacs manual does. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Nov 03 01:12:05 2019 Received: (at 38026) by debbugs.gnu.org; 3 Nov 2019 05:12:05 +0000 Received: from localhost ([127.0.0.1]:33340 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iR8BI-0004nk-RB for submit@debbugs.gnu.org; Sun, 03 Nov 2019 01:12:05 -0400 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21494) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iR8BG-0004nK-1U for 38026@debbugs.gnu.org; Sun, 03 Nov 2019 01:12:02 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1572757915; cv=none; d=zohomail.com; s=zohoarc; b=J56KeCmlmJdiafTO8k0mJaYHPXU19QWrXkR6ahjxFAbTAxuXcY1yCP18660iJunTlzEsfNz16jMlwuvzm4J/EvpIm6sExpm+pc/Rj87ZORC6aLL0h6WQRzZf3pGsECF27e0Be8Ez4DT+W/1z3s1923CeYPwD63817VUK92fM188= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1572757915; h=Content-Type:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=Xh3WhZUx/EtSCOupZ4yKcZ7RCm/hvlRS2/BJWafcaA4=; b=dN0Lj7vdLRoYC47HpnCl3NM9Fkg1WyKlc9oPSSdBo36qf+tgMDETfFMRqmrklwlkKJDwVk3nlUD+lUxEZfcdAvtJAXxYby4S3MB+YEUtpo+2Nu/hh/gWm/5DITJ8xP7deyJfI9i8lT+ygrdZ7ycPe+7Vgi/fAFUeojYfzx4+SIg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1572757915; s=zoho; d=topbug.net; i=hong@topbug.net; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type; l=4501; bh=Xh3WhZUx/EtSCOupZ4yKcZ7RCm/hvlRS2/BJWafcaA4=; b=G2xwPWGFd50uUkKHD0NzCPkkuhdTOpvJte5JXgkDYmX7t7t7OHpxxzPnBFf/2UAN ZoUXbkEnTB0pbHoIgD8985tfOWledc4UIE3DCC5bIJnAmA/LvFWa3UvIK4ec+Vsv423 V0K1N+RKp+VE1CM3TP4JV7yxjAoEPqDTBhmp5Nbk= Received: from [192.168.88.88] (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1572757913965692.8732118457467; Sat, 2 Nov 2019 22:11:53 -0700 (PDT) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. To: Eli Zaretskii References: <8736f7ccfd.fsf@topbug.net> <83h83mk8mw.fsf@gnu.org> <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> <83sgn6i2pl.fsf@gnu.org> From: Hong Xu Openpgp: preference=signencrypt Message-ID: <2436a065-6f5b-69f7-026b-364062695d24@topbug.net> Date: Sat, 2 Nov 2019 22:11:53 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <83sgn6i2pl.fsf@gnu.org> Content-Type: multipart/mixed; boundary="------------E206DA36CDA19A5C72EA22FF" Content-Language: en-US X-Zoho-Virus-Status: 1 X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38026 Cc: 38026@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 (-) This is a multi-part message in MIME format. --------------E206DA36CDA19A5C72EA22FF Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 11/2/19 10:54 AM, Eli Zaretskii wrote: >> Cc: 38026@debbugs.gnu.org >> From: Hong Xu >> Date: Sat, 2 Nov 2019 10:07:03 -0700 >> >> On 11/2/19 1:03 AM, Eli Zaretskii wrote: >>> Thanks, but I don't see how this clarifies the issue. Can you tell >>> more about your motivation? >>> >> >> The motivation is to clarify what a negative NABS means. From the current document, it is unclear that NABS can be negative. > > In that case, the patch is insufficient. First, we don't document > minibuffer-default in the manual, so referencing it will leave the > reader wondering what it is, and how it is set and used. Second, the > doc string of goto-history-element should also explain what is the > meaning of negative values. And third, several functions bind > minibuffer-default to certain values, and I'm not sure this variable > can usefully be documented in a manual. > > So I think the text needs not reference minibuffer-default, but > instead talk about "future history", like the Emacs manual does. > Thanks. Sounds like a good idea. I've attached an update. --------------E206DA36CDA19A5C72EA22FF Content-Type: text/x-patch; name="0001-Mention-future-history-in-some-history-related-minib.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="0001-Mention-future-history-in-some-history-related-minib.pa"; filename*1="tch" >From 5ccc55886957ad81ffd7c3cd14adf05f0372d3ef Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Fri, 1 Nov 2019 18:06:44 -0700 Subject: [PATCH] Mention future history in some history-related minibuffer commands. * lisp/simple.el (goto-history-element): Explain negative NABS. * doc/lispref/minibuf.texi (Minibuffer Commands): Explain negative NABS. * lisp/simple.el (next-history-element): Mention ``future history.'' * doc/lispref/minibuf.texi (Minibuffer Commands): Mention ``future history.'' --- doc/lispref/minibuf.texi | 7 +++++-- lisp/simple.el | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi index d36babd69873..b5798a9c174a 100644 --- a/doc/lispref/minibuf.texi +++ b/doc/lispref/minibuf.texi @@ -2307,7 +2307,8 @@ Minibuffer Commands @deffn Command next-history-element n This command replaces the minibuffer contents with the value of the -@var{n}th more recent history element. +@var{n}th more recent history element. The position in the history +can go beyond the current position and invoke ``future history.'' @end deffn @deffn Command previous-matching-history-element pattern n @@ -2338,7 +2339,9 @@ Minibuffer Commands This function puts element of the minibuffer history in the minibuffer. The argument @var{nabs} specifies the absolute history position in descending order, where 0 means the current element and a -positive number @var{n} means the @var{n}th previous element. +positive number @var{n} means the @var{n}th previous element. NABS +being a negative number -@var{n} means the @var{n}th entry of ``future +history.'' @end deffn @node Minibuffer Windows diff --git a/lisp/simple.el b/lisp/simple.el index 10aecd651f39..b7a601b2e2d7 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2130,7 +2130,8 @@ goto-history-element "Puts element of the minibuffer history in the minibuffer. The argument NABS specifies the absolute history position in descending order, where 0 means the current element and a -positive number N means the Nth previous element." +positive number N means the Nth previous element. NABS being a +negative number -N means the Nth entry of ``future history.''" (interactive "p") (when (and (not minibuffer-default-add-done) (functionp minibuffer-default-add-function) @@ -2187,7 +2188,9 @@ goto-history-element (defun next-history-element (n) "Puts next element of the minibuffer history in the minibuffer. -With argument N, it uses the Nth following element." +With argument N, it uses the Nth following element. The position +in the history can go beyond the current position and invoke +``future history.''" (interactive "p") (or (zerop n) (goto-history-element (- minibuffer-history-position n)))) -- 2.20.1 --------------E206DA36CDA19A5C72EA22FF-- From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 04:46:19 2019 Received: (at 38026-done) by debbugs.gnu.org; 9 Nov 2019 09:46:20 +0000 Received: from localhost ([127.0.0.1]:48211 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTNJz-0007lX-KG for submit@debbugs.gnu.org; Sat, 09 Nov 2019 04:46:19 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTNJx-0007lL-Vm for 38026-done@debbugs.gnu.org; Sat, 09 Nov 2019 04:46:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:37336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTNJs-00021D-MQ; Sat, 09 Nov 2019 04:46:12 -0500 Received: from [176.228.60.248] (port=1459 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTNJs-0000Ih-60; Sat, 09 Nov 2019 04:46:12 -0500 Date: Sat, 09 Nov 2019 11:46:04 +0200 Message-Id: <838sop9ycj.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <2436a065-6f5b-69f7-026b-364062695d24@topbug.net> (message from Hong Xu on Sat, 2 Nov 2019 22:11:53 -0700) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. References: <8736f7ccfd.fsf@topbug.net> <83h83mk8mw.fsf@gnu.org> <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> <83sgn6i2pl.fsf@gnu.org> <2436a065-6f5b-69f7-026b-364062695d24@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38026-done Cc: 38026-done@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 (---) > Cc: 38026@debbugs.gnu.org > From: Hong Xu > Date: Sat, 2 Nov 2019 22:11:53 -0700 > > > So I think the text needs not reference minibuffer-default, but > > instead talk about "future history", like the Emacs manual does. > > > > Thanks. Sounds like a good idea. I've attached an update. Thanks, I pushed this, but please see how I fixed the log message, and also the additional fixes in my following commit. In particular, please always mention the bug number in the commit log message. From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 13:49:15 2019 Received: (at 38026-done) by debbugs.gnu.org; 9 Nov 2019 18:49:15 +0000 Received: from localhost ([127.0.0.1]:50280 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTVnO-0002ge-Kh for submit@debbugs.gnu.org; Sat, 09 Nov 2019 13:49:15 -0500 Received: from sender4-of-o54.zoho.com ([136.143.188.54]:21458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTVnM-0002gT-FR for 38026-done@debbugs.gnu.org; Sat, 09 Nov 2019 13:49:12 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1573325337; cv=none; d=zohomail.com; s=zohoarc; b=UhWk2ky+Q6Vh58/GSnA0RqEYIw4P4lcsK92wzkf6ty9+a2Cqr7EJvFQM4gaRE5CNw6yKP93IjTDgg7U0a3xzjJw1iuNO4A4Gu0o/peZVfSIx6Vx8ckH+/IeAscsgXlICLTARlOlBgaU7GW5cv8ghKnXcevl/5p/AFhxTMBfAHDw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1573325337; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=HT8sDFqpRmmjcqVKkVbyQe/zau15IC1ffBqeLupqiIc=; b=H/AGAeCXlgvJT1X740Ue9rQRgMyWvvwZsu+mbiEySZILyglDhgbhZ7GBzDQn21bqbqQNKrQMeVM2vll+VinuKLO2/sKKNTi6xIItN3k2+1dL422TifEgvO5MMin+PgX99GiiTQYzwMnmg6pSxHS0Be37VHPv4Q+zPvmo93xzuAw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=topbug.net; spf=pass smtp.mailfrom=hong@topbug.net; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1573325337; s=zoho; d=topbug.net; i=hong@topbug.net; h=Subject:To:Cc:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; l=1588; bh=HT8sDFqpRmmjcqVKkVbyQe/zau15IC1ffBqeLupqiIc=; b=dwW6NE6U/cOakW6DqyP0tBE6jAbLwSn8jb9fGeds+xUTeFHEgj6W9a4b1v1asoDX 18pLdLQHjEIgTHer+JJgf27jPAy5adF2OE67vTlV5cY4ExrB5h6DxbMwqXh+yjn7VvZ R0JsxSHFERto6rL9lOttrm1g7E0oUv9pcJ41ZUO4= Received: from [192.168.88.88] (69-215-149-151.lightspeed.sntcca.sbcglobal.net [69.215.149.151]) by mx.zohomail.com with SMTPS id 1573325335493741.3055978544879; Sat, 9 Nov 2019 10:48:55 -0800 (PST) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. To: Eli Zaretskii References: <8736f7ccfd.fsf@topbug.net> <83h83mk8mw.fsf@gnu.org> <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> <83sgn6i2pl.fsf@gnu.org> <2436a065-6f5b-69f7-026b-364062695d24@topbug.net> <838sop9ycj.fsf@gnu.org> From: Hong Xu Openpgp: preference=signencrypt Message-ID: <1ea8143a-e3dc-136f-d4c7-92380099d612@topbug.net> Date: Sat, 9 Nov 2019 10:48:54 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <838sop9ycj.fsf@gnu.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-ZohoMailClient: External X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 38026-done Cc: 38026-done@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 (-) On 11/9/19 1:46 AM, Eli Zaretskii wrote: >> Cc: 38026@debbugs.gnu.org >> From: Hong Xu >> Date: Sat, 2 Nov 2019 22:11:53 -0700 >> >>> So I think the text needs not reference minibuffer-default, but >>> instead talk about "future history", like the Emacs manual does. >>> >> >> Thanks. Sounds like a good idea. I've attached an update. > > Thanks, I pushed this, but please see how I fixed the log message, and > also the additional fixes in my following commit. In particular, > please always mention the bug number in the commit log message. > Thanks. I did a search on "future history" git grep 'future history' Except a result in Changelog, everywhere else uses `` and ''. doc/emacs/ChangeLog.1:5380:34: (Minibuffer History): Describe "future history" list. State default doc/emacs/mini.texi:647:25:as moving through the ``future history''. doc/emacs/mini.texi:649:9:@cindex future history for file names doc/emacs/mini.texi:652:9: The ``future history'' for file names includes several possible doc/emacs/mini.texi:660:19:value, then the ``future history'' of file names will include only the doc/lispref/minibuf.texi:144:9:@cindex future history in minibuffer input doc/lispref/minibuf.texi:148:3:``future history'', available to the user with @kbd{M-n}. doc/lispref/minibuf.texi:2312:49:can go beyond the current position and invoke ``future history'' lisp/simple.el:2134:45:negative number -N means the Nth entry of \"future history.\"" Are you sure that we should change them to " in the newly added doc? Hong From debbugs-submit-bounces@debbugs.gnu.org Sat Nov 09 15:01:06 2019 Received: (at 38026) by debbugs.gnu.org; 9 Nov 2019 20:01:06 +0000 Received: from localhost ([127.0.0.1]:50308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTWuv-0004Sh-TK for submit@debbugs.gnu.org; Sat, 09 Nov 2019 15:01:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iTWut-0004S3-J2 for 38026@debbugs.gnu.org; Sat, 09 Nov 2019 15:01:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43740) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iTWug-000464-8Y; Sat, 09 Nov 2019 15:00:51 -0500 Received: from [176.228.60.248] (port=3822 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1iTWuf-0007SN-Jx; Sat, 09 Nov 2019 15:00:50 -0500 Date: Sat, 09 Nov 2019 22:00:42 +0200 Message-Id: <83ftiw95w5.fsf@gnu.org> From: Eli Zaretskii To: Hong Xu In-reply-to: <1ea8143a-e3dc-136f-d4c7-92380099d612@topbug.net> (message from Hong Xu on Sat, 9 Nov 2019 10:48:54 -0800) Subject: Re: bug#38026: [PATCH] Explain negative NABS in `goto-history-element'. References: <8736f7ccfd.fsf@topbug.net> <83h83mk8mw.fsf@gnu.org> <86065fb6-a830-a575-f5c4-7cae336a768d@topbug.net> <83sgn6i2pl.fsf@gnu.org> <2436a065-6f5b-69f7-026b-364062695d24@topbug.net> <838sop9ycj.fsf@gnu.org> <1ea8143a-e3dc-136f-d4c7-92380099d612@topbug.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 38026 Cc: 38026@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 (---) > Cc: 38026-done@debbugs.gnu.org > From: Hong Xu > Date: Sat, 9 Nov 2019 10:48:54 -0800 > > I did a search on "future history" > > git grep 'future history' > > Except a result in Changelog, everywhere else uses `` and ''. It is correct in Texinfo files, but not in a doc string. ``..'' in a doc string doesn't get rendered as curved double quotes, but as two curved single quotes, which is not what you want. From unknown Sat Aug 16 23:45:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 08 Dec 2019 12:24:04 +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