From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#16542: 24.3.50; When finding a file via a bookmark, that file is not part of file-name-history Date: Mon, 27 Jan 2014 09:31:29 -0800 (PST) Message-ID: References: <87lhy5kqa9.fsf@bzg.ath.cx> <87lhy1slx2.fsf@bzg.ath.cx> <877g9l1m4c.fsf@bzg.ath.cx> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1390843939 29957 80.91.229.3 (27 Jan 2014 17:32:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Jan 2014 17:32:19 +0000 (UTC) Cc: 16542@debbugs.gnu.org To: Bastien Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jan 27 18:32:23 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W7q2p-0005uR-9q for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 18:32:23 +0100 Original-Received: from localhost ([::1]:60912 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7q2o-0004w0-SJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Jan 2014 12:32:22 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7q2d-0004qq-B3 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 12:32:20 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W7q2U-0004uA-P9 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 12:32:11 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W7q2U-0004u6-M2 for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 12:32:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W7q2U-0007CW-2R for bug-gnu-emacs@gnu.org; Mon, 27 Jan 2014 12:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 27 Jan 2014 17:32:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16542 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 16542-submit@debbugs.gnu.org id=B16542.139084390027642 (code B ref 16542); Mon, 27 Jan 2014 17:32:01 +0000 Original-Received: (at 16542) by debbugs.gnu.org; 27 Jan 2014 17:31:40 +0000 Original-Received: from localhost ([127.0.0.1]:38350 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7q27-0007Bk-8C for submit@debbugs.gnu.org; Mon, 27 Jan 2014 12:31:39 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:40162) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W7q23-0007BR-Hu for 16542@debbugs.gnu.org; Mon, 27 Jan 2014 12:31:36 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0RHVVIp019240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 27 Jan 2014 17:31:32 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0RHVU5I015689 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 27 Jan 2014 17:31:31 GMT Original-Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0RHVUdP007372; Mon, 27 Jan 2014 17:31:30 GMT In-Reply-To: <877g9l1m4c.fsf@bzg.ath.cx> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:84132 Archived-At: > I suggest we build a list of Emacs Elisp commands that are > candidates for adding a file name to file-name-history: > - bookmark-jump > - bookmark-jump-other-window > - dired-find-file > - dired-find-file-other-window > come to my mind. Thanks for adding others. I suggest taking this to emacs-devel. > Then a new option find-file-history can contain 'bookmark 'dired > and the likes to control whether the related features should add > the file name to `file-name-history'. I'd sooner see this: 1. A user option such as what you describe, but with nil meaning "go for it generally: let the command decide", a non-nil list as you mention meaning "do not let these commands decide", and any other non-nil value meaning "do not let any command decide". IOW, something like this: (defcustom add-to-file-history-only-if-input () "Which commands to disallow adding non-input file names to the history. When a file name is read in the minibuffer, the name you enter is typically added to `file-name-history'. Some commands may optionally add additional file names to this minibuffer history. If the option value is not a list then do not let any commands add a file name to the history unless you enter that name as minibuffer input. Otherwise, the value is a list of commands to disallow adding a name you did not enter. (If the value is nil, no commands are disallowed; they can all add file names that you do not enter.)" :type '(choice (const :tag "Let no command add a file name I do not enter" t) (repeat :tag "Commands that cannot add file names I do not enter" (restricted-sexp :tag "Command that cannot add unentered file names to history" ;; Use `symbolp' instead of `commandp', in case the ;; library defining the command is not yet loaded. :match-alternatives (symbolp) :value ignore))) :group 'files :group 'minibuffer) 2. If a given command is not excluded by the option (see #1) then it can, if it wants, add another file name (e.g. a visited file) to `file-name-history'. If a command wants to offer the possibility of such inclusion, it first tests the option value to see if the user allows that. (There is also the question of whether to do something similar for other minibuffer histories, besides `file-name-history'. But we=20 can probably forget about that, for now.)