emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Bernt Hansen <bernt@norang.ca>
To: Carsten Dominik <carsten.dominik@gmail.com>
Cc: Christopher DeMarco <demarco@maya.com>, emacs-orgmode@gnu.org
Subject: Re: Trouble setting variables in custom agenda command
Date: Wed, 03 Jun 2009 15:10:08 -0400	[thread overview]
Message-ID: <87my8puoa7.fsf@gollum.intra.norang.ca> (raw)
In-Reply-To: <F791E933-1DDD-4ABE-927F-96FC59E30E8C@gmail.com> (Carsten Dominik's message of "Wed\, 3 Jun 2009 17\:17\:42 +0200")

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Could anyone please try to reproduce this?
>
> Thanks.
>
> - Carsten
>

This works as described by Christopher for me.

GNU Emacs 22.2.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of
2008-11-09 on raven, modified by Debian

Org-mode version 6.27trans (release_6.27a-52-g45d80c3)

| Keystrokes                  | Notes                                        |
|-----------------------------+----------------------------------------------|
| emacs -q -l ~/minimal.emacs | Start emacs for testing                      |
| C-x C-f /tmp/x.x            | Visit file with test setting                 |
| M-S->                       | Go to bottom of file                         |
| C-x C-e                     | Execute - setting org-agenda-custom-commands |
| C-c a c                     | Run custom agenda "The Cycle"                |
|-----------------------------+----------------------------------------------|

and it looks like this:

,----[ x.agenda.txt ]
| Day-agenda (W23):
| Wednesday   3 June 2009
|   x:          In  -3 d.:  TODO Test task
|   x:          In   2 d.:  TODO First task
`----

I can turn on log mode with l to get this

,----[ x.agenda.txt ]
| Day-agenda (W23):
| Wednesday   3 June 2009
|                8:00...... ----------------
|   x:           9:10- 9:12 Clocked:   (0:02) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|   x:           9:13- 9:14 Clocked:   (0:01) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|               10:00...... ----------------
|               12:00...... ----------------
|               14:00...... ----------------
|               16:00...... ----------------
|               18:00...... ----------------
|               20:00...... ----------------
|   x:          In  -3 d.:  TODO Test task
|   x:          In   2 d.:  TODO First task
`----

and turn on column mode with C-c C-x C-c to get this

,----[ x.agenda.txt ]
| Day-agenda (W23):
| Wednesday   3 June 2009
|                8:00...... ----------------
|   x:           9:10- 9:12 Clocked:   (0:02) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|   x:           9:13- 9:14 Clocked:   (0:01) TODO Test task - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
|               10:00...... ----------------
|               12:00...... ----------------
|               14:00...... ----------------
|               16:00...... ----------------
|               18:00...... ----------------
|               20:00...... ----------------
|   x:          In  -3 d.:  TODO Test task
|   x:          In   2 d.:  TODO First task
`----

Test files follow:

,----[ minimal.emacs ]
| (add-to-list 'load-path (expand-file-name "~/git/org-mode/lisp"))
| (add-to-list 'auto-mode-alist '("\\.\\(org\\|org_archive\\|txt\\)$" . org-mode))
| (require 'org-install)
| (global-set-key "\C-cl" 'org-store-link)
| (global-set-key "\C-ca" 'org-agenda)
| (global-set-key "\C-cb" 'org-iswitchb)
| (setq org-log-done (quote time))
| (setq org-log-into-drawer t)
| (setq org-agenda-files '("/tmp/x.org"))
`----

,----[ x.org ]
| #_STARTUP:
| * TODO First task
|   DEADLINE: <2009-06-05 Fri>
|   - Note taken on [2009-06-03 Wed 14:51] \\
|     some log message
| * QUOTE foo
| Some test quote
| * TODO Test task
| DEADLINE: <2009-05-10 Sun +1w>
| - State "DONE"       from ""           [2009-06-03 Wed 14:50]
| :LOGBOOK:
| CLOCK: [2009-06-03 Wed 09:13]--[2009-06-03 Wed 09:14] =>  0:01
| - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:13]
| - State "DONE"       from "STARTED"    [2009-06-02 Tue 09:12]
| - State "STARTED"    from "TODO"       [2009-06-02 Tue 09:12]
| CLOCK: [2009-06-03 Wed 09:10]--[2009-06-03 Wed 09:12] =>  0:02
| :END:
| * More stuff
`----

,----[ x.x ]
|     (setq org-agenda-custom-commands
|           '(("c" "The Cycle"
|               ((agenda ""
|                        (
|                         (org-agenda-overriding-columns-format "%75ITEM %7Effort{:} %7CLOCKSUM{Total} %15TAGS %SCHEDULED")  ;; no
|                         (org-agenda-view-columns-initially t)                                                              ;; no
|                         (org-agenda-start-with-log-mode t)                                                                 ;; no
|                         (org-agenda-ndays 1)                                                                               ;; yes
|                         (org-agenda-skip-function                                                                          ;; yes
|                          '(org-agenda-skip-entry-if 'notregexp "\\* TODO")))))
|                nil nil)))
`----

-Bernt

  parent reply	other threads:[~2009-06-03 19:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-27  2:05 Trouble setting variables in custom agenda command Christopher DeMarco
2009-06-03 15:17 ` Carsten Dominik
2009-06-03 18:45   ` Matthew Lundin
2009-06-03 19:18     ` Sebastian Rose
2009-06-03 19:42       ` Eric S Fraga, Eric S Fraga
2009-06-03 19:10   ` Bernt Hansen [this message]
2009-06-03 22:26     ` Nick Dokos
2009-06-03 22:59       ` Nick Dokos
2009-06-04  7:49         ` Carsten Dominik
2009-06-04 15:06           ` Christopher DeMarco
2009-06-05  1:48             ` Matthew Lundin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87my8puoa7.fsf@gollum.intra.norang.ca \
    --to=bernt@norang.ca \
    --cc=carsten.dominik@gmail.com \
    --cc=demarco@maya.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).