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#12915: 24.2.50; Visiting a file via drag-and-drop should add it to the history ofvisited files Date: Tue, 15 Jan 2013 07:07:59 -0800 Message-ID: References: <87obgug641.fsf@gnu.org> <87mwwd76ll.fsf@mail.jurta.org><87d2x842ws.fsf@mail.jurta.org><65F6EBA42246485393472446D6597C96@us.oracle.com> <87obgqpw9n.fsf@mail.jurta.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1358262520 32763 80.91.229.3 (15 Jan 2013 15:08:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 15:08:40 +0000 (UTC) Cc: 'Chong Yidong' , 12915@debbugs.gnu.org To: "'Juri Linkov'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 15 16:08:57 2013 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 1Tv88D-0001mq-WD for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jan 2013 16:08:54 +0100 Original-Received: from localhost ([::1]:54399 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv87x-0006t6-JM for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jan 2013 10:08:37 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:34524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv87u-0006se-82 for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2013 10:08:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tv87s-00010U-Ue for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2013 10:08:34 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56317) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tv87s-00010O-RD for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2013 10:08:32 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tv88M-0007G4-C1 for bug-gnu-emacs@gnu.org; Tue, 15 Jan 2013 10:09:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Jan 2013 15:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 12915 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 12915-submit@debbugs.gnu.org id=B12915.135826251827869 (code B ref 12915); Tue, 15 Jan 2013 15:09:02 +0000 Original-Received: (at 12915) by debbugs.gnu.org; 15 Jan 2013 15:08:38 +0000 Original-Received: from localhost ([127.0.0.1]:33548 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tv87x-0007FR-E9 for submit@debbugs.gnu.org; Tue, 15 Jan 2013 10:08:38 -0500 Original-Received: from userp1040.oracle.com ([156.151.31.81]:34509) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tv87v-0007FH-7V for 12915@debbugs.gnu.org; Tue, 15 Jan 2013 10:08:36 -0500 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by userp1040.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id r0FF83Tx031970 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 15 Jan 2013 15:08:04 GMT Original-Received: from acsmt358.oracle.com (acsmt358.oracle.com [141.146.40.158]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r0FF82fr013837 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 15 Jan 2013 15:08:03 GMT Original-Received: from abhmt103.oracle.com (abhmt103.oracle.com [141.146.116.55]) by acsmt358.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id r0FF82a6001388; Tue, 15 Jan 2013 09:08:02 -0600 Original-Received: from dradamslap1 (/10.159.246.149) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 15 Jan 2013 07:08:02 -0800 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <87obgqpw9n.fsf@mail.jurta.org> Thread-Index: Ac3zDOuCATLfJDW5TKCjjchDYzhqXwAJHoZA X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:69808 Archived-At: > > `file-name-history' was designed to be augmented by > > `read-file-name', whenever a file name is input. That includes > > commands that do not display/visit the file. > > This way of interactively choosing files should not be > > ignored, just because someone finds an easy way to hook history > > augmentation into file-buffer display. > > A new variable (e.g. `file-name-history-variable') could be introduced > to hold the name of the history variable. The default would be the > currently existing `file-name-history'. And the other possible value > would be a new history variable (e.g. `file-name-extended-history') > that will collect all visited/displayed file names like: > > (defvar file-name-history nil > "History list of file names entered in the minibuffer.") > > (defvar file-name-extended-history nil > "History list of files visited/displayed in the current session.") > > (defcustom file-name-history-variable 'file-name-history > "History list to use in the minibuffer that reads a file name. > The value of this variable should be a symbol; that symbol > is used as a variable to hold a history list for the file names." > :group 'files > :type 'symbol) > > Then the users would be able to customize it to > `file-name-extended-history': > > (custom-set-variables > '(file-name-history-variable file-name-extended-history)) Having separate variables does not deal with the heart of the problem being discussed. `read-file-name' already adds correctly to the history. The problem is that some commands that let users choose files without entering a name - i.e., which do _not_ use `read-file-name', should also (optionally) augment the history. A mouse-click or menu command that just wraps a command that if called interactively would use `read-file-name' should itself (optionally) augment the history.