Q: How can org-mode
be configured so that (org-entry-get nil "title")
returns the headline title?
I have seen three variations of org-entry-get
where the string argument title
is in all lowercase, all uppercase, or initial caps. The default org-mode
configuration does not return anything in all three cases:
** Active [#A] 0 @ index. :lawlist:
DEADLINE: <2016-12-31 Sat>
:PROPERTIES:
:Effort:
:Hash: 8ae546845cebbc4d25ccdcf23eade44e
:ToodledoFolder: TASKS
:ToodledoGoal:
:ToodledoID: 394554265
:ToodledoLocation:
:END:
(setq org-todo-keywords '((sequence
"Active(a)"
"Next Action(n)"
"Canceled(c)"
"Hold(h)"
"Reference(r)"
"Delegated(d)"
"Waiting(w)"
"Postponed(P)"
"Someday(s)"
"Planning(p)"
"|"
"None(N)")))
Here is a function I found that uses org-get-heading
if org-entry-get
fails:
(let ((title (if (org-entry-get nil "title")
(org-entry-get nil "title")
(org-get-heading t t))))
(substring-no-properties title))
And, here is yet another method: (org-element-property :title (org-element-at-point))