From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: loading all agenda files at startup Date: Sat, 03 May 2014 19:17:21 +0800 Message-ID: <87tx97un5q.fsf@ericabrahamsen.net> References: <87fvkvdycb.fsf@ericabrahamsen.net> <87fvkvfcoq.fsf@tanger.home> <87fvkvi4u6.fsf@ericabrahamsen.net> <87lhunchx8.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:55964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgXuf-0007Wj-GE for emacs-orgmode@gnu.org; Sat, 03 May 2014 07:15:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WgXuZ-00079s-94 for emacs-orgmode@gnu.org; Sat, 03 May 2014 07:15:25 -0400 Received: from plane.gmane.org ([80.91.229.3]:55479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WgXuZ-00079K-2C for emacs-orgmode@gnu.org; Sat, 03 May 2014 07:15:19 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WgXuU-0000qN-3i for emacs-orgmode@gnu.org; Sat, 03 May 2014 13:15:14 +0200 Received: from 111.197.164.254 ([111.197.164.254]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 May 2014 13:15:14 +0200 Received: from eric by 111.197.164.254 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 03 May 2014 13:15:14 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Alexander Baier writes: > On 2014-04-30 10:44 Eric Abrahamsen wrote: >> Daimrod writes: >> >>> Eric Abrahamsen writes: >>> >>> Hi Eric, >>> >>>> I've got a few top-level user commands, related to org, that load at >>>> startup. Specifically org-agenda and org-ido-switchb are bound to keys >>>> that are available after emacs starts up. Before Org loads properly, >>>> however, things like the agenda file list and the list of valid tags and >>>> TODO keywords are unavailable. That makes it hard to boot emacs and go >>>> directly into a call to `org-todo-list': the TODO keywords aren't loaded >>>> yet. >>>> >>>> I've looked into this before but couldn't find a single function that >>>> would "boot" my local data. `org-agenda-files' reads the file list, but >>>> it doesn't actually parse the files and do all the setup routines. >>>> >>>> Is there a single-function entry point that I could put in my init >>>> files, that would get me where I want to be? ie, in a state as though >>>> `org-agenda' had already been called, though it hasn't yet? >>> >>> I call `org-agenda-list' in my `after-init-hook' but it is not "silent", >>> that is, it displays the agenda list. >>> >>> Best, >> >> Right, just calling the agenda directly will certainly solve the issue, >> and I suppose as a member of the Org faithful I should be booting to the >> agenda! But it would be nice to get the same effect, but be left in >> *scratch*... > > Maybe hacking around it with something like the following in > 'org-agenda-after-show-hook' or some similar hook? > > #+begin_src emacs-lisp > (defun my-switch-to-sratch () > (switch-to-buffer "*scratch*") > (delete-other-windows)) > #+end_src > > HTH, Yup, that's worth considering. I guess I was just hoping to get at the "plumbing" a little more directly. But yes, on balance this is probably a better approach. Thanks, Eric