From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#36324: 27.0.50; Error in savehist-save: (wrong-type-argument listp t) Date: Sun, 23 Jun 2019 14:01:09 +0200 Message-ID: References: <87zhma9b6v.fsf@web.de> <87h88ir09w.fsf@web.de> <87lfxuxs76.fsf@web.de> <87imsxiqp9.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="16952"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 36324@debbugs.gnu.org, Davor Rotim To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 23 14:02:35 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf1Cc-0004BB-Il for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Jun 2019 14:02:34 +0200 Original-Received: from localhost ([::1]:44536 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf1CV-0002ka-8H for geb-bug-gnu-emacs@m.gmane.org; Sun, 23 Jun 2019 08:02:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:40096) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hf1CD-0002kR-W6 for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 08:02:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hf1C8-0000nh-Vf for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 08:02:07 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:39395) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hf1C5-0000Vb-SG for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 08:02:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hf1C5-00063p-LB for bug-gnu-emacs@gnu.org; Sun, 23 Jun 2019 08:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 23 Jun 2019 12:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36324 X-GNU-PR-Package: emacs Original-Received: via spool by 36324-submit@debbugs.gnu.org id=B36324.156129130623277 (code B ref 36324); Sun, 23 Jun 2019 12:02:01 +0000 Original-Received: (at 36324) by debbugs.gnu.org; 23 Jun 2019 12:01:46 +0000 Original-Received: from localhost ([127.0.0.1]:52939 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf1Bq-00063M-70 for submit@debbugs.gnu.org; Sun, 23 Jun 2019 08:01:46 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:39670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hf1Bn-00063D-MD for 36324@debbugs.gnu.org; Sun, 23 Jun 2019 08:01:44 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hf1BX-0005lx-3z; Sun, 23 Jun 2019 14:01:34 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAMFBMVEUiISExMTNbWlza29vy 8u+Xlpm+v79GSUmjo6Tq6+aurq76+vj29vT////9/vyGgodtKnEUAAAAvklEQVQ4jWO4iwMwEJC4 8haHxL29pBqFAFdI1oFLYgvplqNJXMElgVUHanCcxaVjL6WuIkbiHLLElR/2i79afP62NvL2smyI wxjugBx7o/wTm2BCKbsy601FmFGX5wLJq3++iim1/xdULT8bAPUJxKhbCt/ZChNKBZUUPAtQLL/Z 5rpy2YmYVVm3vLuQJGCexXAuRtIh0YPDXuKmC5E60EMSi4QvYaN24pLAiKg76Ebd9MUhgdVVxErc xiVxGQDQU8nJVNDCdgAAAABJRU5ErkJggg== In-Reply-To: <87imsxiqp9.fsf@web.de> (Michael Heerdegen's message of "Sat, 22 Jun 2019 17:29:22 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161097 Archived-At: Michael Heerdegen writes: >> The doc string for `read-from-minibuffer' doesn't document the t value >> for HISTORY at all -- perhaps that should also be fixed? > > It's also not hardcoded AFAIK. t is non-nil so Qminibuffer_history > isn't substituted in `read-from-minibuffer', and it's not listp so > `add-to-history' ignores it silently. AFAIU other values V with these > properties would also work this way but still provoke the > (wrong-type-argument listp V) error. > > Having some input not recorded in a history is a useful feature. IMHO > this should be doable in an official way, and be documented. Yes, it's a useful feature, and it should be documented, but before doing that, I wonder how this feature developed. It was developed in 2012, apparently, when `read-passwd' changed from this ad-hoc way to the `t': - (read-string prompt nil - (let ((sym (make-symbol "forget-history"))) - (set sym nil) - sym) - default) + (read-string prompt nil t default) ; t = "no history" This apparently came from an XEmacs convention, which explains this 2005 change to savehist.el: - (add-to-list 'savehist-minibuffer-history-variables - minibuffer-history-variable)) + ;; XEmacs sets minibuffer-history-variable to t to mean "no history + ;; is being recorded". + (unless (eq minibuffer-history-variable t) + (add-to-list 'savehist-minibuffer-history-variables + minibuffer-history-variable))) So the `t' being the "no history" signal isn't just some random artefact, but is the design, so I'm just going to go ahead and document that in `read-from-minibuffer', which explains all the details about HISTORY. I'll add it to `minibuffer-history-variable' for completeness' sake, too. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no