Re: [O] How to filter on files

2013-11-18 Thread Rene
Bastien bzg at gnu.org writes:

 Rene jlr_0 at yahoo.com writes:
 
  I'd have loved though to be able to switch from one view (home+office view)
  to another (office view) without having to reconstruct the whole
  agenda.
 
 Maybe the `org-agenda-sticky' option can help there?

Well.  Not exactly.

Wouldn't I be able to work something out with org-agenda-category-filter-preset?

I don't know how to make this work though.

Is there some config example out there?




Re: [O] How to filter on files

2013-11-18 Thread Eric Abrahamsen
Rene jl...@yahoo.com writes:

 Bastien bzg at gnu.org writes:

 Rene jlr_0 at yahoo.com writes:
 
  I'd have loved though to be able to switch from one view (home+office view)
  to another (office view) without having to reconstruct the whole
  agenda.
 
 Maybe the `org-agenda-sticky' option can help there?

 Well.  Not exactly.

 Wouldn't I be able to work something out with 
 org-agenda-category-filter-preset?

 I don't know how to make this work though.

 Is there some config example out there?

It's a little hard to know what's wrong with org-agenda-sticky, but a
tag-based way of doing this would be to use a #+FILETAGS: line at the
top of each of your files. That automatically adds any tag in that line
to the whole file, so you can de-facto filter by files.




Re: [O] How to filter on files

2013-11-18 Thread Michael Brand
Hi Rene

On Mon, Nov 18, 2013 at 2:00 PM, Rene jl...@yahoo.com wrote:
 Is there some config example out there?

I think this simplified part of my config for
org-agenda-custom-commands is similar to what you are looking for:

[...]
(c calendar c--
 ((agenda
   
   ((org-agenda-files '(/my_data/notes_c.org))
(d calendar cd-
 ((agenda
   
   ((org-agenda-files '(/my_data/notes_c.org
/my_data/notes_d.org))
(p calendar cdp
 ((agenda
   
   ((org-agenda-files '(/my_data/notes_c.org
/my_data/notes_d.org
/my_data/notes_p.org))
[...]

Michael



Re: [O] How to filter on files

2013-11-18 Thread Rene
Michael Brand michael.ch.brand at gmail.com writes:

 I think this simplified part of my config for
 org-agenda-custom-commands is similar to what you are looking for:

Yes.  That's exactly what I did initially.

But I find it more elegant to build the agenda once (let's say for both
office and home) and then hit a key to filter/restrict the scope to just one
broad context (let's say office tasks and appointments), instead of
rebuilding the agenda all the time.

--
rene







Re: [O] How to filter on files

2013-11-18 Thread Rene
Eric Abrahamsen eric at ericabrahamsen.net writes:

 It's a little hard to know what's wrong with org-agenda-sticky, but a
 tag-based way of doing this would be to use a #+FILETAGS: line at the
 top of each of your files. That automatically adds any tag in that line
 to the whole file, so you can de-facto filter by files.

I've tried this and it works. 

In order to keep my predefined tags (defined with org-tag-alist) along with
the FILETAGS I just had to define them with org-tag-persistent-alist.

Unfortunately this prevents the fast-tag-selection from working when calling
org-capture.

Any idea on how to keep the fast-tag-selection mechanism?

--
rene






Re: [O] How to filter on files

2013-11-15 Thread Bastien
Hi Rene,

Rene jl...@yahoo.com writes:

 But once in a while I'd like to dynamically narrow down my list of agenda
 entries to either one of these files.  I tried to play with
 org-agenda-filter-by-tag or org-agenda-filter-by-category but to no
 avail.

Use a #+CATEGORY: property on top of each file, then use  in the
agenda to filter by the category the cursor is on.
 
 Is there some kind of org-agenda-filter-by-file piece of code
 somewhere?

No, but you can have a category per file and filter per category,
which does the same.  Always, you can narrow down the scope of the
agenda *before* creating the agenda, with C-c a  [yourkey] -- the
 means to narrow down to the current buffer.

Hope this helps,

-- 
 Bastien



Re: [O] How to filter on files

2013-11-15 Thread Rene
Bastien bzg at gnu.org writes:

 Rene jlr_0 at yahoo.com writes:
 
  But once in a while I'd like to dynamically narrow down my list of agenda
  entries to either one of these files.  I tried to play with
  org-agenda-filter-by-tag or org-agenda-filter-by-category but to no
  avail.
 
 Use a #+CATEGORY: property on top of each file, then use  in the
 agenda to filter by the category the cursor is on.

I do already have first level headlines each with its own CATEGORY in which
I refile my tasks.  Therefore the #+CATEGORY: property on top of the file
does not appear in the agenda view unfortunately.

  Is there some kind of org-agenda-filter-by-file piece of code
  somewhere?
 
 No, but you can have a category per file and filter per category,
 which does the same.  Always, you can narrow down the scope of the
 agenda *before* creating the agenda, with C-c a  [yourkey] -- the
  means to narrow down to the current buffer.

It does work.  Thanks.

I'd have loved though to be able to switch from one view (home+office view)
to another (office view) without having to reconstruct the whole agenda.

--
rene




Re: [O] How to filter on files

2013-11-15 Thread Bastien
Rene jl...@yahoo.com writes:

 I'd have loved though to be able to switch from one view (home+office view)
 to another (office view) without having to reconstruct the whole
 agenda.

Maybe the `org-agenda-sticky' option can help there?

-- 
 Bastien