diff --git a/org-noter-core.el b/org-noter-core.el index 302f3c5..a945131 100644 --- a/org-noter-core.el +++ b/org-noter-core.el @@ -343,7 +343,23 @@ If it exists, it will be listed as a candidate that `org-noter' will have the user select to use as the note file of the document." :group 'org-noter - :type 'hook) + :type 'hook + :version "28.2") + +(defcustom org-noter-headline-title-decoration "" + "Decoration (emphasis) for the headline title string. + +If you use the Org STARTUP option 'entitiespretty', filenames +with underscores will end up looking ugly. This string is +prepended and appended to the document title in the top-level +headline, making it look nicer. + +Reasonable choices are: /, *, =, ~, _ + +With '/', 'The_Title' would become '/The_Title/'." + :group 'org-noter + :type 'string + :version "28.2") (defface org-noter-no-notes-exist-face '((t diff --git a/org-noter.el b/org-noter.el index f464214..620da67 100644 --- a/org-noter.el +++ b/org-noter.el @@ -267,7 +267,10 @@ DOCUMENT-FILE-NAME is the document filename." (with-current-buffer (find-file-noselect (car notes-files)) (goto-char (point-max)) (insert (if (save-excursion (backward-char) (looking-at-p "\n")) "" "\n") - "* " document-base) + "* " + org-noter-headline-title-decoration + document-base + org-noter-headline-title-decoration) (org-entry-put nil org-noter-property-doc-file (file-relative-name document-used-path (file-name-directory (car notes-files)))))