emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] org-agenda-files for calfw


From: Julien Cubizolles
Subject: Re: [O] org-agenda-files for calfw
Date: Fri, 28 Aug 2015 00:52:55 +0200
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux)

Eric S Fraga <address@hidden> writes:

> On Thursday, 27 Aug 2015 at 14:06, Julien Cubizolles wrote:
>> I'd like to choose only a few of my org-agenda-files to be displayed by
>> cfw:open-org-calendar. I couldn't find a variable for that. Should I use
>> some temporary variable to store the content of the real
>> org-agenda-files while launching calfw or is there an easier way ?
>
> You could try advising the function maybe?
>
> https://www.gnu.org/software/emacs/manual/html_node/elisp/Advising-Functions.html

OK, here is my first unsuccessful attempt. I've never used advises
before so I'm not even sure it makes sense. 

--8<---------------cut here---------------start------------->8---
(defun jc-change-agenda-files ()
  (make-local-variable 'org-agenda-files)
  (setq org-agenda-files '('"~/org/orgfiles/planning.org")))

(advice-add 'cfw:open-org-calendar :before
              'jc-change-agenda-files)
--8<---------------cut here---------------end--------------->8---

When I run cfw:open-org-calendar, I see entries from all my agenda
files. However, without the make-local-variable part, I only get the
entries from planning.org but that's not what I want since I don't want
to change org-agenda-files for the other agenda views.

Julien.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]