Browse Source

org.el: Add new startup keywords

* org.el (org-startup-options): New startup keywords.
(org-log-into-drawer): Update docstring to explain how to set this
variable through the startup keyword "logdrawer" and "nologdrawer".
(org-log-states-order-reversed): Document the new startup keywords
"logstatesreversed" and "nologstatesreversed".

* org.texi (In-buffer settings): Document new startup keywords.
Thanks to John J Foerch for this idea.
Bastien Guerry 6 years ago
parent
commit
5fa52d9a93
2 changed files with 41 additions and 19 deletions
  1. 26 18
      doc/org.texi
  2. 15 1
      lisp/org.el

+ 26 - 18
doc/org.texi

@@ -14974,24 +14974,32 @@ configured using these options (see variables @code{org-log-done},
 @cindex @code{logrefile}, STARTUP keyword
 @cindex @code{lognoterefile}, STARTUP keyword
 @cindex @code{nologrefile}, STARTUP keyword
-@example
-logdone            @r{record a timestamp when an item is marked DONE}
-lognotedone        @r{record timestamp and a note when DONE}
-nologdone          @r{don't record when items are marked DONE}
-logrepeat          @r{record a time when reinstating a repeating item}
-lognoterepeat      @r{record a note when reinstating a repeating item}
-nologrepeat        @r{do not record when reinstating repeating item}
-lognoteclock-out   @r{record a note when clocking out}
-nolognoteclock-out @r{don't record a note when clocking out}
-logreschedule      @r{record a timestamp when scheduling time changes}
-lognotereschedule  @r{record a note when scheduling time changes}
-nologreschedule    @r{do not record when a scheduling date changes}
-logredeadline      @r{record a timestamp when deadline changes}
-lognoteredeadline  @r{record a note when deadline changes}
-nologredeadline    @r{do not record when a deadline date changes}
-logrefile          @r{record a timestamp when refiling}
-lognoterefile      @r{record a note when refiling}
-nologrefile        @r{do not record when refiling}
+@cindex @code{logdrawer}, STARTUP keyword
+@cindex @code{nologdrawer}, STARTUP keyword
+@cindex @code{logstatesreversed}, STARTUP keyword
+@cindex @code{nologstatesreversed}, STARTUP keyword
+@example
+logdone             @r{record a timestamp when an item is marked DONE}
+lognotedone         @r{record timestamp and a note when DONE}
+nologdone           @r{don't record when items are marked DONE}
+logrepeat           @r{record a time when reinstating a repeating item}
+lognoterepeat       @r{record a note when reinstating a repeating item}
+nologrepeat         @r{do not record when reinstating repeating item}
+lognoteclock-out    @r{record a note when clocking out}
+nolognoteclock-out  @r{don't record a note when clocking out}
+logreschedule       @r{record a timestamp when scheduling time changes}
+lognotereschedule   @r{record a note when scheduling time changes}
+nologreschedule     @r{do not record when a scheduling date changes}
+logredeadline       @r{record a timestamp when deadline changes}
+lognoteredeadline   @r{record a note when deadline changes}
+nologredeadline     @r{do not record when a deadline date changes}
+logrefile           @r{record a timestamp when refiling}
+lognoterefile       @r{record a note when refiling}
+nologrefile         @r{do not record when refiling}
+logdrawer           @r{store log into drawer}
+nologdrawer         @r{store log outside of drawer}
+logstatesreversed   @r{reverse the order of states notes}
+nologstatesreversed @r{do not reverse the order of states notes}
 @end example
 @vindex org-hide-leading-stars
 @vindex org-odd-levels-only

+ 15 - 1
lisp/org.el

@@ -2500,6 +2500,11 @@ also set this to a string to define the drawer of your choice.
 
 A value of t is also allowed, representing \"LOGBOOK\".
 
+A value of t or nil can also be set with on a per-file-basis with
+
+   #+STARTUP: logdrawer
+   #+STARTUP: nologdrawer
+
 If this variable is set, `org-log-state-notes-insert-after-drawers'
 will be ignored.
 
@@ -2541,7 +2546,12 @@ set."
 
 (defcustom org-log-states-order-reversed t
   "Non-nil means the latest state note will be directly after heading.
-When nil, the state change notes will be ordered according to time."
+When nil, the state change notes will be ordered according to time.
+
+This option can also be set with on a per-file-basis with
+
+   #+STARTUP: logstatesreversed
+   #+STARTUP: nologstatesreversed"
   :group 'org-todo
   :group 'org-progress
   :type 'boolean)
@@ -4481,6 +4491,10 @@ After a match, the following groups carry important information:
     ("nolognoteclock-out" org-log-note-clock-out nil)
     ("logrepeat" org-log-repeat state)
     ("lognoterepeat" org-log-repeat note)
+    ("logdrawer" org-log-into-drawer t)
+    ("nologdrawer" org-log-into-drawer nil)
+    ("logstatesreversed" org-log-states-order-reversed t)
+    ("nologstatesreversed" org-log-states-order-reversed nil)
     ("nologrepeat" org-log-repeat nil)
     ("logreschedule" org-log-reschedule time)
     ("lognotereschedule" org-log-reschedule note)