* Custom block agendas: Set buffer name
@ 2020-02-12 23:49 Nathan Neff
2020-09-20 13:57 ` Nathan Neff
0 siblings, 1 reply; 2+ messages in thread
From: Nathan Neff @ 2020-02-12 23:49 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 697 bytes --]
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:
https://orgmode.org/manual/Block-agenda.html
Where would I add the org-agenda-buffer-name?
Thanks,
--Nate
[-- Attachment #2: Type: text/html, Size: 1157 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Custom block agendas: Set buffer name
2020-02-12 23:49 Custom block agendas: Set buffer name Nathan Neff
@ 2020-09-20 13:57 ` Nathan Neff
0 siblings, 0 replies; 2+ messages in thread
From: Nathan Neff @ 2020-09-20 13:57 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2306 bytes --]
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:
> https://orgmode.org/manual/Block-agenda.html
>
> Where would I add the org-agenda-buffer-name?
>
> Thanks,
> --Nate
>
[-- Attachment #2: Type: text/html, Size: 3711 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-20 13:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 23:49 Custom block agendas: Set buffer name Nathan Neff
2020-09-20 13:57 ` Nathan Neff
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).