emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Hide empty custom agenda sections
@ 2013-06-17 10:17 Ken Mankoff
  2013-06-27 14:44 ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Ken Mankoff @ 2013-06-17 10:17 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 707 bytes --]

Hi,

I have a section of my custom agenda that shows items synced through
mobile-org. My mobile.org file has

#+FILETAGS: REFILE

Which means a custom agenda command of

(tags "REFILE" ((org-agenda-overriding-header "REFILE")))

shows all items from that file.

Right now I have this at the bottom of my custom agenda, and it is
therefore often off-screen. I would like to have it at the top, but only
appear when there are items under this section. Most of the time it is
there and three lines are wasting space (header separator =====, header
"REFILE", and a blank line).

I haven't seen this feature. Does a command exist that already supports
this, or do I need to develop this myself?

Thanks,

   -k.

[-- Attachment #2: Type: text/html, Size: 1099 bytes --]

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

* Re: Hide empty custom agenda sections
  2013-06-17 10:17 Hide empty custom agenda sections Ken Mankoff
@ 2013-06-27 14:44 ` Bastien
  2013-06-27 15:18   ` Ken Mankoff
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien @ 2013-06-27 14:44 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org-mode

Hi Ken,

Ken Mankoff <mankoff@gmail.com> writes:

> Right now I have this at the bottom of my custom agenda, and it is
> therefore often off-screen. I would like to have it at the top, but
> only appear when there are items under this section. Most of the time
> it is there and three lines are wasting space (header separator ====
> =, header "REFILE", and a blank line).

So you are using agenda blocks, right?  

Please post the skeleton of your custom agendas so that we can better
understand.

Thanks,

-- 
 Bastien

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

* Re: Hide empty custom agenda sections
  2013-06-27 14:44 ` Bastien
@ 2013-06-27 15:18   ` Ken Mankoff
  2013-06-28 16:34     ` Ken Mankoff
  2013-07-01 13:38     ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: Ken Mankoff @ 2013-06-27 15:18 UTC (permalink / raw)
  To: Bastien; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 1639 bytes --]

Hi Bastien,

Here is my custom agenda section. I'd like to have the DEADLINE and the
REFILE only show up if items exist in those sections, not when they are
empty. Actually, I guess I'd like this for all sections.

(setq org-agenda-custom-commands
      '(("c" "My Custom Agenda"
         (
  (tags "REFILE" ((org-agenda-overriding-header "REFILE")))
  (tags-todo "+DEADLINE<=\"<+3d>\""
     (
      (org-agenda-overriding-header "Deadline <= 3 Days")
      ))
  (tags-todo "+SCHEDULED<\"<tomorrow>\""
     (
      (org-agenda-overriding-header "Scheduled Today")
      ))
          (todo "INPROGRESS" ((org-agenda-overriding-header "In Progress")))
          (todo "WAITING|VERIFY" ((org-agenda-overriding-header "Waiting or
Verify")))
  (agenda "" (
      (org-agenda-overriding-header "Scheduled")
      (org-deadline-warning-days 0)
      ))
          (todo "SOMEDAY" ((org-agenda-overriding-header "Someday")))
  (tags "REFILE" ((org-agenda-overriding-header "REFILE")))
  ) nil ("org.txt" "org.html" "org.ics"))))



On Thu, Jun 27, 2013 at 10:44 AM, Bastien <bzg@gnu.org> wrote:

> Hi Ken,
>
> Ken Mankoff <mankoff@gmail.com> writes:
>
> > Right now I have this at the bottom of my custom agenda, and it is
> > therefore often off-screen. I would like to have it at the top, but
> > only appear when there are items under this section. Most of the time
> > it is there and three lines are wasting space (header separator ====
> > =, header "REFILE", and a blank line).
>
> So you are using agenda blocks, right?
>
> Please post the skeleton of your custom agendas so that we can better
> understand.
>
> Thanks,
>
> --
>  Bastien
>

[-- Attachment #2: Type: text/html, Size: 3487 bytes --]

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

* Re: Hide empty custom agenda sections
  2013-06-27 15:18   ` Ken Mankoff
@ 2013-06-28 16:34     ` Ken Mankoff
  2013-07-01 13:38     ` Bastien
  1 sibling, 0 replies; 6+ messages in thread
From: Ken Mankoff @ 2013-06-28 16:34 UTC (permalink / raw)
  To: Org-mode

[-- Attachment #1: Type: text/plain, Size: 2235 bytes --]

So I tried adding a "(nil)" in the custom agenda section. If this were
allowed (presumably ignored), I could write a function that returns nil
unless there were items tagged REFILE, in which case it would return

  (tags "REFILE" ((org-agenda-overriding-header "REFILE")))

But having (nil) caused an error. I guess I could make the entire "My
Custom Agenda" section be the output of a function, but that seems overly
complex.

  -k.


On Thu, Jun 27, 2013 at 11:18 AM, Ken Mankoff <mankoff@gmail.com> wrote:

> Hi Bastien,
>
> Here is my custom agenda section. I'd like to have the DEADLINE and the
> REFILE only show up if items exist in those sections, not when they are
> empty. Actually, I guess I'd like this for all sections.
>
> (setq org-agenda-custom-commands
>       '(("c" "My Custom Agenda"
>          (
>   (tags "REFILE" ((org-agenda-overriding-header "REFILE")))
>   (tags-todo "+DEADLINE<=\"<+3d>\""
>      (
>       (org-agenda-overriding-header "Deadline <= 3 Days")
>       ))
>   (tags-todo "+SCHEDULED<\"<tomorrow>\""
>      (
>       (org-agenda-overriding-header "Scheduled Today")
>       ))
>           (todo "INPROGRESS" ((org-agenda-overriding-header "In
> Progress")))
>           (todo "WAITING|VERIFY" ((org-agenda-overriding-header "Waiting
> or Verify")))
>   (agenda "" (
>       (org-agenda-overriding-header "Scheduled")
>       (org-deadline-warning-days 0)
>       ))
>           (todo "SOMEDAY" ((org-agenda-overriding-header "Someday")))
>   (tags "REFILE" ((org-agenda-overriding-header "REFILE")))
>   ) nil ("org.txt" "org.html" "org.ics"))))
>
>
>
> On Thu, Jun 27, 2013 at 10:44 AM, Bastien <bzg@gnu.org> wrote:
>
>> Hi Ken,
>>
>> Ken Mankoff <mankoff@gmail.com> writes:
>>
>> > Right now I have this at the bottom of my custom agenda, and it is
>> > therefore often off-screen. I would like to have it at the top, but
>> > only appear when there are items under this section. Most of the time
>> > it is there and three lines are wasting space (header separator ====
>> > =, header "REFILE", and a blank line).
>>
>> So you are using agenda blocks, right?
>>
>> Please post the skeleton of your custom agendas so that we can better
>> understand.
>>
>> Thanks,
>>
>> --
>>  Bastien
>>
>
>

[-- Attachment #2: Type: text/html, Size: 4567 bytes --]

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

* Re: Hide empty custom agenda sections
  2013-06-27 15:18   ` Ken Mankoff
  2013-06-28 16:34     ` Ken Mankoff
@ 2013-07-01 13:38     ` Bastien
  2013-07-01 14:38       ` Ken Mankoff
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2013-07-01 13:38 UTC (permalink / raw)
  To: Ken Mankoff; +Cc: Org-mode

Hi Ken,

Ken Mankoff <mankoff@gmail.com> writes:

> Here is my custom agenda section. I'd like to have the DEADLINE and
> the REFILE only show up if items exist in those sections, not when
> they are empty. Actually, I guess I'd like this for all sections.

I gave another quick look but this would be too complex to implement,
even if I agree this would be nice to have.

-- 
 Bastien

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

* Re: Hide empty custom agenda sections
  2013-07-01 13:38     ` Bastien
@ 2013-07-01 14:38       ` Ken Mankoff
  0 siblings, 0 replies; 6+ messages in thread
From: Ken Mankoff @ 2013-07-01 14:38 UTC (permalink / raw)
  To: Bastien; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 248 bytes --]

On Mon, Jul 1, 2013 at 9:38 AM, Bastien <bzg@gnu.org> wrote:
>
>
> I gave another quick look but this would be too complex to implement,
> even if I agree this would be nice to have.
>
>
Ok. Oh well. Thank you for considering and replying.

   -k.

[-- Attachment #2: Type: text/html, Size: 693 bytes --]

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

end of thread, other threads:[~2013-07-01 14:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-17 10:17 Hide empty custom agenda sections Ken Mankoff
2013-06-27 14:44 ` Bastien
2013-06-27 15:18   ` Ken Mankoff
2013-06-28 16:34     ` Ken Mankoff
2013-07-01 13:38     ` Bastien
2013-07-01 14:38       ` Ken Mankoff

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).