The reproduce steps:

With a test org file:

#+begin_src org
#+TITLE: this is title
|
* headline 1
#+end_src

The "|" represent the point, when you put point before the first
heading, the evaluate the bellowing code:

╭────
│ (org-display-outline-path nil t " 〉 " t)
╰────

You will got error:

╭────
│ Debugger entered--Lisp error: (user-error "Before first headline at position 
21 in buffer Code Tasks.org")
│   user-error("Before first headline at position %d in buffer %s" 21 #<buffer 
Code Tasks.org>)
│   org-back-to-heading(t)
│   org-display-outline-path(nil t " 〉 " t)
│   eval((org-display-outline-path nil t " 〉 " t) t)
│   #f(compiled-function () #<bytecode 0x134accd5971ee056>)()
│   #f(compiled-function () #<bytecode -0x5db3e1955cb81d1>)()
│   eval-expression((org-display-outline-path nil t " 〉 " t) nil nil 127)
│   funcall-interactively(eval-expression (org-display-outline-path nil t " 〉 " 
t) nil nil 127)
│   command-execute(eval-expression)
╰────

Even I use `ignore-errors` and `with-denoted-errors`, the upper error
still caused the header-line disappeared sometimes.

Derek Chen-Becker <[email protected]> writes:

> Hi Christopher,
>
> Thanks for sharing this report. Is the bug intermittent, or can you put
> together a reproducible example? Also, when you add the
> "with-demoted-errors", do you get an error message you could share?
>
> Thanks,
>
> Derek
>
> On Sun, Jul 26, 2026 at 10:38 PM Christopher M. Miles <[email protected]>
> wrote:
>
>> I have bellowing config in my Emacs to show heading outline path in
>> header-line.
>>
>> #+begin_src emacs-lisp
>> (setq-mode-local org-mode
>>                  header-line-format
>>                  '(:eval (ignore-errors
>>                            (concat
>>                             " " (nerd-icons-faicon "nf-fa-heading" :face
>> 'nerd-icons-red) "  "
>>                             ;; FIXME: user-error: "Before first headline
>> at position 30 in buffer discourse-graphs.org"
>>                             (org-display-outline-path nil t " 〉 " t)))))
>> #+end_src
>>
>> I found the header-line Org heading outline path will disappeared
>> sometimes.
>> Then I debug it show figure out why with `with-demoted-errors`:
>>
>> #+begin_src emacs-lisp
>> (setq-mode-local org-mode
>>                  header-line-format
>>                  '(:eval (with-demoted-errors
>>                              "Error: display Org mode heading outline path
>> error: %S"
>>                            (concat
>>                             ;; " " (nerd-icons-icon-for-mode 'org-mode) " "
>>                             " " (nerd-icons-faicon "nf-fa-heading" :face
>> 'nerd-icons-red) "  "
>>                             ;; FIXME: user-error: "Before first headline
>> at position 30 in buffer discourse-graphs.org"
>>                             (ignore-errors (org-display-outline-path nil t
>> " 〉 " t))))))
>> #+end_src
>>
>> I hope org-mode can fix this error.
>>
>> --
>>
>> [ 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
>>

-- 

[ 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

Attachment: signature.asc
Description: PGP signature

Reply via email to