Eric S Fraga <e.fr...@ucl.ac.uk> 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.