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)))

Cheers,

Derek

On Sun, Sep 20, 2026 at 7:49 AM stardiviner <[email protected]> wrote:

> Ihor Radchenko <[email protected]> writes:
>
> > Derek Chen-Becker <[email protected]> writes:
> >
> >> Thanks for the repro. I wanted to clarify: when you say "the
> header-line",
> >> do you mean the "* headline 1" line or do you mean the menu bar?  I've
> >> tried reproducing this with the text you provided but I haven't hit any
> >> changes to either yet. How often is this happening?
> >
> > Christopher, do you have any further insights?
>
> Not found any new clue, Just happened randomly time.
>
> I always have to manually re-enable this config. So I wrap this config
> into a command function for easily enable it.
>
> Is there a way to add a way to add breakpoint or trace point on
> `header-line-format` or other place so let me know what caused the
> header-line disappeared?
>
> (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
>


-- 
+---------------------------------------------------------------+
| Derek Chen-Becker                                             |
| GPG Key available at https://keybase.io/dchenbecker and       |
| https://pgp.mit.edu/pks/lookup?search=derek%40chen-becker.org |
| Fngrprnt: EB8A 6480 F0A3 C8EB C1E7  7F42 AFC5 AFEE 96E4 6ACC  |
+---------------------------------------------------------------+

Reply via email to