[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] How about allowing indirect buffers for agenda restriction
Re: [Orgmode] How about allowing indirect buffers for agenda restriction?
Tue, 31 Oct 2006 11:40:39 +0100
There is a better way of doing this, which I am implementing for 4.53.
On Oct 31, 2006, at 9:55, Alex Bochannek wrote:
This is related to the narrowing patch I sent. Basically, I create a
indirect buffer clone, which I narrow to my Projects outline, but
still want to be able to call agenda commands that limit to the
file. Since indirect buffers have no file associated with them, I
thought the code below may be sufficient to do what I need it to. Not
$ diff -bu ../org-4.52/org.el org.el
--- ../org-4.52/org.el 2006-10-04 02:14:17.000000000 -0700
+++ org.el 2006-10-31 00:48:09.047839000 -0800
@@ -6883,6 +6884,8 @@
first press `1' to indicate that the agenda should be temporarily
next use of \\[org-agenda]) restricted to the current file."
+ (set-buffer (or (buffer-base-buffer) (current-buffer)))
(let ((restrict-ok (and buffer-file-name (org-mode-p)))
@@ -6995,7 +6998,7 @@
(org-let lprops '(org-occur match)))
(t (error "Invalid custom agenda command type %s"
(org-run-agenda-series (cddr entry))))
- (t (error "Invalid key"))))))
+ (t (error "Invalid key")))))))
;; FIXME: what is the meaning of WINDOW?????
(defun org-run-agenda-series (series &optional window)
Emacs-orgmode mailing list
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
phone: +31 20 525 7477