From f87667c730f0a69c6be051f8742fccfb4c47fe0d Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Fri, 4 Apr 2008 12:25:59 +0200 Subject: [PATCH] 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'. --- ChangeLog | 9 +++++++++ doc/org.texi | 16 ++++++++++++---- lisp/org.el | 8 ++++++-- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6146ccb1f..ebb2ec1d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2008-04-04 Carsten Dominik + + * 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 * lisp/org-clock.el: New file, split off from org.el. diff --git a/doc/org.texi b/doc/org.texi index f68744576..de2726b90 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -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 diff --git a/lisp/org.el b/lisp/org.el index edce2c320..0a0233ce3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -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)