From 290c9bb4e5745e79ade5ab4dd23f1fe2076f507c Mon Sep 17 00:00:00 2001 From: bth Date: Tue, 19 May 2026 16:03:33 -0700 Subject: [PATCH] um-next simplify --- um.el | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/um.el b/um.el index 1de3693..5e5e902 100644 --- a/um.el +++ b/um.el @@ -338,26 +338,22 @@ Negative prefix arg is handled by `um-tag-do', which see. ;; shell integration ;;;###autoload -(defun um-next (next-file &optional tags skip-header) +(defun um-next (next-file &optional tags) "Takes the next-file generated by the shell script and opens it. Optional TAGS string may contain more than one tag separated by a comma. -The SKIP-HEADER option says not to insert the um-journal-header at all, -in which case TAGS is also ignored. " (find-file next-file) - (unless skip-header - (um-journal-header) - (if tags - (progn (forward-line -1) - (dolist (tag (split-string tags ",")) - (insert (format "+ %s\n" - (if (equal "+" tag) - (cadr (split-string next-file "\\.")) - tag)))) - (forward-line)))) - (message (format "creating %s" next-file)) - ) + (um-journal-header) + (if tags + (progn (forward-line -1) + (dolist (tag (split-string tags ",")) + (insert (format "+ %s\n" + (if (equal "+" tag) + (cadr (split-string next-file "\\.")) + tag)))) + (forward-line))) + (message (format "um next: %s" next-file))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; um-minor-mode : in markdown files under markdown-mode