* ignoring non-existent agenda files
@ 2009-09-09 7:53 Daniel Clemente
2009-09-09 10:39 ` Bastien
2009-09-09 12:50 ` Carsten Dominik
0 siblings, 2 replies; 6+ messages in thread
From: Daniel Clemente @ 2009-09-09 7:53 UTC (permalink / raw
To: org-mode Mailinglist
Hi, I recently got this message after starting Emacs daemon:
non-existent file ~/some/repo/index.org.. [R]emove from list or [A]bort?
1. It wasn't clear to me who issued this message; I thought it would
be recentf or tramp rather than org-mode. Maybe the message could give
some hint about the agenda: „non-existent agenda file …“
2. This question prevented emacs --daemon from starting
non-interactively; that's not nice. I think this minor question
shouldn't block emacs' startup. Maybe via (3.)
3. I don't mind if an agenda file doesn't exist. I have a different
set of .org files in each computer, and my org-agenda-files is a
superset of all. I would prefer a preference to request all
non-existing agenda files to be ignored.
Thanks
-- Daniel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ignoring non-existent agenda files
2009-09-09 7:53 ignoring non-existent agenda files Daniel Clemente
@ 2009-09-09 10:39 ` Bastien
2009-09-09 12:50 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Bastien @ 2009-09-09 10:39 UTC (permalink / raw
To: Daniel Clemente; +Cc: org-mode Mailinglist
Daniel Clemente <n142857@gmail.com> writes:
> Hi, I recently got this message after starting Emacs daemon:
>
> non-existent file ~/some/repo/index.org.. [R]emove from list or [A]bort?
>
> 1. It wasn't clear to me who issued this message; I thought it would
> be recentf or tramp rather than org-mode. Maybe the message could give
> some hint about the agenda: „non-existent agenda file …“
I've made this change.
> 2. This question prevented emacs --daemon from starting
> non-interactively; that's not nice. I think this minor question
> shouldn't block emacs' startup. Maybe via (3.)
>
> 3. I don't mind if an agenda file doesn't exist. I have a different
> set of .org files in each computer, and my org-agenda-files is a
> superset of all. I would prefer a preference to request all
> non-existing agenda files to be ignored.
--
Bastien
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ignoring non-existent agenda files
2009-09-09 7:53 ignoring non-existent agenda files Daniel Clemente
2009-09-09 10:39 ` Bastien
@ 2009-09-09 12:50 ` Carsten Dominik
2009-09-14 8:44 ` andrea Crotti
1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2009-09-09 12:50 UTC (permalink / raw
To: Daniel Clemente; +Cc: org-mode Mailinglist
On Sep 9, 2009, at 9:53 AM, Daniel Clemente wrote:
> Hi, I recently got this message after starting Emacs daemon:
>
> non-existent file ~/some/repo/index.org.. [R]emove from list or
> [A]bort?
>
> 1. It wasn't clear to me who issued this message; I thought it would
> be recentf or tramp rather than org-mode. Maybe the message could give
> some hint about the agenda: „non-existent agenda file …“
>
> 2. This question prevented emacs --daemon from starting
> non-interactively; that's not nice. I think this minor question
> shouldn't block emacs' startup. Maybe via (3.)
>
> 3. I don't mind if an agenda file doesn't exist. I have a different
> set of .org files in each computer, and my org-agenda-files is a
> superset of all. I would prefer a preference to request all
> non-existing agenda files to be ignored.
Hi Daniel,
I think the real mistake here is that you call org-agenda,
or maybe `org-agenda-to-appt' from .emacs, also in the case when
you are only starting the daemon. Any such operaions should
be avoided in the daemon, I think.
Silently ignoring non-existing files on the agenda list does
not seem a good idea to me. If you want to do this, you can do it lke
this:
(eval-after-load "org"
(setq org-agenda-files
(delq nil (mapcar (if (file-exists-p file)
file)
org-agenda-files))))
Make sure this runs after ou custom-file has been loaded.
(setq org-agenda-files (mapcar (if (file-exists-p file) file)
HTH
- Carsten
>
>
> Thanks
> -- Daniel
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: ignoring non-existent agenda files
2009-09-09 12:50 ` Carsten Dominik
@ 2009-09-14 8:44 ` andrea Crotti
2009-09-17 15:17 ` Daniel Clemente
0 siblings, 1 reply; 6+ messages in thread
From: andrea Crotti @ 2009-09-14 8:44 UTC (permalink / raw
To: emacs-orgmode
But why did you get this error?
Maybe you were setting manually all the agenda files?
Because I have a setting like this
(setq org-agenda-files (directory-files "~/org/" t ".org$" t))
And I never had problems..
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Re: ignoring non-existent agenda files
2009-09-14 8:44 ` andrea Crotti
@ 2009-09-17 15:17 ` Daniel Clemente
0 siblings, 0 replies; 6+ messages in thread
From: Daniel Clemente @ 2009-09-17 15:17 UTC (permalink / raw
To: andrea Crotti; +Cc: emacs-orgmode
On Mon, Sep 14, 2009 at 10:44 AM, andrea Crotti
<andrea.crotti.0@gmail.com> wrote:
> But why did you get this error?
> Maybe you were setting manually all the agenda files?
Yes, I set some agenda files by hand because some live in very
different directories. Some are used only eventually and therefore I
don't have them at each computer; my .emacs is however the same.
I used a code to check all my agenda files lists in order to remove
the files which don't exist in the current computer.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Ignoring non-existent agenda files
@ 2010-05-24 12:34 Clifford Caoile
0 siblings, 0 replies; 6+ messages in thread
From: Clifford Caoile @ 2010-05-24 12:34 UTC (permalink / raw
To: Emacs-orgmode mailing list
Hello emacs-orgmode mailing list:
I too would like the ability for org-mode to ignore (silently)
non-existent agenda files. This has been discussed before on the
mailing list [1].
Basically my use case is with Emacs on Windows. I have one Org Agenda
file on removable storage (USB memory), which I want to use from
multiple computers, so sometimes that file is not available. I tried
modifying the org-mode elisp files as shown below. When the
interactive prompt "non-existent file <filename>.. [R]emove from list
or [A]bort?" is shown, I press the "c" key to continue.
---gitk output---
[author/committer is me, but info is redacted]
Parent: 6f3026edf161ae2d721f4ac04ed50fdebb16353d (Release 6.35g)
Continuing loading when agenda org files do not exist temporarily (press c)
--------------------------------- lisp/org.el ---------------------------------
index c89c5ac..89c5d88 100644
@@ -14896,6 +14896,8 @@ Optional argument FILE means use this file
instead of the current."
((equal r ?r)
(org-remove-file file)
(throw 'nextfile t))
+ ((equal r ?c)
+ (throw 'nextfile t))
(t (error "Abort"))))))
(defun org-get-agenda-file-buffer (file)
---gitk output end---
Unfortunately, the above doesn't work correctly. I have to press "c"
multiple times in order to "c"ontinue.
I think the workaround suggested by Carsten Dominik [1], which is to
delete non-existent files from the org-agenda-files variable once,
could work for me if I change it to check the existence of the files
every time. Do you think this can be implemented as an elisp defadvice
on org-agenda<f>? Or is there some better way?
References:
[1] http://thread.gmane.org/gmane.emacs.orgmode/17408
Best regards and TIA,
Clifford Caoile
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-05-24 12:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 7:53 ignoring non-existent agenda files Daniel Clemente
2009-09-09 10:39 ` Bastien
2009-09-09 12:50 ` Carsten Dominik
2009-09-14 8:44 ` andrea Crotti
2009-09-17 15:17 ` Daniel Clemente
-- strict thread matches above, loose matches on Subject: below --
2010-05-24 12:34 Ignoring " Clifford Caoile
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.