Consider the following org-mode document

* Foo
** bar1                            :g1:
** bar2                            :g2:
** bar3                            :g1:
** bar4                            :g2:
** bar5                            :g2:
** bar6                            :g1:

Now I do C-c / m and search for g1. The view will then be

* Foo
** bar1                            :g1:
** bar3                            :g1:
** bar6                            :g1:

as desired.

I would wish to be able to edit those three lines, e.g. by creating a selection and doing C-x r t in order to add foo to all three headings. If I do that, foo will also be added to the hidden headings. Furthermore, for some strange reasons, automatic newlines are inserted, the lines will look like

** foo
bar1                            :g1:

My questions are:

  • How can I edit several headings at the same time?
  • Where does that line break come from?

I found a solution:

  1. M-s o for occur-mode, search for g1
  2. C-x o to change to the other window
  3. e to enable editing
  4. Edit by rectangle tagging or similar
  5. C-c C-c to switch back to occur-mode

However, I am still interested in a better or more elegant solution.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.