I have a long list of files (full path names, one each on its own line, in a text file), and I want to open all of these files into emacs buffers, so that I can then use multi-occur-in-matching-buffers to navigate around in these files.
How can I open the list of files from within emacs ? The files listed are in arbitrary folders and have arbitrary file names. Ie., there is no regular pattern to the paths and names, so I am not looking for a particular regular expression to match my example below.
I don't want to do this at the emacs command line invocation, as I am running emacs on windows by clicking on an icon, and also, I want to keep open the other buffers (files) I have already open.
I am able to create a custom elisp function (hard-coding of the list of file names in the function), as follows (short example).
(defun open-my-files ()
"Open my files"
(interactive)
(find-file "c:/files/file1.txt")
(find-file "c:/more_files/deeper/log.log")
(find-file "c:/one_last_note.ini")
)
I can place that elisp in a buffer, then select it all, then eval-region, then execute the function with M-x open-my-files.
However, it would be much more productive for me if the elisp would read the list of files from the text file which contains the list.