From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Abrahamsen Subject: Re: Make org-iswitchb see all agenda files (not only opened ones) Date: Thu, 29 May 2014 10:58:01 +0800 Message-ID: <87mwe1z3ye.fsf@ericabrahamsen.net> References: <87ha4aaqjg.fsf@kyleam.com> <87lhtl4rto.fsf@bzg.ath.cx> <877g5565uz.fsf@kyleam.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49782) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpqUT-00076G-0Q for emacs-orgmode@gnu.org; Wed, 28 May 2014 22:54:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WpqUN-0000Lz-VX for emacs-orgmode@gnu.org; Wed, 28 May 2014 22:54:48 -0400 Received: from plane.gmane.org ([80.91.229.3]:37044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WpqUN-0000Lq-PA for emacs-orgmode@gnu.org; Wed, 28 May 2014 22:54:43 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1WpqUM-0008JB-Pr for emacs-orgmode@gnu.org; Thu, 29 May 2014 04:54:42 +0200 Received: from 114.248.28.193 ([114.248.28.193]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 May 2014 04:54:42 +0200 Received: from eric by 114.248.28.193 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 29 May 2014 04:54:42 +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 Kyle Meyer writes: > Hi Bastien, > > Bastien wrote: >> Hi Kyle, >> >> Kyle Meyer writes: >> >>> `org-iswitchb' is restricted to open buffers, but the function below >>> should have the behavior you want. >>> >>> #+begin_src elisp >>> (defun org-open-agenda-file () >>> (interactive) >>> (find-file (org-icompleting-read "Agenda file: " org-agenda-files))) >>> #+end_src >> >> (Yes, provided `org-agenda-files' contains only files and not >> directories.) > > Yes, that's a good point. > > Thanks I occasionally wanted to have Org "preloaded", so that right after starting emacs I could go to Org files, or run an agenda command with all the tags and TODO keywords present for completion. It turned out to be pretty simple: (defun my-preload-org () (interactive) (org-agenda-prepare-buffers (org-agenda-files))) Which I add to the after-init-hook. Seems to work just fine. Eric