From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kyle Meyer Subject: Re: Command to open up any agenda file? Date: Mon, 01 Sep 2014 16:58:53 -0400 Message-ID: <87vbp7cb1u.fsf@kmlap.domain.org> References: <87mwaj2jag.fsf@gmail.com> <87zjejcbrd.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57437) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOYfZ-0006zR-G1 for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 16:57:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOYfT-0000tn-VX for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 16:57:45 -0400 Received: from mail-qc0-f181.google.com ([209.85.216.181]:33409) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOYfT-0000tf-RR for emacs-orgmode@gnu.org; Mon, 01 Sep 2014 16:57:39 -0400 Received: by mail-qc0-f181.google.com with SMTP id i17so5932603qcy.12 for ; Mon, 01 Sep 2014 13:57:39 -0700 (PDT) In-Reply-To: <87zjejcbrd.fsf@kmlap.domain.org> (Kyle Meyer's message of "Mon, 01 Sep 2014 16:43:34 -0400") 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: Thorsten Jolitz Cc: Noah Slater , emacs-orgmode@gnu.org Kyle Meyer wrote: [...] > I don't know of any Org function that does this either (and, as > suggested, I prefer projectile for this), but if you just want a single > function, I think it could be as simple as this: > > #+begin_src elisp > (defun find-org-agenda-file (file) > (interactive (list (org-completing-read "Agenda file: " (org-agenda-files)))) > (find-file file)) > #+end_src Oops, I'd actually change that to this (although the interactive behavior is the same). #+begin_src elisp (defun find-org-agenda-file () (interactive) (find-file (org-completing-read "Agenda file: " (org-agenda-files)))) #+end_src