Subject: RE: [External] : bug#12915: bug#3909: 23.1.50; Drag drop events in command history?

From: Drew Adams <[email-masked]>
Date: Sun, 18 Jul 2021 21:08:40 +0000

> 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?

In the #12915 thread both Juri and I argued for having
(multiple) means of _user_ control.  And several such means
were suggested.

I said, for example:

  Give users the _possibility_ of including, as part of
  `file-name-history', file names not actually typed in the
  minibuffer.  But give them also the ability to _choose_
  which such names get added, as defined by how the files
  were chosen for access.

Juri said, specifically to argue against your #1::

  Since this is a matter of personal preference, I think
  not Lisp callers but Emacs users should be able to specify
  what to add to the history.

There are lots of good suggestions in the thread - many
specific and some based on actual implementation and use.
Asking "Anybody got an opinion?" is an invitation to
ignore lots of opinions already carefully expressed.