next : um next calls (um--header) and only prints the filename for piping : no more auto open
This commit is contained in:
parent
117da02e16
commit
808eaeef00
1 changed files with 10 additions and 21 deletions
17
um.el
17
um.el
|
|
@ -358,7 +358,7 @@ Prefix arg prompts for the directory instead.
|
||||||
+ tags
|
+ tags
|
||||||
|
|
||||||
"
|
"
|
||||||
(insert
|
(with-temp-buffer (insert
|
||||||
(format "# %s\n: %s%s" filename (format-time-string um--date-format) um--header-end))
|
(format "# %s\n: %s%s" filename (format-time-string um--date-format) um--header-end))
|
||||||
(when tags
|
(when tags
|
||||||
(forward-line -1)
|
(forward-line -1)
|
||||||
|
|
@ -366,19 +366,8 @@ Prefix arg prompts for the directory instead.
|
||||||
(insert (format "+ %s\n"
|
(insert (format "+ %s\n"
|
||||||
(if (equal "+" tag)
|
(if (equal "+" tag)
|
||||||
(cadr (split-string filename "\\."))
|
(cadr (split-string filename "\\."))
|
||||||
tag))))
|
tag)))))
|
||||||
(forward-line)))
|
(buffer-string)))
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defun um-next (filename &optional tags)
|
|
||||||
"Takes the filename generated by the CLI, opens it, and adds the header.
|
|
||||||
|
|
||||||
Optional TAGS string may contain more than one tag separated by a comma.
|
|
||||||
|
|
||||||
A tag with a value of \"+\" is rendered as the descriptor portion of the filename.
|
|
||||||
"
|
|
||||||
(find-file filename)
|
|
||||||
(um--header filename tags))
|
|
||||||
|
|
||||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||||
;;; um-minor-mode
|
;;; um-minor-mode
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue