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: Tue, 28 Jan 2014 08:20:26 -0800 (PST) Message-ID: References: <87lhy5kqa9.fsf@bzg.ath.cx> <87lhy1slx2.fsf@bzg.ath.cx> <877g9l1m4c.fsf@bzg.ath.cx> <87bnywpohw.fsf@mail.jurta.org> 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 1390926324 2539 80.91.229.3 (28 Jan 2014 16:25:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Jan 2014 16:25:24 +0000 (UTC) Cc: Bastien , 16542@debbugs.gnu.org To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 28 17:25:26 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 1W8BTZ-0006Mg-FJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 17:25:25 +0100 Original-Received: from localhost ([::1]:38152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8BTY-000557-MJ for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Jan 2014 11:25:24 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8BTM-00052M-8w for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 11:25:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W8BTD-0000ae-NV for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 11:25:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53662) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W8BTD-0000a4-Kc for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 11:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W8BTC-0004L8-Gb for bug-gnu-emacs@gnu.org; Tue, 28 Jan 2014 11:25: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: Tue, 28 Jan 2014 16:25:02 +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.139092626216625 (code B ref 16542); Tue, 28 Jan 2014 16:25:02 +0000 Original-Received: (at 16542) by debbugs.gnu.org; 28 Jan 2014 16:24:22 +0000 Original-Received: from localhost ([127.0.0.1]:39448 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8BSW-0004K4-Nj for submit@debbugs.gnu.org; Tue, 28 Jan 2014 11:24:21 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:20326) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W8BSB-0004JI-PH for 16542@debbugs.gnu.org; Tue, 28 Jan 2014 11:24:18 -0500 Original-Received: from ucsinet22.oracle.com (ucsinet22.oracle.com [156.151.31.94]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s0SGNwlT015885 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Jan 2014 16:23:59 GMT Original-Received: from userz7021.oracle.com (userz7021.oracle.com [156.151.31.85]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s0SGKRaH022194 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 28 Jan 2014 16:23:58 GMT Original-Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by userz7021.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s0SGKRRY002211; Tue, 28 Jan 2014 16:20:27 GMT In-Reply-To: <87bnywpohw.fsf@mail.jurta.org> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.8 (707110) [OL 12.0.6680.5000 (x86)] X-Source-IP: ucsinet22.oracle.com [156.151.31.94] 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:84171 Archived-At: > > 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". >=20 > I think a cleaner solution would be to have two separate history > lists: > > 1. history of minibuffer input > 2. history of visited files > > and a new option to select which history to access via M-p > in the minibuffer that reads a file name. I see nothing "cleaner" about that. But it is a reasonable proposal. Here are some arguments against it: a. That makes the lists exclusive - the file names are not merged into one list. So they are not accessible by simple cycling. Unless you meant that #2 would subsume #1 as a proper subset. (But a file name can be entered without the file being visited, so your description of #2 would need to be changed slightly, if we assume that #2 includes everything in #1.) b. It means that the choice of which of those exclusive histories to use would be decided ahead of time, when the user option is set. c. It would not give the command any control over what is appropriate for it. I prefer that (i) the user have ultimate control, and (ii) when allowed by the user, the command can decide. > Actually we already have a history of recently visited files > in recentf, so we could add `bookmark-jump' to `recentf-used-hooks'. > Or maybe this is not needed because it already contains `find-file- > hook'. I agree that recentf should include files visited by jumping to bookmarks. I think that is already the case, but if not, yes, let's fix that first, for sure. The purpose of recentf is to record recently visited files. The purpose of `file-name-history' is to record file names entered in the minibuffer. Different purposes, for different uses. Yet another approach would be to let users cycle through recentf files during file-name input, using a different key from `M-p' etc. But that has the same drawback as your proposal: separate list do not reflect a single chronological history. Bastien's original suggestion, and the user option I presented, include (some) visited files in `file-name-history', not just in the recentf history. I think this is clean and simple, and the option I suggested (or similar) gives users and commands adequate control over the behavior. (But as we generalize from bookmarks, this discussion really belongs in emacs-devel, not just this bug thread.)