um-next-file-shell
This commit is contained in:
parent
23a01f1dfb
commit
230450b388
1 changed files with 18 additions and 0 deletions
18
elisp/um.el
18
elisp/um.el
|
|
@ -202,5 +202,23 @@ NOTE: this searches in the current project root only.
|
||||||
;; specify a target dir (since it appends the list from xargs I think).
|
;; specify a target dir (since it appends the list from xargs I think).
|
||||||
;; Or, in dired, run `find-grep-dired'.
|
;; Or, in dired, run `find-grep-dired'.
|
||||||
|
|
||||||
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
|
;; shell integration
|
||||||
|
|
||||||
|
(defun um-next-file-shell (dir &optional header)
|
||||||
|
"Calls um next in the provided dir.
|
||||||
|
|
||||||
|
With the option not to leave behind the um-journal-header.
|
||||||
|
"
|
||||||
|
(let ((default-directory dir))
|
||||||
|
;; https://emacs.stackexchange.com/a/19878
|
||||||
|
(eval (car (read-from-string (shell-command-to-string "export UMNEXTECHO=true; um next"))))
|
||||||
|
;; HACK: so that the um-journal-header doesn't
|
||||||
|
;; leave the file modified.
|
||||||
|
(unless header
|
||||||
|
(undo))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
(provide 'um)
|
(provide 'um)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue