1

Currently, when I run helm-org-in-buffer-headings in see something like this:

* main topic 1
** Subtopic 1.1
** Subtopic 1.2
*** Sub-subtopic 1.2.1
* main topic 2

I would like to hide the leading stars and remove the indentation, so that instead, what you see is this:

main topic 1
Subtopic 1.1
Subtopic 1.2
Sub-subtopic 1.2.1
main topic 2

Any ideas?

Adam
  • 1,857
  • 11
  • 32

1 Answers1

1

You can hide the first N-1 stars by setting org-hide-leading-stars to a non-nil value, although it will still keep the headlines indented.

You can also tweak helm-org-startup-visibility to remove all stars and headline indentation:

(with-eval-after-load "helm-org"
  (defun helm-org-startup-visibility (candidates _source)
    (setq-local indent-tabs-mode t)
    (cl-loop for i in candidates
         collect
             (cons
              (with-helm-buffer
        (org-indent-remove-properties-from-string
         (replace-regexp-in-string "^\\(\\**\\)\\(\\* \\)" "" (car i))))
              (cdr i)))))
jagrg
  • 3,824
  • 4
  • 19