Re: [O] Command to open up any agenda file?

2014-09-03 Thread Eric S Fraga
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



Re: [O] Command to open up any agenda file?

2014-09-02 Thread Noah Slater
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 k...@kyleam.com wrote:
 Kyle Meyer k...@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



Re: [O] Command to open up any agenda file?

2014-09-02 Thread Kyle Meyer
Noah Slater nsla...@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.




Re: [O] Command to open up any agenda file?

2014-09-01 Thread Thorsten Jolitz
Noah Slater nsla...@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




Re: [O] Command to open up any agenda file?

2014-09-01 Thread Kyle Meyer
Thorsten Jolitz tjol...@gmail.com wrote:
 Noah Slater nsla...@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



Re: [O] Command to open up any agenda file?

2014-09-01 Thread Kyle Meyer
Kyle Meyer k...@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



Re: [O] Command to open up any agenda file?

2014-09-01 Thread Eric Abrahamsen
Noah Slater nsla...@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.