emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Custom block agendas: Set buffer name


From: Nathan Neff
Subject: Re: Custom block agendas: Set buffer name
Date: Sun, 20 Sep 2020 08:57:07 -0500

I found it in this section of the docs:
https://orgmode.org/manual/Setting-options.html#Setting-options

I had unbalanced parenthesis in Feb. and gave up.  I was finally able to find the right
place to put the options for all the commands (see org-agenda-buffer-name) below.

I create variables and used functions to modularize my code - otherwise the parenthesis 
become unbearable IMHO.

(setq org-agenda-custom-commands '())
(defun njn-define-block-agenda()
    (setq njn-agenda '(("h" "Agenda and Projects (Home)" 
        ((agenda )
         (tags "-projectA-projectB-projectC/next\|started" ((org-agenda-todo-ignore-with-date nil)))
         (tags "projectA-inactive/-cancelled-done"
            ((org-agenda-prefix-format " %?-12t% s")
             (org-agenda-sorting-strategy (quote (priority-down)))))
         (tags "projectA-inactive/-cancelled-done"
            ((org-agenda-prefix-format " %-16(njn-get-proj-property) %?-12t% s")
             (org-tags-exclude-from-inheritance (remove "projectA" org-tags-exclude-from-inheritance))
             (org-agenda-group-by-property "PROJ"))))
         ((org-agenda-buffer-name "Home")))))
    (setq org-agenda-custom-commands (append njn-agenda org-agenda-custom-commands)))
(njn-define-block-agenda)

I realize this is opening a can of worms -- does anyone have recommendations for formatting
Lisp code?  The above code is legible for me *right now* but in about 3 months the code will once
again be a paren-fest.

Thanks,
--Nate

On Wed, Feb 12, 2020 at 5:49 PM Nathan Neff <nathan.neff@gmail.com> wrote:
Hello all,

I'm playing with block agendas and I'm wondering how to set a specific buffer
name.

In non-block agendas, I can set the buffer name like this:
(setq org-agenda-custom-commands (append
  '(
     ("p" "Simple list of active projects" tags-todo "PRIORITY<\"C\"+project-inactive/-cancelled-done"
       ((org-agenda-prefix-format " %?-12t% s")
        (org-agenda-buffer-name "Top Level Active Projects")
        (org-agenda-sorting-strategy (quote (priority-down)))))

But I can't find where to specify org-agenda-buffer-name in a custom block agenda - for example, 
in the docs:

Where would I add the org-agenda-buffer-name?

Thanks,
--Nate

reply via email to

[Prev in Thread] Current Thread [Next in Thread]