hasu / notdeft

NotDeft note manager for Emacs
https://tero.hasu.is/notdeft/
170 stars 14 forks source link

display org file title instead of first line of the file. #21

Closed CsBigDataHub closed 3 years ago

CsBigDataHub commented 3 years ago

hey @hasu

Is it possible to display title of the org-file instead of first line of the file when notdeft is called.

display buffer when M-x deft is called image

display buffer when M-x notdeft is called image

deft used deft-strip-title-regexp variable to strip title from the org-file and display it in deft buffer. If #+TITLE: or #+title: is not present in the file, file name is used.

Is it possible to do that in notdeft ?

hasu commented 3 years ago

In general, no. The `deft-strip-title-regexp' mechanism was never present in NotDeft, and NotDeft also only parses the beginning of each file, meaning that a recognized #+title cannot appear just anywhere.

However, looking at your screenshot, it seems that in your case it is the property drawers that are the issue, and there is specific support for ignoring those at the very beginning of a file. See if it helps to

(setq notdeft-allow-org-property-drawers t)

CsBigDataHub commented 3 years ago

Awesome, thanks that worked.