bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Juri Linkov
Subject: bug#12915: bug#3909: 23.1.50; Drag drop events in command history?
Date: Mon, 19 Jul 2021 01:32:05 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (x86_64-pc-linux-gnu)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]