GNU bug report logs - #12915
24.2.50; Visiting a file via drag-and-drop should add it to the history of visited files

Previous Next

Package: emacs;

Reported by: Dani Moncayo <dmoncayo <at> gmail.com>

Date: Sat, 17 Nov 2012 13:09:01 UTC

Severity: wishlist

Merged with 3909

Found in version 24.2.50

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Dani Moncayo <dmoncayo <at> gmail.com>
Cc: Glenn Morris <rgm <at> gnu.org>, 12915 <at> debbugs.gnu.org, Stefan Monnier <monnier <at> iro.umontreal.ca>, 3909 <at> debbugs.gnu.org
Subject: bug#12915: bug#3909: 23.1.50; Drag drop events in command history?
Date: Sun, 18 Jul 2021 21:21:43 +0200
Dani Moncayo <dmoncayo <at> gmail.com> writes:

>>> Please, when a file is visited via drag-and-drop, add that file to the
>>> history of visited files (so that I can revisit it with `C-x C-f M-p',
>>> for example).  I don't see the point of not doing that.
>>
>> On a related note, I've always found it irritating that the same is true
>> of files specified on the command line:
>>
>> emacs -Q README &
>> C-x C-k README RET
>> C-x C-f M-p
>>   -> "Beginning of history; no preceding item"
>
> Indeed.  The history of visited files should contain every visited
> file, regardless of the way it was visited (command line argument,
> drag-n-drop, menu item, C-x C-f...)

The discussion here veered off into generalities, and nothing was done.

The two practical suggestions were:

1) To add an optional parameter to `find-file' to make it push the
filename onto `file-name-history'.  Then we could adjust callers
according to taste: I think drag and drop and command line arguments
should land on the history.

2) To add a `display-buffer-hook' to do the same if the file actually
ends up being displayed, so this pushing would happen deep in
`find-file-noselect'.

I think 1) is attractive in that it's very straightforward and simple to
understand.  2) is attractive in that we don't put file names into the
history unless we actually read the file, and we don't have to adjust
function parameters for the other `find-file-*' commands, too.

I think I prefer 1), because it's easier to reason about.

Anybody got an opinion?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 3 years and 305 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.