2

While using org-mode to take notes, e.g. when learning about something, I often have questions that I write down -- smack in the middle of the main notes. Right now I just use this markup/approach:

*** Some topic
Lorem ipsum dolor sit amet, consectetur adipiscing elit. 
- Nisi ut aliquip.
  - Excepteur sint occaecat cupidatat non proident.
- [ ] Q: What markup should I use in org-mode for small/local questions?

Sunt in culpa qui officia deserunt mollit anim id est laborum.

Is there a better markup or way of doing it? E.g. using headings and tags? Use something like TODO? But I think TODO/DONE requires adding an extra heading, which affects the subsequent notes. Unless there's a markup to "go up one heading level" that I don't know about...?

I'd like to be able to add an answer and mark the question as answered, as well as easily search for unanswered questions.

I'm looking for some practical suggestions.

To find unanswered questions I search my .org-file for [ ] Q:. Answers I sometimes put in as per below:

*** Some topic
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
- Nisi ut aliquip.
  - Excepteur sint occaecat cupidatat non proident.
- [X] Q: What markup should I use in org-mode for small/local questions?
  - A: In practice there's no way that's significantly better than this.

Sunt in culpa qui officia deserunt mollit anim id est laborum.

Note: Found slightly related question Different colors for questions and answers in org-mode

1
  • I'd use categories or tags and TODO keywords eventually . Easier to filter and use sparse trees with pending questions. Answers can go under subtree. – Muihlinn Dec 28 '20 at 7:50
1

This is only a partial answer to my own question regarding closing outline sections and introducing inline tasks. The question, asked:

But I think TODO/DONE requires adding an extra heading, which affects the subsequent notes. Unless there's a markup to "go up one heading level" that I don't know about...?

An org-mode FAQ, https://orgmode.org/worg/org-faq.html#closing-outline-sections, indicates it is not possible to close the current heading level. The FAQ entry says:

The short answer to the question is no. Org-mode adheres to the cascading logic of outlines, in which a section is closed only by another section that occupies an equal or greater level.

inline tasks: The FAQ entry also gives three workarounds of which the first suggests: "You can use inline tasks to create non-folding subsections. See the documentation in org-inlinetask.el, which is part of the org-mode distribution."

In short an inline task might look like this:

**************** TODO A small task

or like this

**************** TODO some small task       
                 DEADLINE: <2009-03-30 Mon> 
                 :PROPERTIES:               
                   :SOMETHING: or other     
                 :END:                      
                 And here is some extra text
**************** END

I have not yet tested to see if this also solves my actual question.

To conclude, I've for completeness extracted some documentation from org-inlinetask.el (version 9.4.2):

This module implements inline tasks in Org mode. Inline tasks are tasks that have all the properties of normal outline nodes, including the ability to store meta data like scheduling dates, TODO state, tags and properties. However, these nodes are treated specially by the visibility cycling.

Visibility cycling exempts these nodes from cycling. So whenever their parent is opened, so are these tasks. This will only work with `org-cycle', so if you are also using other commands to show/hide entries, you will occasionally find these tasks to behave like all other outline nodes, seemingly splitting the text of the parent into children.

Special fontification of inline tasks, so that they can be immediately recognized. From the stars of the headline, only last two will be visible, the others will be hidden using the `org-hide' face.

An inline task is identified solely by a minimum outline level, given by the variable `org-inlinetask-min-level', default 15.

If you need to have a time planning line (DEADLINE etc), drawers, for example LOGBOOK of PROPERTIES, or even normal text as part of the inline task, you must add an "END" headline with the same number of stars.

As an example, here are two valid inline tasks:

**************** TODO A small task

and

**************** TODO Another small task
                 DEADLINE: <2009-03-30 Mon>
                 :PROPERTIES:
                 :SOMETHING: another thing
                 :END:
                 And here is some extra text
**************** END

Also, if you want to use refiling and archiving for inline tasks, The END line must be present to make things work properly.

Note that you should not try to use inline tasks within plain list, visibility cycling is known to be problematic when doing so.

This package installs one new command:

C-c C-x t Insert a new inline task with END line

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.