From mboxrd@z Thu Jan 1 00:00:00 1970 From: Noah Slater Subject: Re: Command to open up any agenda file? Date: Tue, 2 Sep 2014 14:11:45 +0200 Message-ID: References: <87mwaj2jag.fsf@gmail.com> <87zjejcbrd.fsf@kmlap.domain.org> <87vbp7cb1u.fsf@kmlap.domain.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XOmwI-0000tv-2b for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 08:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XOmw9-0000WR-7g for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 08:11:57 -0400 Received: from hermes.apache.org ([140.211.11.3]:32490 helo=mail.apache.org) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1XOmw9-0000W7-1U for emacs-orgmode@gnu.org; Tue, 02 Sep 2014 08:11:49 -0400 Received: by mail-ie0-f171.google.com with SMTP id rp18so7469919iec.2 for ; Tue, 02 Sep 2014 05:11:45 -0700 (PDT) In-Reply-To: <87vbp7cb1u.fsf@kmlap.domain.org> 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: Kyle Meyer Cc: emacs-orgmode@gnu.org, Noah Slater , Thorsten Jolitz Kyle, Ooh, thanks! Any way to get it so I don't have to TAB complete the leading path? Sort of how like org-iswitchb lets me just type in "Fo" and then tab complete to "Foo.org" without "/Users/nslater/Documents/Org" or whatever being prepended? On 1 September 2014 22:58, Kyle Meyer wrote: > 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 -- Noah Slater https://twitter.com/nslater