Hi,
I wrote some lisp to take the list of Untracked files in a magit buffer and create a dired from them. Have papers already with FSF so the code is yours if you want it (or suggestions for how else to implement this?)
Stephen
(require 's)
(defun dired-untracked-files ()
"Create a dired buffer from the listed untracked files."
(interactive)
(let (beg end files)
(save-excursion
(goto-char (point-min))
(re-search-forward "^Untracked files ([0-9]+)")
(forward-char)
(setq beg (point))
;; find the end of the list of Untracked files.
(re-search-forward "^$")
(beginning-of-line)
(backward-char 1)
(setq end (point))
(setq files (s-lines (buffer-substring-no-properties beg end))))
(dired (cons "dired-untracked" files))
))
I would recommend that you instead get the untracked files using git ls-files --exclude-standard --other. Once you do that this doesn't have much to do with Magit anymore but maybe it can find a home in some dired related package. Happy hacking!
Thanks! Will investigate.
Took a while, but I made this more general solution
https://github.com/sje30/emacs#dired--create-a-dired-buffer-of-files-listed-on-stdin
Most helpful comment
Took a while, but I made this more general solution
https://github.com/sje30/emacs#dired--create-a-dired-buffer-of-files-listed-on-stdin