Allow temporary agenda display with inactive timestamps included.
You get this by pressing `[' in the agenda or timeline buffer.
This commit is contained in:
parent
618f384864
commit
cdccc089fa
|
@ -7,16 +7,19 @@
|
||||||
|
|
||||||
* Version 6.00
|
* Version 6.00
|
||||||
|
|
||||||
|
This is a new major release, mostly because of structural changes
|
||||||
|
in Org. However, there are also monay bug fixes and new features.
|
||||||
|
|
||||||
** Details
|
** Details
|
||||||
|
|
||||||
*** The Org distribution has a new structure
|
*** The Org distribution has a new structure
|
||||||
|
|
||||||
In the distribution files, the lisp files are now located in
|
In the distribution files as well as in the git repository,
|
||||||
a subdirectory "lisp", and the documentation files are
|
the lisp files are now located in a subdirectory "lisp", and
|
||||||
located in a subdirectory "doc". If you are running Org
|
the documentation files are located in a subdirectory "doc".
|
||||||
directly from the unpacked distribtuion archive (zip or tar
|
If you are running Org directly from the unpacked
|
||||||
file), you need to modify your settings for load-path
|
distribtuion archive (zip or tar file, or git repository),
|
||||||
accordingly.
|
you need to modify your settings for load-path accordingly.
|
||||||
|
|
||||||
*** Loading modules
|
*** Loading modules
|
||||||
|
|
||||||
|
@ -27,45 +30,61 @@
|
||||||
way part of Emacs), as well as contributed packages that will
|
way part of Emacs), as well as contributed packages that will
|
||||||
only be available when you have installed them properly (most
|
only be available when you have installed them properly (most
|
||||||
likely by downloading the distribution and adding
|
likely by downloading the distribution and adding
|
||||||
/path/to/orgdir/contrib/lisp to your load path.
|
/path/to/orgdir/contrib/lisp to your load path).
|
||||||
|
|
||||||
*** New archiving mechanism: The Archive Sibling
|
*** New archiving mechanism: The Archive Sibling
|
||||||
|
|
||||||
There is a new method to archive entries in the current file:
|
There is a new method to archive entries in the current file:
|
||||||
By moving it to a sibling called the /Archive Sibling/. That
|
By moving it to a sibling called the /Archive Sibling/. That
|
||||||
sibling has the heading "Archive" and also carries the ARCHIVE
|
sibling has the heading "Archive" and also carries the
|
||||||
tag. It seems to me that this is a great way to do archiving
|
ARCHIVE tag. It seems to me that this is a great way to do
|
||||||
inside a project, to get parts of the project out of the way
|
archiving inside a project, to get parts of the project out
|
||||||
and to wait with true archiving (moving to another file)
|
of the way and to wait with true archiving (moving to another
|
||||||
until the entire project done. The key binding for the is
|
file) until the entire project done. Archiving to a sibling
|
||||||
"C-c C-x A", and from the agenda buffer you can simply use
|
keep much of the context like inherited tags and approximate
|
||||||
"A".
|
tree position in tact, so Org is adding only a single
|
||||||
|
property, the ARCHIVE_TIME.
|
||||||
|
|
||||||
|
The key binding for the is "C-c C-x A", and from the agenda
|
||||||
|
buffer you can simply use "A".
|
||||||
|
|
||||||
Thanks to Ilya Shlyakhter for this rather clever idea.
|
Thanks to Ilya Shlyakhter for this rather clever idea.
|
||||||
|
|
||||||
*** Support for Sebastian Rose's Javasript org-info.js.
|
*** Support for Sebastian Rose's Javasript org-info.js.
|
||||||
|
|
||||||
This fascinating program allows an Org file (exported to
|
This fascinating program allows a completely new viewing
|
||||||
HTML) to be viewed different ways. There is an Info-like
|
experience for web pages created from Org files, valuable in
|
||||||
interface where you can jump through the sections of the
|
particular for longish documents. The same document can be
|
||||||
document with the `n' and `p' keys (and others). And there
|
viewed in differnet ways, and switching between the views as
|
||||||
is a folding interface where you can fold the document much
|
well as navigation uses single-key commands.
|
||||||
like you can fold it in org-mode in Emacs.
|
|
||||||
|
|
||||||
To set this up, make sure the script is available in the same
|
There is an Info-like interface where you can jump through
|
||||||
location as your HTML file. Make sure that `org-infojs' is
|
the sections of the document with the `n' and `p' keys (and
|
||||||
loaded in `org-modules'. Then add a line
|
others). And there is a folding interface where you can fold
|
||||||
|
the document much like you can fold it in org-mode in Emacs,
|
||||||
|
and cycle throught the visibility both locally and globally.
|
||||||
|
|
||||||
|
To set this up, all you need to do is to make sure that
|
||||||
|
org-infojs.el gets loaded (customize the variable org-modules
|
||||||
|
to check). Then add this line to the buffer:
|
||||||
|
|
||||||
: #+INFOJS_OPT: view:info
|
: #+INFOJS_OPT: view:info
|
||||||
|
|
||||||
to the buffer, that is all. The available views are:
|
In that line, you can configure the initial view and other
|
||||||
|
settings. Available views are =info= for the info-lke
|
||||||
|
interface, and =overview=, =content=, and =showall= for the
|
||||||
|
folding interface. See the manual for more details. The
|
||||||
|
JavaScript program is currently being served from
|
||||||
|
orgmode.org, and your exported HTML files will automatically
|
||||||
|
get it from there. However, you may want to be independent
|
||||||
|
of the existence and stability of orgmode.org and install a
|
||||||
|
copy locally. Then you need to change the path from which
|
||||||
|
the script is loaded, either by using something like
|
||||||
|
|
||||||
|
: #+INFOJS_OPT: view:info path:../scripts/org-info.js
|
||||||
|
|
||||||
|
or by configuring the variable =org-infojs-options=.
|
||||||
|
|
||||||
- =info=: like the Info program
|
|
||||||
- =overview=: Folding interface, only top-level headings seen
|
|
||||||
at startup.
|
|
||||||
- =content=: Folding interface, all headlines but no text
|
|
||||||
visible at startup.
|
|
||||||
- =showall=: Entire file visible at startup.
|
|
||||||
|
|
||||||
For details see the documentation provided by Sebastian Rose
|
For details see the documentation provided by Sebastian Rose
|
||||||
together with org-info.js.
|
together with org-info.js.
|
||||||
|
|
|
@ -486,6 +486,9 @@ Needs to be set before org.el is loaded."
|
||||||
:group 'org-agenda-startup
|
:group 'org-agenda-startup
|
||||||
:type 'boolean)
|
:type 'boolean)
|
||||||
|
|
||||||
|
(defconst org-agenda-include-inactive-timestamps nil
|
||||||
|
"Non-nil means, include inactive time stamps in agenda and timeline.")
|
||||||
|
|
||||||
(defgroup org-agenda-windows nil
|
(defgroup org-agenda-windows nil
|
||||||
"Options concerning the windows used by the Agenda in Org Mode."
|
"Options concerning the windows used by the Agenda in Org Mode."
|
||||||
:tag "Org Agenda Windows"
|
:tag "Org Agenda Windows"
|
||||||
|
@ -3082,17 +3085,18 @@ the documentation of `org-diary'."
|
||||||
".*?>"))
|
".*?>"))
|
||||||
(regexp
|
(regexp
|
||||||
(concat
|
(concat
|
||||||
|
(if org-agenda-include-inactive-timestamps "[[<]" "<")
|
||||||
(regexp-quote
|
(regexp-quote
|
||||||
(substring
|
(substring
|
||||||
(format-time-string
|
(format-time-string
|
||||||
(car org-time-stamp-formats)
|
(car org-time-stamp-formats)
|
||||||
(apply 'encode-time ; DATE bound by calendar
|
(apply 'encode-time ; DATE bound by calendar
|
||||||
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
|
(list 0 0 0 (nth 1 date) (car date) (nth 2 date))))
|
||||||
0 11))
|
1 11))
|
||||||
"\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)"
|
"\\|\\(<[0-9]+-[0-9]+-[0-9]+[^>\n]+?\\+[0-9]+[dwmy]>\\)"
|
||||||
"\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
|
"\\|\\(<%%\\(([^>\n]+)\\)>\\)"))
|
||||||
marker hdmarker deadlinep scheduledp donep tmp priority category
|
marker hdmarker deadlinep scheduledp clockp closedp inactivep
|
||||||
ee txt timestr tags b0 b3 e3 head)
|
donep tmp priority category ee txt timestr tags b0 b3 e3 head)
|
||||||
(goto-char (point-min))
|
(goto-char (point-min))
|
||||||
(while (re-search-forward regexp nil t)
|
(while (re-search-forward regexp nil t)
|
||||||
(setq b0 (match-beginning 0)
|
(setq b0 (match-beginning 0)
|
||||||
|
@ -3114,10 +3118,17 @@ the documentation of `org-diary'."
|
||||||
(- b0 org-ds-keyword-length))
|
(- b0 org-ds-keyword-length))
|
||||||
b0)
|
b0)
|
||||||
timestr (if b3 "" (buffer-substring b0 (point-at-eol)))
|
timestr (if b3 "" (buffer-substring b0 (point-at-eol)))
|
||||||
|
inactivep (= (char-after b0) ?\[)
|
||||||
deadlinep (string-match org-deadline-regexp tmp)
|
deadlinep (string-match org-deadline-regexp tmp)
|
||||||
scheduledp (string-match org-scheduled-regexp tmp)
|
scheduledp (string-match org-scheduled-regexp tmp)
|
||||||
|
closedp (and org-agenda-include-inactive-timestamps
|
||||||
|
(string-match org-closed-string tmp))
|
||||||
|
clockp (and org-agenda-include-inactive-timestamps
|
||||||
|
(or (string-match org-clock-string tmp)
|
||||||
|
(string-match "]-+\\'" tmp)))
|
||||||
donep (org-entry-is-done-p))
|
donep (org-entry-is-done-p))
|
||||||
(if (or scheduledp deadlinep) (throw :skip t))
|
(if (or scheduledp deadlinep closedp clockp)
|
||||||
|
(throw :skip t))
|
||||||
(if (string-match ">" timestr)
|
(if (string-match ">" timestr)
|
||||||
;; substring should only run to end of time stamp
|
;; substring should only run to end of time stamp
|
||||||
(setq timestr (substring timestr 0 (match-end 0))))
|
(setq timestr (substring timestr 0 (match-end 0))))
|
||||||
|
@ -3131,7 +3142,8 @@ the documentation of `org-diary'."
|
||||||
(setq head (match-string 1))
|
(setq head (match-string 1))
|
||||||
(and org-agenda-skip-timestamp-if-done donep (throw :skip t))
|
(and org-agenda-skip-timestamp-if-done donep (throw :skip t))
|
||||||
(setq txt (org-format-agenda-item
|
(setq txt (org-format-agenda-item
|
||||||
nil head category tags timestr nil
|
(if inactivep "[" nil)
|
||||||
|
head category tags timestr nil
|
||||||
remove-re)))
|
remove-re)))
|
||||||
(setq txt org-agenda-no-heading-message))
|
(setq txt org-agenda-no-heading-message))
|
||||||
(setq priority (org-get-priority txt))
|
(setq priority (org-get-priority txt))
|
||||||
|
@ -3914,6 +3926,11 @@ Negative selection means, regexp must not match for selection of an entry."
|
||||||
(org-agenda-manipulate-query ?\}))
|
(org-agenda-manipulate-query ?\}))
|
||||||
(defun org-agenda-manipulate-query (char)
|
(defun org-agenda-manipulate-query (char)
|
||||||
(cond
|
(cond
|
||||||
|
((memq org-agenda-type '(timeline agenda))
|
||||||
|
(if (y-or-n-p "Re-display with inactive time stamps included? ")
|
||||||
|
(let ((org-agenda-include-inactive-timestamps t))
|
||||||
|
(org-agenda-redo))
|
||||||
|
(error "Abort")))
|
||||||
((eq org-agenda-type 'search)
|
((eq org-agenda-type 'search)
|
||||||
(org-add-to-string
|
(org-add-to-string
|
||||||
'org-agenda-query-string
|
'org-agenda-query-string
|
||||||
|
@ -3927,7 +3944,7 @@ Negative selection means, regexp must not match for selection of an entry."
|
||||||
(if (member char '(?\{ ?\})) 0 1))))
|
(if (member char '(?\{ ?\})) 0 1))))
|
||||||
(set-register org-agenda-query-register org-agenda-query-string)
|
(set-register org-agenda-query-register org-agenda-query-string)
|
||||||
(org-agenda-redo))
|
(org-agenda-redo))
|
||||||
(t (error "Canot manipulate query for %s-type agenda buffers"
|
(t (error "Cannot manipulate query for %s-type agenda buffers"
|
||||||
org-agenda-type))))
|
org-agenda-type))))
|
||||||
|
|
||||||
(defun org-add-to-string (var string)
|
(defun org-add-to-string (var string)
|
||||||
|
|
|
@ -207,7 +207,7 @@ we turn off invisibility temporarily. Use this in a `let' form."
|
||||||
(while (setq f (pop functions))
|
(while (setq f (pop functions))
|
||||||
(or (fboundp f) (autoload f file d t)))))
|
(or (fboundp f) (autoload f file d t)))))
|
||||||
|
|
||||||
(defmacro org-match-line (re)
|
(defun org-match-line (re)
|
||||||
"Looking-at at the beginning of the current line."
|
"Looking-at at the beginning of the current line."
|
||||||
(save-excursion
|
(save-excursion
|
||||||
(goto-char (point-at-bol))
|
(goto-char (point-at-bol))
|
||||||
|
|
|
@ -2781,7 +2781,9 @@ means to push this value onto the list in the variable.")
|
||||||
(if (not org-done-keywords)
|
(if (not org-done-keywords)
|
||||||
(setq org-done-keywords (list (org-last org-todo-keywords-1))))
|
(setq org-done-keywords (list (org-last org-todo-keywords-1))))
|
||||||
(setq org-ds-keyword-length (+ 2 (max (length org-deadline-string)
|
(setq org-ds-keyword-length (+ 2 (max (length org-deadline-string)
|
||||||
(length org-scheduled-string)))
|
(length org-scheduled-string)
|
||||||
|
(length org-clock-string)
|
||||||
|
(length org-closed-string)))
|
||||||
org-drawer-regexp
|
org-drawer-regexp
|
||||||
(concat "^[ \t]*:\\("
|
(concat "^[ \t]*:\\("
|
||||||
(mapconcat 'regexp-quote org-drawers "\\|")
|
(mapconcat 'regexp-quote org-drawers "\\|")
|
||||||
|
|
Loading…
Reference in New Issue