From: Carsten Dominik <carsten.dominik@gmail.com>
To: Bastien <bzg@altern.org>
Cc: Sebastien Vauban <wxhgmqzgwmuf@spammotel.com>, emacs-orgmode@gnu.org
Subject: Re: missing todo's in agenda after emacs/org upgrade
Date: Fri, 19 Aug 2011 15:12:26 +0200 [thread overview]
Message-ID: <1036961E-31E7-42C0-B5B9-1A7D5DD9BDEB@gmail.com> (raw)
In-Reply-To: <87r54hk0q1.fsf@gnu.org>
[-- Attachment #1: Type: text/plain, Size: 347 bytes --]
On Aug 19, 2011, at 3:08 PM, Bastien wrote:
> Hi Carsten,
>
> Carsten Dominik <carsten.dominik@gmail.com> writes:
>
>> OK, I am attaching a patch proposal which will clean this up a bit.
>
> Thanks for tackling these issues -- I can't read the patch thourh,
> as it is just two lines long, can you resent it?
Strange. Here it is again:
[-- Attachment #2: agenda-include-all.patch --]
[-- Type: application/octet-stream, Size: 5597 bytes --]
Changes at master
Modified lisp/org-agenda.el
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index c2b111a..29a2377 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -351,7 +351,8 @@ This will be spliced into the custom type of
`org-agenda-custom-commands'.")
-(defcustom org-agenda-custom-commands nil
+(defcustom org-agenda-custom-commands '(("n" "Agenda and all TODO's"
+ ((agenda "") (alltodo))))
"Custom commands for the agenda.
These commands will be offered on the splash screen displayed by the
agenda dispatcher \\[org-agenda]. Each entry is a list like this:
@@ -1081,14 +1082,6 @@ Custom commands can set this variable in the options section."
:group 'org-agenda-daily/weekly
:type 'boolean)
-(defcustom org-agenda-include-all-todo nil
- "Set means weekly/daily agenda will always contain all TODO entries.
-The TODO entries will be listed at the top of the agenda, before
-the entries for specific days.
-This option is deprecated, it is better to define a block agenda instead."
- :group 'org-agenda-daily/weekly
- :type 'boolean)
-
(defcustom org-agenda-repeating-timestamp-show-all t
"Non-nil means show all occurrences of a repeating stamp in the agenda.
When set to a list of strings, only show occurrences of repeating
@@ -3351,7 +3344,7 @@ no longer in use."
(defvar org-agenda-only-exact-dates nil) ; dynamically scoped
-(defun org-timeline (&optional include-all)
+(defun org-timeline (&optional dotodo)
"Show a time-sorted view of the entries in the current org file.
Only entries with a time stamp of today or later will be listed. With
\\[universal-argument] prefix, all unfinished TODO items will also be shown,
@@ -3362,7 +3355,6 @@ dates."
(org-compile-prefix-format 'timeline)
(org-set-sorting-strategy 'timeline)
(let* ((dopast t)
- (dotodo include-all)
(doclosed org-agenda-show-log)
(entry (buffer-file-name (or (buffer-base-buffer (current-buffer))
(current-buffer))))
@@ -3381,7 +3373,7 @@ dates."
(setq org-agenda-redo-command
(list 'progn
(list 'org-switch-to-buffer-other-window (current-buffer))
- (list 'org-timeline (list 'quote include-all))))
+ (list 'org-timeline (list 'quote dotodo))))
(if (not dopast)
;; Remove past dates from the list of dates.
(setq day-numbers (delq nil (mapcar (lambda(x)
@@ -3489,7 +3481,7 @@ Custom commands can set this variable in the options section.")
(defvar org-starting-day nil) ; local variable in the agenda buffer
(defvar org-agenda-current-span nil
"The current span used in the agenda view.") ; local variable in the agenda buffer
-(defvar org-include-all-loc nil) ; local variable
+(defvar org-arg-loc nil) ; local variable
(defvar org-agenda-entry-types '(:deadline :scheduled :timestamp :sexp)
"List of types searched for when creating the daily/weekly agenda.
@@ -3525,29 +3517,29 @@ somewhat less efficient) way of determining what is included in
the daily/weekly agenda, see `org-agenda-skip-function'.")
;;;###autoload
-(defun org-agenda-list (&optional include-all start-day span)
+(defun org-agenda-list (&optional arg start-day span)
"Produce a daily/weekly view from all files in variable `org-agenda-files'.
The view will be for the current day or week, but from the overview buffer
you will be able to go to other days/weeks.
With a numeric prefix argument in an interactive call, the agenda will
-span INCLUDE-ALL days. Lisp programs should instead specify SPAN to change
+span ARG days. Lisp programs should instead specify SPAN to change
the number of days. SPAN defaults to `org-agenda-span'.
START-DAY defaults to TODAY, or to the most recent match for the weekday
given in `org-agenda-start-on-weekday'."
(interactive "P")
- (if (and (integerp include-all) (> include-all 0))
- (setq span include-all include-all nil))
+ (if (and (integerp arg) (> arg 0))
+ (setq span arg arg nil))
(setq start-day (or start-day org-agenda-start-day))
(if org-agenda-overriding-arguments
- (setq include-all (car org-agenda-overriding-arguments)
+ (setq arg (car org-agenda-overriding-arguments)
start-day (nth 1 org-agenda-overriding-arguments)
span (nth 2 org-agenda-overriding-arguments)))
(if (stringp start-day)
;; Convert to an absolute day number
(setq start-day (time-to-days (org-read-date nil t start-day))))
- (setq org-agenda-last-arguments (list include-all start-day span))
+ (setq org-agenda-last-arguments (list arg start-day span))
(org-compile-prefix-format 'agenda)
(org-set-sorting-strategy 'agenda)
(let* ((span (org-agenda-ndays-to-span
@@ -3574,7 +3566,7 @@ given in `org-agenda-start-on-weekday'."
s e rtn rtnall file date d start-pos end-pos todayp
clocktable-start clocktable-end filter)
(setq org-agenda-redo-command
- (list 'org-agenda-list (list 'quote include-all) start-day (list 'quote span)))
+ (list 'org-agenda-list (list 'quote arg) start-day (list 'quote span)))
(dotimes (n (1- ndays))
(push (1+ (car day-numbers)) day-numbers))
(setq day-numbers (nreverse day-numbers))
@@ -3582,7 +3574,7 @@ given in `org-agenda-start-on-weekday'."
clocktable-end (1+ (or (org-last day-numbers) 0)))
(org-prepare-agenda "Day/Week")
(org-set-local 'org-starting-day (car day-numbers))
- (org-set-local 'org-include-all-loc include-all)
+ (org-set-local 'org-arg-loc arg)
(org-set-local 'org-agenda-current-span (org-agenda-ndays-to-span span))
(unless org-agenda-compact-blocks
(let* ((d1 (car day-numbers))
[-- Attachment #3: Type: text/plain, Size: 893 bytes --]
>
>> It does:
>>
>> - Clean up the variable name include-all, which is confusing
>> for readers of the code
>> - Make `org-agenda-custom-commands' have a default value,
>> which is a block that does put agenda and TODO list into
>> one view. Note that I have changed the sequence from Peter's
>> proposal, I am putting the agenda first - this makes more sense,
>> I think, and also reduces the likelihood that the cursor will be
>> in the TODO list when you are trying to move through time.
>> - I have *not* changes the problem that trying to change time views
>> in the TODO block will not work - this would have required
>> more coding and would create undefined behavior in some block
>> agendas.
>>
>> HTH, please give me feed back. Bastien, let me know if/when
>> I should push this change.
>
> I'll test it this afternoon.
>
> Best,
>
> --
> Bastien
- Carsten
next prev parent reply other threads:[~2011-08-19 13:12 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-18 13:58 missing todo's in agenda after emacs/org upgrade Peter Frings
2011-08-18 14:45 ` suvayu ali
2011-08-18 16:36 ` peter.frings
2011-08-18 16:44 ` suvayu ali
2011-08-18 17:41 ` peter.frings
2011-08-18 21:01 ` Puneeth Chaganti
2011-08-18 21:16 ` Sebastien Vauban
2011-08-19 9:02 ` peter.frings
2011-08-19 9:59 ` Carsten Dominik
2011-08-19 10:35 ` Peter Frings
2011-08-19 10:42 ` Carsten Dominik
2011-08-19 11:05 ` Carsten Dominik
2011-08-19 11:39 ` peter.frings
2011-08-19 20:30 ` Viktor Rosenfeld
2011-08-19 10:33 ` Carsten Dominik
2011-08-19 13:08 ` Bastien
2011-08-19 13:12 ` Carsten Dominik [this message]
2011-08-19 13:23 ` Bastien
2011-08-19 13:56 ` Carsten Dominik
2011-08-18 21:51 ` suvayu ali
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=1036961E-31E7-42C0-B5B9-1A7D5DD9BDEB@gmail.com \
--to=carsten.dominik@gmail.com \
--cc=bzg@altern.org \
--cc=emacs-orgmode@gnu.org \
--cc=wxhgmqzgwmuf@spammotel.com \
/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).