emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Troubles with custom agenda commands
@ 2012-09-13 12:02 Sebastien Vauban
  2012-09-18  7:10 ` Bastien
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2012-09-13 12:02 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hello,

Trying to write my own custom agenda commands, I face a couple of weird
behaviors.

#+begin_src emacs-lisp
  (add-to-list 'org-agenda-custom-commands
               '("S" "Summary Review"
                 ((agenda "")
                  (todo ""))
                 ((org-agenda-time-grid nil)
                  (org-agenda-clockreport-mode nil)
                  (org-deadline-warning-days 0))))
#+end_src

Having the above (which is correct, AFAICT from following the tutorial on
http://orgmode.org/worg/org-tutorials/org-custom-agenda-commands.html):

1. When getting to the agenda dispatcher (`C-c a'), I see:

--8<---------------cut here---------------start------------->8---
   S   Summary Review: set of 3 commands
--8<---------------cut here---------------end--------------->8---

  while I only have... 2 commands (`agenda' and `todo'). Why?

2. When firing it up (`C-c a' followed by `S'), I get the 2 blocks I was
   expecting, but also an error:

--8<---------------cut here---------------start------------->8---
   Buffer is read-only: #<buffer *Org Agenda(S)*>
--8<---------------cut here---------------end--------------->8---

Can you confirm this?

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: Troubles with custom agenda commands
  2012-09-13 12:02 Troubles with custom agenda commands Sebastien Vauban
@ 2012-09-18  7:10 ` Bastien
  2012-09-19 19:20   ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: Bastien @ 2012-09-18  7:10 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: public-emacs-orgmode-mXXj517/zsQ



Hi Sébastien,

"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:

> 1. When getting to the agenda dispatcher (`C-c a'), I see:
>
>    S   Summary Review: set of 3 commands
>
>   while I only have... 2 commands (`agenda' and `todo'). Why?

This is a bug, fixed.  Thanks for spotting this!

> 2. When firing it up (`C-c a' followed by `S'), I get the 2 blocks I was
>    expecting, but also an error:
>
>    Buffer is read-only: #<buffer *Org Agenda(S)*>

I guess this is a problem with some hooks trying to modify the buffer,
please let me know if this happens again.

-- 
 Bastien

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

* Re: Troubles with custom agenda commands
  2012-09-18  7:10 ` Bastien
@ 2012-09-19 19:20   ` Sebastien Vauban
       [not found]     ` <804nmt95wa.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2012-09-19 19:20 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Bastien,

Bastien wrote:
> "Sebastien Vauban"
> <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
>
>> 1. When getting to the agenda dispatcher (`C-c a'), I see:
>>
>>    S   Summary Review: set of 3 commands
>>
>>   while I only have... 2 commands (`agenda' and `todo'). Why?
>
> This is a bug, fixed.  Thanks for spotting this!

Tested. Confirmed OK.

>> 2. When firing it up (`C-c a' followed by `S'), I get the 2 blocks I was
>>    expecting, but also an error:
>>
>>    Buffer is read-only: #<buffer *Org Agenda(S)*>
>
> I guess this is a problem with some hooks trying to modify the buffer,
> please let me know if this happens again.

It does not anymore, and I've changed some settings as well in my .emacs. It
could have been some local customization. Cancelled!

Thanks!

Best regards,
  Seb

-- 
Sebastien Vauban

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

* [BUG] Re: Troubles with custom agenda commands
       [not found]     ` <804nmt95wa.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
@ 2013-09-11 11:04       ` Sebastien Vauban
  2013-09-11 11:19         ` Sebastien Vauban
  0 siblings, 1 reply; 5+ messages in thread
From: Sebastien Vauban @ 2013-09-11 11:04 UTC (permalink / raw)
  To: public-emacs-orgmode-mXXj517/zsQ-wOFGN7rlS/M9smdsby/KFg




Hi Bastien,

"Sebastien Vauban" wrote:
> Bastien wrote:
>> "Sebastien Vauban" writes:
>>
>>> When getting to the agenda dispatcher (`C-c a'), I see:
>>>
>>>    S   Summary Review: set of 3 commands
>>>
>>>   while I only have... 2 commands (`agenda' and `todo'). Why?
>>
>> This is a bug, fixed.  Thanks for spotting this!
>
> Tested. Confirmed OK.

The above problem is back with the following configuration (tested with
"emacs -Q"):

--8<---------------cut here---------------start------------->8---
    (add-to-list 'org-agenda-custom-commands
                 '("C" "Clock Review"
                   ((agenda ""
                            ((org-agenda-clockreport-mode t)
                             (org-agenda-overriding-header "Clocking Review")
                             (org-agenda-show-log 'clockcheck)
                             (org-agenda-span 'day))) t)))
--8<---------------cut here---------------end--------------->8---

Org writes:

--8<---------------cut here---------------start------------->8---
C   Clock Review  : set of 2 commands
n   Agenda and all TODO's: set of 2 commands
--8<---------------cut here---------------end--------------->8---

while there is only 1 command to be run (the agenda view)!?

Note, surprisingly, 2 extra spaces before the ":", while they're not in the
customized header string...

Best regards,
  Seb

-- 
Sebastien Vauban

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

* Re: [BUG] Re: Troubles with custom agenda commands
  2013-09-11 11:04       ` [BUG] " Sebastien Vauban
@ 2013-09-11 11:19         ` Sebastien Vauban
  0 siblings, 0 replies; 5+ messages in thread
From: Sebastien Vauban @ 2013-09-11 11:19 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Bastien,

"Sebastien Vauban" wrote:
> "Sebastien Vauban" wrote:
>> Bastien wrote:
>>> "Sebastien Vauban" writes:
>>>
>>>> When getting to the agenda dispatcher (`C-c a'), I see:
>>>>
>>>>    S   Summary Review: set of 3 commands
>>>>
>>>>   while I only have... 2 commands (`agenda' and `todo'). Why?
>>>
>>> This is a bug, fixed.  Thanks for spotting this!
>>
>> Tested. Confirmed OK.
>
> The above problem is back with the following configuration (tested with
> "emacs -Q"):
>
>     (add-to-list 'org-agenda-custom-commands
>                  '("C" "Clock Review"
>                    ((agenda ""
>                             ((org-agenda-clockreport-mode t)
>                              (org-agenda-overriding-header "Clocking Review")
>                              (org-agenda-show-log 'clockcheck)
>                              (org-agenda-span 'day))) t)))
>
> Org writes:
>
> C   Clock Review  : set of 2 commands
> n   Agenda and all TODO's: set of 2 commands
>
> while there is only 1 command to be run (the agenda view)!?

Please IGNORE IT!  This "bug" is due to a faulty placement of the parenthesis.

It should have been:

>     (add-to-list 'org-agenda-custom-commands
>                  '("C" "Clock Review"
>                    ((agenda ""
>                             ((org-agenda-clockreport-mode t)
>                              (org-agenda-overriding-header "Clocking Review")
>                              (org-agenda-show-log 'clockcheck)
>                              (org-agenda-span 'day))))) t)
                                                       ^^
Sorry for this false alarm.

> Note, surprisingly, 2 extra spaces before the ":", while they're not in the
> customized header string...

Best regards,
  Seb

-- 
Sebastien Vauban

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

end of thread, other threads:[~2013-09-11 11:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-13 12:02 Troubles with custom agenda commands Sebastien Vauban
2012-09-18  7:10 ` Bastien
2012-09-19 19:20   ` Sebastien Vauban
     [not found]     ` <804nmt95wa.fsf-oHC15RC7JGTNLxjTenLetw@public.gmane.org>
2013-09-11 11:04       ` [BUG] " Sebastien Vauban
2013-09-11 11:19         ` Sebastien Vauban

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