Better default for COLUMNS format in agenda.

The default is now taken from the entry at point or the first
entry in the agenda, an can originate from a property, from
a #+COLUMNS line, or from the variable `org-columns-default-format'.
This commit is contained in:
Carsten Dominik 2008-04-04 12:25:59 +02:00
parent de99ecb8bb
commit f87667c730
3 changed files with 27 additions and 6 deletions

View file

@ -1,3 +1,12 @@
2008-04-04 Carsten Dominik <dominik@science.uva.nl>
* doc/org.texi (Agenda commands): Document columns view in the
agenda.
* lisp/org.el (org-agenda-columns): Also try the #+COLUMNS line in
the buffer associated with the entry at point (or with the first
entry in the agenda view).
2008-04-03 Carsten Dominik <dominik@science.uva.nl>
* lisp/org-clock.el: New file, split off from org.el.

View file

@ -5539,6 +5539,15 @@ Display the previous dates.
@kindex .
@item .
Go to today.
@c
@kindex C-c C-x C-c
@item C-c C-x C-c
Invoke column view (@pxref{Column view}) in the agenda buffer. The column
view format is taken from the entry at point, or (if there is no entry at
point), from the first entry in the agenda view. So whatever the format for
that entry would be in the original buffer (taken from a property, from a
@code{#+COLUMNS} line, or from the default variable
@code{org-columns-default-format}), will be used in the agenda.
@tsubheading{Query editing}
@cindex query editing, in agenda
@ -5703,11 +5712,10 @@ calendars.
@kindex H
@item H
Show holidays for three month around the cursor date.
@c
@c FIXME: This should be a different key.
@kindex C-c C-x C-c
@item C-c C-x C-c
@item M-x org-export-icalendar-combine-agenda-files
Export a single iCalendar file containing entries from all agenda files.
This is a globally available command, and also available in the agenda menu.
@tsubheading{Exporting to a file}
@kindex C-x C-w

View file

@ -11049,14 +11049,18 @@ display, or in the #+COLUMNS line of the current buffer."
org-overriding-columns-format)
(setq fmt org-overriding-columns-format))
((setq m (get-text-property (point-at-bol) 'org-hd-marker))
(setq fmt (org-entry-get m "COLUMNS" t)))
(setq fmt (or (org-entry-get m "COLUMNS" t)
(with-current-buffer (marker-buffer m)
org-columns-default-format))))
((and (boundp 'org-columns-current-fmt)
(local-variable-p 'org-columns-current-fmt)
org-columns-current-fmt)
(setq fmt org-columns-current-fmt))
((setq m (next-single-property-change (point-min) 'org-hd-marker))
(setq m (get-text-property m 'org-hd-marker))
(setq fmt (org-entry-get m "COLUMNS" t))))
(setq fmt (or (org-entry-get m "COLUMNS" t)
(with-current-buffer (marker-buffer m)
org-columns-default-format)))))
(setq fmt (or fmt org-columns-default-format))
(org-set-local 'org-columns-current-fmt fmt)
(org-columns-compile-format fmt)