diff --git a/doom/.config/doom/README.org b/doom/.config/doom/README.org index bb18fff..39c00b0 100644 --- a/doom/.config/doom/README.org +++ b/doom/.config/doom/README.org @@ -3405,8 +3405,8 @@ CONTEXT-TAG is the mu4e/agenda context (e.g. 'TDNDE', 'Perso')." (interactive (list (completing-read "Category: " '("1-Projects" "2-Areas" "3-Resources")) (read-string "Node Name: ") - (read-string "Project tag (slug for agenda/email per project filtering): ") - (read-string "Context tag (slug for agenda/email per context filtering): "))) + (read-string "Project tag: ") + (read-string "Context tag: "))) (let* ((category-dir (expand-file-name category gortium/exokortex-root)) (node-dir (expand-file-name node-name category-dir)) (org-file (gortium/ensure-node-structure node-dir @@ -3421,31 +3421,28 @@ If folders are explicitly marked in Dirvish/Dired, it batch-processes all of the Otherwise, prompts for a single directory, defaulting to the item under the cursor. Optional PROJECT-TAG and CONTEXT-TAG can be given to create .projectile and .dir-locals.el." (interactive - (list - (let* ((dired-elements (when (derived-mode-p 'dired-mode) - (dired-get-marked-files nil nil nil t))) - (has-explicit-marks (or (and (listp dired-elements) (> (length dired-elements) 1)) - (and (consp dired-elements) (eq (car dired-elements) t)))) - (marked-dirs (when has-explicit-marks - (cl-remove-if-not #'file-directory-p - (if (eq (car-safe dired-elements) t) - (cdr dired-elements) - dired-elements))))) - (if marked-dirs - (list marked-dirs - (read-string "Project tag (blank to skip): ") - (completing-read "Context tag: " (quote ("TDNDE" "Perso" "")) nil t)) - (let* ((cursor-path (when (derived-mode-p 'dired-mode) - (dired-get-filename nil t))) - (initial-path (cond - ((and cursor-path (file-directory-p cursor-path)) - cursor-path) - (cursor-path - (file-name-directory cursor-path)) - (t default-directory)))) - (list (list (read-directory-name "Directory to convert: " nil initial-path t initial-path)) - (read-string "Project tag (blank to skip): ") - (completing-read "Context tag: " (quote ("TDNDE" "Perso" "")) nil t))))))) + (let* ((dired-elements (when (derived-mode-p 'dired-mode) + (dired-get-marked-files nil nil nil t))) + (has-explicit-marks (or (and (listp dired-elements) (> (length dired-elements) 1)) + (and (consp dired-elements) (eq (car dired-elements) t)))) + (marked-dirs (when has-explicit-marks + (cl-remove-if-not #'file-directory-p + (if (eq (car-safe dired-elements) t) + (cdr dired-elements) + dired-elements)))) + (dirs (or marked-dirs + (let* ((cursor-path (when (derived-mode-p 'dired-mode) + (dired-get-filename nil t))) + (initial-path (cond + ((and cursor-path (file-directory-p cursor-path)) + cursor-path) + (cursor-path + (file-name-directory cursor-path)) + (t default-directory)))) + (list (read-directory-name "Directory to convert: " nil initial-path t initial-path))))) + (tag (read-string "Project tag (blank to skip): ")) + (ctx (completing-read "Context tag: " (quote ("TDNDE" "Perso" "")) nil t))) + (list dirs tag ctx))) (let ((count 0) last-org-file) @@ -3943,7 +3940,4 @@ Need chrome... :( (map! :map org-mode-map :localleader :desc "Edit Edna rules" "E" #'org-edna-edit)) - - - - +#+end_src diff --git a/doom/.config/doom/config.el b/doom/.config/doom/config.el index 49f415e..f01265f 100644 --- a/doom/.config/doom/config.el +++ b/doom/.config/doom/config.el @@ -2489,8 +2489,8 @@ CONTEXT-TAG is the mu4e/agenda context (e.g. 'TDNDE', 'Perso')." (interactive (list (completing-read "Category: " '("1-Projects" "2-Areas" "3-Resources")) (read-string "Node Name: ") - (read-string "Project tag (slug for agenda/email per project filtering): ") - (read-string "Context tag (slug for agenda/email per context filtering): "))) + (read-string "Project tag: ") + (read-string "Context tag: "))) (let* ((category-dir (expand-file-name category gortium/exokortex-root)) (node-dir (expand-file-name node-name category-dir)) (org-file (gortium/ensure-node-structure node-dir @@ -2505,31 +2505,28 @@ If folders are explicitly marked in Dirvish/Dired, it batch-processes all of the Otherwise, prompts for a single directory, defaulting to the item under the cursor. Optional PROJECT-TAG and CONTEXT-TAG can be given to create .projectile and .dir-locals.el." (interactive - (list - (let* ((dired-elements (when (derived-mode-p 'dired-mode) - (dired-get-marked-files nil nil nil t))) - (has-explicit-marks (or (and (listp dired-elements) (> (length dired-elements) 1)) - (and (consp dired-elements) (eq (car dired-elements) t)))) - (marked-dirs (when has-explicit-marks - (cl-remove-if-not #'file-directory-p - (if (eq (car-safe dired-elements) t) - (cdr dired-elements) - dired-elements))))) - (if marked-dirs - (list marked-dirs - (read-string "Project tag (blank to skip): ") - (completing-read "Context tag: " (quote ("TDNDE" "Perso" "")) nil t)) - (let* ((cursor-path (when (derived-mode-p 'dired-mode) - (dired-get-filename nil t))) - (initial-path (cond - ((and cursor-path (file-directory-p cursor-path)) - cursor-path) - (cursor-path - (file-name-directory cursor-path)) - (t default-directory)))) - (list (list (read-directory-name "Directory to convert: " nil initial-path t initial-path)) - (read-string "Project tag (blank to skip): ") - (completing-read "Context tag: " (quote ("TDNDE" "Perso" "")) nil t))))))) + (let* ((dired-elements (when (derived-mode-p 'dired-mode) + (dired-get-marked-files nil nil nil t))) + (has-explicit-marks (or (and (listp dired-elements) (> (length dired-elements) 1)) + (and (consp dired-elements) (eq (car dired-elements) t)))) + (marked-dirs (when has-explicit-marks + (cl-remove-if-not #'file-directory-p + (if (eq (car-safe dired-elements) t) + (cdr dired-elements) + dired-elements)))) + (dirs (or marked-dirs + (let* ((cursor-path (when (derived-mode-p 'dired-mode) + (dired-get-filename nil t))) + (initial-path (cond + ((and cursor-path (file-directory-p cursor-path)) + cursor-path) + (cursor-path + (file-name-directory cursor-path)) + (t default-directory)))) + (list (read-directory-name "Directory to convert: " nil initial-path t initial-path))))) + (tag (read-string "Project tag (blank to skip): ")) + (ctx (completing-read "Context tag: " (quote ("TDNDE" "Perso" "")) nil t))) + (list dirs tag ctx))) (let ((count 0) last-org-file)