emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Command to open up any agenda file?
@ 2014-09-01 19:59 Noah Slater
  2014-09-01 20:11 ` Thorsten Jolitz
  2014-09-02  1:55 ` Eric Abrahamsen
  0 siblings, 2 replies; 8+ messages in thread
From: Noah Slater @ 2014-09-01 19:59 UTC (permalink / raw)
  To: emacs-orgmode

Hello,

I quite like C-c b (org-iswitchb) but it only works if the file is
already open. What I really want is a command that lets me tab
complete any agenda file at all. Does such a thing exist? I couldn't
find it in the docs.

Thanks!

-- 
Noah Slater
https://twitter.com/nslater

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-01 19:59 Command to open up any agenda file? Noah Slater
@ 2014-09-01 20:11 ` Thorsten Jolitz
  2014-09-01 20:43   ` Kyle Meyer
  2014-09-03 10:03   ` Eric S Fraga
  2014-09-02  1:55 ` Eric Abrahamsen
  1 sibling, 2 replies; 8+ messages in thread
From: Thorsten Jolitz @ 2014-09-01 20:11 UTC (permalink / raw)
  To: emacs-orgmode

Noah Slater <nslater@apache.org> writes:

Hello,

> I quite like C-c b (org-iswitchb) but it only works if the file is
> already open. What I really want is a command that lets me tab
> complete any agenda file at all. Does such a thing exist? I couldn't
> find it in the docs.

don't know if this exists in Org, but defining you agenda-files as a
project you might be able to use projectile:

,----
| Projectile Commander Methods:
| 
| ?:	Commander help buffer.
| A:	Find ag on project.
| D:	Open project root in dired.
| R:	Regenerate the project's [e|g]tags.
| T:	Find test file in project.
| a:	Run ack on project.
| b:	Switch to project buffer.
| d:	Find directory in project.
| e:	Find recently visited file in project.
| f:	Find file in project.
| g:	Run grep on project.
| j:	Find tag in project.
| k:	Kill all project buffers.
| o:	Run multi-occur on project buffers.
| s:	Switch project.
| v:	Open project root in vc-dir or magit.
`----

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-01 20:11 ` Thorsten Jolitz
@ 2014-09-01 20:43   ` Kyle Meyer
  2014-09-01 20:58     ` Kyle Meyer
  2014-09-03 10:03   ` Eric S Fraga
  1 sibling, 1 reply; 8+ messages in thread
From: Kyle Meyer @ 2014-09-01 20:43 UTC (permalink / raw)
  To: Thorsten Jolitz, Noah Slater; +Cc: emacs-orgmode

Thorsten Jolitz <tjolitz@gmail.com> wrote:
> Noah Slater <nslater@apache.org> writes:
>
> Hello,
>
>> I quite like C-c b (org-iswitchb) but it only works if the file is
>> already open. What I really want is a command that lets me tab
>> complete any agenda file at all. Does such a thing exist? I couldn't
>> find it in the docs.
>
> don't know if this exists in Org, but defining you agenda-files as a
> project you might be able to use projectile:

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-01 20:43   ` Kyle Meyer
@ 2014-09-01 20:58     ` Kyle Meyer
  2014-09-02 12:11       ` Noah Slater
  0 siblings, 1 reply; 8+ messages in thread
From: Kyle Meyer @ 2014-09-01 20:58 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: Noah Slater, emacs-orgmode

Kyle Meyer <kyle@kyleam.com> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-01 19:59 Command to open up any agenda file? Noah Slater
  2014-09-01 20:11 ` Thorsten Jolitz
@ 2014-09-02  1:55 ` Eric Abrahamsen
  1 sibling, 0 replies; 8+ messages in thread
From: Eric Abrahamsen @ 2014-09-02  1:55 UTC (permalink / raw)
  To: emacs-orgmode

Noah Slater <nslater@apache.org> writes:

> Hello,
>
> I quite like C-c b (org-iswitchb) but it only works if the file is
> already open. What I really want is a command that lets me tab
> complete any agenda file at all. Does such a thing exist? I couldn't
> find it in the docs.

Check org-{switchb,iswitchb,ido-switchb}, there are a few different
functions that will do this.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-01 20:58     ` Kyle Meyer
@ 2014-09-02 12:11       ` Noah Slater
  2014-09-02 15:20         ` Kyle Meyer
  0 siblings, 1 reply; 8+ messages in thread
From: Noah Slater @ 2014-09-02 12:11 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode, 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 <kyle@kyleam.com> wrote:
> Kyle Meyer <kyle@kyleam.com> 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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-02 12:11       ` Noah Slater
@ 2014-09-02 15:20         ` Kyle Meyer
  0 siblings, 0 replies; 8+ messages in thread
From: Kyle Meyer @ 2014-09-02 15:20 UTC (permalink / raw)
  To: Noah Slater; +Cc: emacs-orgmode

Noah Slater <nslater@apache.org> wrote:
> 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?

Does turning on `org-completion-use-iswitchb' or
`org-completion-use-ido' work for you? I think `org-switchb' just sets
`org-completion-use-iswitchb' to t if both of the above variables are
nil.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Command to open up any agenda file?
  2014-09-01 20:11 ` Thorsten Jolitz
  2014-09-01 20:43   ` Kyle Meyer
@ 2014-09-03 10:03   ` Eric S Fraga
  1 sibling, 0 replies; 8+ messages in thread
From: Eric S Fraga @ 2014-09-03 10:03 UTC (permalink / raw)
  To: Thorsten Jolitz; +Cc: emacs-orgmode

On Monday,  1 Sep 2014 at 22:11, Thorsten Jolitz wrote:

[...]

> don't know if this exists in Org, but defining you agenda-files as a
> project you might be able to use projectile:

Thorsten,

Thanks for the heads up on projectile.  I'd forgotten about this
package.  I've now installed it and it's excellent.  And, for the OP, it
does work well with my agenda files as they are a separate project under
git!

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.50.1, Org release_8.3beta-309-gd4e4b1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-03 10:03 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-01 19:59 Command to open up any agenda file? Noah Slater
2014-09-01 20:11 ` Thorsten Jolitz
2014-09-01 20:43   ` Kyle Meyer
2014-09-01 20:58     ` Kyle Meyer
2014-09-02 12:11       ` Noah Slater
2014-09-02 15:20         ` Kyle Meyer
2014-09-03 10:03   ` Eric S Fraga
2014-09-02  1:55 ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).