emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[QUESTION] Add advice on command org-add-note not working


From: Christopher M. Miles
Subject: [QUESTION] Add advice on command org-add-note not working
Date: Fri, 20 Aug 2021 09:22:22 +0800
User-agent: mu4e 1.6.2; emacs 28.0.50

<#secure method=pgpmime mode=sign>

I have following advice code:

(defun my/org-add-note--auto-add-tag ()
  "Auto add tag 'LOG' when add note log."
  (org-back-to-heading)
  ;; DEBUG: the following code is not executed.
  (message "DEBUG")
  (require 'seq)
  (org-set-tags (seq-uniq (cons "LOG" (org-get-tags nil t)))))

(advice-add 'org-add-note :after #'my/org-add-note--auto-add-tag)

With Emacs Edebug, I found it only executed to (org-back-to-heading), then stopped. The following "DEBUG" message is not printed and tag "LOG" is not added.

Does anybody have some clue for this issue?

-- 
[ stardiviner ]
       I try to make every word tell the meaning that I want to express.

       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner, Matrix: stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]