2

Where it says #+TITLE: my title I want it to just say my title, same with author and date and then I want to hide the other attributes...

How would I do this?

1

You can hide title, author, date and email using org-hidden-keywords. To hide additional keywords, try the following:

(defvar my-org-hidden-keywords
  '(title author date email tags options))

(defun org-hide-keywords ()
  (save-excursion
    (let (beg end ov)
      (goto-char (point-min))
      (while (re-search-forward
              (concat "\\(^[ \t]*#\\+\\)\\("
                      (mapconcat (lambda (kw)
                                   (format "%s:\s"(symbol-name kw)))
                                 my-org-hidden-keywords "\\|")
                      "\\)")
              nil t)
        (setq beg (match-beginning 1)
              end (match-end 2)
              ov  (make-overlay beg end))
    (overlay-put ov 'invisible t)))))

(add-hook 'org-mode-hook 'org-hide-keywords)

Alternatively, with ov.el installed, replace org-hide-keywords with:

(defun org-hide-keywords ()
  (ov-set (concat "\\(^[ \t]*#\\+\\)\\("
                  (mapconcat (lambda (kw)
                               (format "%s:\s"(symbol-name kw)))
                             my-org-hidden-keywords "\\|")
                  "\\)")
          'invisible t))
|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.