Subject: Re: bug#12915: 24.2.50; Visiting a file via drag-and-drop should add it to the history of visited files

From: Juri Linkov <[email-masked]>
Date: Sun, 13 Jan 2013 11:56:20 +0200

>>> 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...)
>>
>> ... and when the file is visited via bookmarks (e.g. `C-x r b foo
>> <RET>').  (I've just missed this feature).
>
> This feature is relatively easy to implement.

When this feature was discussed last time at
http://thread.gmane.org/gmane.emacs.pretest.bugs/9253/focus=43774
I found it too irritating that it clutters the minibuffer history
with too many unnecessary elements that were not entered manually.

> I think it is best done by adding an optional argument `add-history' to
> `find-file' (and similar functions like `find-file-other-frame'), so
> that Lisp callers can specify to update `file-name-history' even if the
> file name was not read interactively.  Any objections?

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.