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

From: Lars Ingebrigtsen <[email-masked]>
Date: Mon, 19 Jul 2021 00:50:42 +0200

Juri Linkov <[email-masked]> writes:

>> 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.
>
> I don't think anyone would object to such patch:

[...]

> @@ -2391,6 +2391,7 @@ command-line-1
>  				  (command-line-normalize-file-name name)
>  				  dir))
>  			   (buf (find-file-noselect file)))
> +		      (add-to-history 'file-name-history (abbreviate-file-name file))

I thought it might be nice to have these "extra" additions to
`file-name-history' in one central place (in case we decide to make it
optional).

But I guess we could just have a function like
`add-to-file-name-history' if we wanted to future-proof that?

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