Derek Chen-Becker <[email protected]> writes: > By "add breakpoint" do you mean only on error? There's > "toggle-debug-on-error" but that's global (for any error), or there's > "debug-on-entry" but that would trigger on every invocation, not just on > errors. A little googling came up with a way to make debug-on-error > selective using advice, but this is getting outside of my level of elisp > expertise: > > (define-advice target-function (:around (orig-fun &rest args) > debug-only-here) "Enable debug-on-error only during the execution of > target-function." (let ((debug-on-error t)) (apply orig-fun args))) >
I tried your advice, but it did not work, has not raise anything (like
backtrace or error message etc).
I assume this is because my function only did `setq-mode-local`.
(defun my/org-mode/enable-display-heading-outline-path-in-header-line ()
"Displaying org-mode heading outline path and tags in `header-line-format'."
(interactive)
(setq-mode-local org-mode
header-line-format
'(:eval (ignore-errors
(concat
;; " " (nerd-icons-icon-for-mode 'org-mode)
;; " " (file-name-nondirectory (buffer-file-name))
" " (nerd-icons-faicon "nf-fa-heading" :face
'nerd-icons-red)
" " (unless (org-before-first-heading-p)
(org-display-outline-path nil t " 〉 " t))
(when-let* ((tags-list (org-get-tags nil 'local)))
(concat
" " (nerd-icons-faicon "nf-fa-hashtag" :face
'nerd-icons-dgreen)
" " ":" (propertize (string-join tags-list
":") 'face '(:height 0.8)) ":")))))))
--
[ stardiviner ]
I try to make every word tell the meaning that I want to express without
misunderstanding.
Blog: https://stardiviner.github.io/
IRC(libera.chat, freenode): stardiviner, Matrix: stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
signature.asc
Description: PGP signature
