Subject: bug#3909: bug#12915: bug#3909: 23.1.50; Drag drop events in command history?

From: Juri Linkov <[email-masked]>
Date: Tue, 20 Jul 2021 00:57:24 +0300

> Juri Linkov <[email-masked]> writes:
>
>>> But I guess we could just have a function like
>>> `add-to-file-name-history' if we wanted to future-proof that?
>>
>> This is not specific to the file history, the same requests were about
>> e.g. describe-function, describe-variable, …  So also tried:
>
> I think you're over-thinking this.  :-)

I completely agree.

> There's a lot of controversial things we could be doing in the history
> area, but we're not doing it, because:
>
>> But still too much clutter.
>
> Adding drag'n'drop file names and command name file names isn't
> controversial, and can be done easily, so we should just do that.

Then it should be enough just to add after the find-file call:

  (add-to-history 'file-name-history (abbreviate-file-name file))

in command-line-1 and drag-n-drop functions.