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

From: Juri Linkov <[email-masked]>
Date: Mon, 19 Jul 2021 01:32:05 +0300

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

diff --git a/lisp/startup.el b/lisp/startup.el
index 456c01efd1..46252e7b93 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -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))
 		      (setq displayable-buffers (cons buf displayable-buffers))
                       ;; Set the file buffer to the current buffer so
                       ;; that it will be used with "--eval" and

And the same for drag and drop.