Hello, Here's a patch to allow for a different prefix for deadline entries which are in the past: for example, "3 d ago" instead of "In -3 d"... Example: --8<---------------cut here---------------start------------->8--- Day-agenda (W06): 2013-02-04 Mon __________________________________________________ 8:00...... 10:00...... 12:00...... 14:00...... 16:00...... 20:00...... 22:42...... now In 9 d.: TODO [#A] Do this 39 d. ago: STRT Should have done this for long already --8<---------------cut here---------------end--------------->8--- Best regards, Seb From 1eaf4433dd8800126dce4209045bb524553aae2a Mon Sep 17 00:00:00 2001 From: Sebastien Vauban <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> Date: Mon, 4 Feb 2013 22:49:47 +0100 Subject: [PATCH 2/2] Add a 3rd string for past deadlines * org-agenda.el (org-agenda-get-deadlines): Add a 3rd string as the preceding text when the deadline is already in the past. --- lisp/org-agenda.el | 33 +++++++++++++++++++++------------ 1 files changed, 21 insertions(+), 12 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index 355a477..dd320c3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -1626,12 +1626,13 @@ These entries are added to the agenda when pressing \"[\"." (string :tag "Scheduled today ") (string :tag "Scheduled previously"))) -(defcustom org-agenda-deadline-leaders '("Deadline: " "In %3d d.: ") +(defcustom org-agenda-deadline-leaders '("Deadline: " "In %3d d.: " + "%-2d d. ago:") "Text preceding deadline items in the agenda view. -This is a list with two strings. The first applies when the item has its -deadline on the current day. The second applies when it is in the past or -in the future, it may contain %d to capture how many days away the deadline -is (was)." +This is a list with three strings. The first applies when the item has its +deadline on the current day. The second and third apply when it is in the +future or in the past, it may contain %d to capture how many days away the +deadline is (was)." :group 'org-agenda-line-format :type '(list (string :tag "Deadline today ") @@ -6046,13 +6047,21 @@ See also the user option `org-agenda-clock-consistency-checks'." (setq txt (org-agenda-format-item (if (= diff 0) (car org-agenda-deadline-leaders) - (if (functionp - (nth 1 org-agenda-deadline-leaders)) - (funcall - (nth 1 org-agenda-deadline-leaders) - diff date) - (format (nth 1 org-agenda-deadline-leaders) - diff))) + (if (> diff 0) + (if (functionp + (nth 1 org-agenda-deadline-leaders)) + (funcall + (nth 1 org-agenda-deadline-leaders) + diff date) + (format (nth 1 org-agenda-deadline-leaders) + diff)) + (if (functionp + (nth 2 org-agenda-deadline-leaders)) + (funcall + (nth 2 org-agenda-deadline-leaders) + (abs diff) date) + (format (nth 2 org-agenda-deadline-leaders) + (abs diff))))) head level category tags (if (not (= diff 0)) nil timestr))))) (when txt -- 1.7.9 -- Sebastien Vauban
Hi Sébastien,
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> Here's a patch to allow for a different prefix for deadline entries which are
> in the past: for example, "3 d ago" instead of "In -3 d"...
Please make sure the change is backward compatible so that users don't
have to change the value of their `org-agenda-deadline-leaders'
(i.e. simply fall back on (nth 1 ...) when (nth 2 ...) returns nil.
Thanks,
--
Bastien
Hi Sébastien, Bastien <bzg@altern.org> writes: >> Here's a patch to allow for a different prefix for deadline entries which are >> in the past: for example, "3 d ago" instead of "In -3 d"... > > Please make sure the change is backward compatible so that users don't > have to change the value of their `org-agenda-deadline-leaders' > (i.e. simply fall back on (nth 1 ...) when (nth 2 ...) returns nil. I finally added this, with a slightly different patch: http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=c8c991e Thanks for the suggestion, -- Bastien
Hi Bastien, Bastien wrote: > Hi Sébastien, > > Bastien <bzg-whniv8GeeGkdnm+yROfE0A@public.gmane.org> writes: > >>> Here's a patch to allow for a different prefix for deadline entries which are >>> in the past: for example, "3 d ago" instead of "In -3 d"... >> >> Please make sure the change is backward compatible so that users don't >> have to change the value of their `org-agenda-deadline-leaders' >> (i.e. simply fall back on (nth 1 ...) when (nth 2 ...) returns nil. > > I finally added this, with a slightly different patch: > http://orgmode.org/cgit.cgi/org-mode.git/commit/?id=c8c991e Nice... Though, one question: why did you change the spacing (and, in fact, the width) of the leaders? --8<---------------cut here---------------start------------->8--- -(defcustom org-agenda-scheduled-leaders '("Scheduled: " "Sched.%2dx: ") +(defcustom org-agenda-scheduled-leaders '(" Scheduled: " "Sched.%3dx: ") "Text preceding scheduled items in the agenda view. (...) -(defcustom org-agenda-deadline-leaders '("Deadline: " "In %3d d.: ") +(defcustom org-agenda-deadline-leaders '(" Deadline: " " In %3d d.: " "%3d d. ago: ") --8<---------------cut here---------------end--------------->8--- > Thanks for the suggestion, Thanks as well ;-) Best regards, Seb PS- Another question: some time ago, there was a ML with all the commits done on Org. This seems to have disappeared (at least from Gmane). A reason for that, or an alternative? -- Sebastien Vauban
Hi Sébastien,
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> Though, one question: why did you change the spacing (and, in fact, the width)
> of the leaders?
>
> -(defcustom org-agenda-scheduled-leaders '("Scheduled: " "Sched.%2dx: ")
> +(defcustom org-agenda-scheduled-leaders '(" Scheduled: " "Sched.%3dx: ")
> "Text preceding scheduled items in the agenda view.
>
> (...)
>
> -(defcustom org-agenda-deadline-leaders '("Deadline: " "In %3d d.: ")
> +(defcustom org-agenda-deadline-leaders '(" Deadline: " " In %3d d.: " "%3d d. ago: ")
For the change in "Scheduled:" and "Deadline:" it's because I
think it's cleaner to align them on the right, like the "Sched."
and "In %3d.:" strings.
For the change in the width (from 11 to 12), it's because I
wanted to correctly display "%3d d. ago: ", not %2d d. ago: ",
so that now any string with a warning delay more than 100 will
be correctly displayed. Before, we allowed 100+ days for the
future deadlines, but not for past scheduled items (i.e. they
were not aligned properly.)
I feel the change is not too intrusive.
Best,
--
Bastien
Hi Sébastien, "Sebastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > PS- Another question: some time ago, there was a ML with all the commits done > on Org. This seems to have disappeared (at least from Gmane). A reason for > that, or an alternative? I can't remember of such a mailing list. You can subscribe to the RSS feed from http://orgmode.org/cgit.cgi/org-mode.git/ And to the dedicated newsgroup on gwene.org: gwene.org.org-mode.git -- Bastien
Bastien, Bastien wrote: > "Sebastien Vauban" writes: > >> Though, one question: why did you change the spacing (and, in fact, the width) >> of the leaders? >> >> -(defcustom org-agenda-scheduled-leaders '("Scheduled: " "Sched.%2dx: ") >> +(defcustom org-agenda-scheduled-leaders '(" Scheduled: " "Sched.%3dx: ") >> "Text preceding scheduled items in the agenda view. >> >> (...) >> >> -(defcustom org-agenda-deadline-leaders '("Deadline: " "In %3d d.: ") >> +(defcustom org-agenda-deadline-leaders '(" Deadline: " " In %3d d.: " "%3d d. ago: ") > > For the change in "Scheduled:" and "Deadline:" it's because I think it's > cleaner to align them on the right, like the "Sched." and "In %3d.:" > strings. I don't mind, I customize them anyway ;-) > For the change in the width (from 11 to 12), it's because I wanted to > correctly display "%3d d. ago: ", not %2d d. ago: ", so that now any string > with a warning delay more than 100 will be correctly displayed. Before, we > allowed 100+ days for the future deadlines, but not for past scheduled items > (i.e. they were not aligned properly.) > > I feel the change is not too intrusive. I think the change of width can impact people who customize a bit the look of their agenda, and rely upong *all* the leaders to be of width 11. That was the motivation for my other patch, about clocking info (to make it go into a 11-char slot). Let's see how people react to that -- or if some are impacted. Best regards, Seb -- Sebastien Vauban
Hi Sébastien,
"Sebastien Vauban"
<wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes:
> I think the change of width can impact people who customize a bit the look of
> their agenda, and rely upong *all* the leaders to be of width 11. That was the
> motivation for my other patch, about clocking info (to make it go into a
> 11-char slot).
The thread about your other patch is still open, see my last reply.
Also, a width of 12 should make it easier to fix alignment issues,
so feel free to have a go and fix the ones that disturb you. Please
remember not every user has a 3k configuration file, so implementing
TRT with emacs -Q is highly recommended here :)
--
Bastien
Bastien,
Bastien wrote:
> Sebastien Vauban writes:
>
>> PS- Another question: some time ago, there was a ML with all the commits done
>> on Org. This seems to have disappeared (at least from Gmane). A reason for
>> that, or an alternative?
>
> I can't remember of such a mailing list.
>
> You can subscribe to the RSS feed from
> http://orgmode.org/cgit.cgi/org-mode.git/
>
> And to the dedicated newsgroup on gwene.org:
> gwene.org.org-mode.git
That must be it: `org-mode.git', which I accessed from Gmane. Thanks.
It seems there are now 2 redundants such groups:
- nntp+gmane:gwene.cz.or.repo.w.org-mode.git
- nntp+gmane:gwene.org.org-mode.git
Best regards,
Seb
--
Sebastien Vauban
Hi Bastien,
Bastien <bzg@altern.org> writes:
[ ... ]
>
> You can subscribe to the RSS feed from
> http://orgmode.org/cgit.cgi/org-mode.git/
Sorry for hijacking this thread, and sorry for my ignorance. But where
can I find this RSS feed?
[ ... ]
Regards,
Andreas
Andreas,
Andreas Leha wrote:
> Bastien <bzg-whniv8GeeGkdnm+yROfE0A@public.gmane.org> writes:
>> You can subscribe to the RSS feed from
>> http://orgmode.org/cgit.cgi/org-mode.git/
>
> Sorry for hijacking this thread, and sorry for my ignorance. But where
> can I find this RSS feed?
You can find the group on Gmane (available, then, by NNTP at least).
Best regards,
Seb
--
Sebastien Vauban
Bastien <bzg@altern.org> writes: > "Sebastien Vauban" > <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org> writes: > >> I think the change of width can impact people who customize a bit the look of >> their agenda, and rely upong *all* the leaders to be of width 11. That was the >> motivation for my other patch, about clocking info (to make it go into a >> 11-char slot). > > The thread about your other patch is still open, see my last reply. > > Also, a width of 12 should make it easier to fix alignment issues, > so feel free to have a go and fix the ones that disturb you. Please > remember not every user has a 3k configuration file, so implementing > TRT with emacs -Q is highly recommended here :) I just upgraded org-mode for the first time in a while and found these new default settings for deadline and scheduled leaders somewhat disorienting. A 12-char width causes misalignment with a sample file and emacs -Q. (See output below). Here is an example of the new default behavior with emacs -Q --8<---------------cut here---------------start------------->8--- Day-agenda (W12): Sunday 24 March 2013 8:00...... ---------------- test: 10:00...... Scheduled: TODO Scheduled at a time test: 10:00...... An appointment 10:00...... ---------------- 12:00...... ---------------- 14:00...... ---------------- 16:00...... ---------------- 16:59...... now - - - - - - - - - - - - - - - - - - - - - - - - - 18:00...... ---------------- 20:00...... ---------------- test: Sched. 3x: TODO A scheduled item test: Scheduled: TODO Another scheduled item test: 3 d. ago: TODO An overdue item test: In 2 d.: Deadline ^ Note the extra space here --8<---------------cut here---------------end--------------->8--- And here is an example of the old default behavior (11 char. spacing): --8<---------------cut here---------------start------------->8--- Day-agenda (W12): Sunday 24 March 2013 8:00...... ---------------- test: 10:00...... Scheduled: TODO Scheduled at a time test: 10:00...... An appointment 10:00...... ---------------- 12:00...... ---------------- 14:00...... ---------------- 16:00...... ---------------- 17:06...... now - - - - - - - - - - - - - - - - - - - - - - - - - 18:00...... ---------------- 20:00...... ---------------- test: Sched. 3x: TODO A scheduled item test: Scheduled: TODO Another scheduled item test: In -3 d.: TODO An overdue item test: In 2 d.: Deadline --8<---------------cut here---------------end--------------->8--- > For the change in "Scheduled:" and "Deadline:" it's because I think > it's cleaner to align them on the right, like the "Sched." and "In > %3d.:" strings. FWIW, I find the old default much cleaner and easier to scan visually. I know this can be customized, but might I suggest that we revert the default to 11-characters and left aligned text? Best, Matt P.S. Thanks, as always, Bastien for all the amazing work you've been doing as maintainer!
Hi Matt,
Matt Lundin <mdl@imapmail.org> writes:
> A 12-char width causes misalignment with a sample file and emacs -Q.
> (See output below).
Indeed -- I fixed this, we're back to 11 chars.
Thanks for reporting this and great to have you back :)
--
Bastien