* jump to iso-week in agenda
@ 2008-03-15 16:00 Thomas Baumann
2008-03-17 13:33 ` Detlef Steuer
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Thomas Baumann @ 2008-03-15 16:00 UTC (permalink / raw)
To: emacs-orgmode
Hi,
I really like the most advanced (pure magic working ...) and easy way of
entering dates in org mode. When answering a phone call it's only a few
keystrokes to jump to the date and settle the appointment. However there
are some people thinking in weeks (iso-week). So when those friends call
it get's much more complicated. Currently when I would like to jump to
say week 46, I might find an old paper calendar or M-x
calendar-goto-iso-week.
How difficult would it be to
(a) add the current iso-week into the headline of the Week-View
(b) include magic jump to a certain week eg. *46 to jump to week 46
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-15 16:00 jump to iso-week in agenda Thomas Baumann
@ 2008-03-17 13:33 ` Detlef Steuer
2008-03-19 12:23 ` Manish
2008-03-17 18:49 ` Carsten Dominik
2008-03-20 7:50 ` Carsten Dominik
2 siblings, 1 reply; 9+ messages in thread
From: Detlef Steuer @ 2008-03-17 13:33 UTC (permalink / raw)
To: emacs-orgmode
On Sat, 15 Mar 2008 17:00:46 +0100
Thomas Baumann <dtbaumann@yahoo.de> wrote:
> Hi,
>
> I really like the most advanced (pure magic working ...) and easy way of
> entering dates in org mode. When answering a phone call it's only a few
> keystrokes to jump to the date and settle the appointment. However there
> are some people thinking in weeks (iso-week). So when those friends call
> it get's much more complicated. Currently when I would like to jump to
> say week 46, I might find an old paper calendar or M-x
> calendar-goto-iso-week.
>
> How difficult would it be to
> (a) add the current iso-week into the headline of the Week-View
> (b) include magic jump to a certain week eg. *46 to jump to week 46
Here's another user, who begs for iso-week-display and iso-week-jumps.
Woud be a nice addition.
Detlef
>
> Thomas
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-15 16:00 jump to iso-week in agenda Thomas Baumann
2008-03-17 13:33 ` Detlef Steuer
@ 2008-03-17 18:49 ` Carsten Dominik
2008-03-20 7:50 ` Carsten Dominik
2 siblings, 0 replies; 9+ messages in thread
From: Carsten Dominik @ 2008-03-17 18:49 UTC (permalink / raw)
To: Thomas Baumann; +Cc: emacs-orgmode
OK, I will put that in.
- Carsten
On Mar 15, 2008, at 5:00 PM, Thomas Baumann wrote:
> Hi,
>
> I really like the most advanced (pure magic working ...) and easy
> way of
> entering dates in org mode. When answering a phone call it's only a
> few
> keystrokes to jump to the date and settle the appointment. However
> there
> are some people thinking in weeks (iso-week). So when those friends
> call
> it get's much more complicated. Currently when I would like to jump to
> say week 46, I might find an old paper calendar or M-x
> calendar-goto-iso-week.
>
> How difficult would it be to
> (a) add the current iso-week into the headline of the Week-View
> (b) include magic jump to a certain week eg. *46 to jump to week 46
>
> Thomas
>
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: jump to iso-week in agenda
2008-03-17 13:33 ` Detlef Steuer
@ 2008-03-19 12:23 ` Manish
0 siblings, 0 replies; 9+ messages in thread
From: Manish @ 2008-03-19 12:23 UTC (permalink / raw)
To: Detlef Steuer; +Cc: emacs-orgmode
> Here's another user, who begs for iso-week-display and iso-week-jumps.
> Woud be a nice addition.
+1. Please.
-- Manish
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-15 16:00 jump to iso-week in agenda Thomas Baumann
2008-03-17 13:33 ` Detlef Steuer
2008-03-17 18:49 ` Carsten Dominik
@ 2008-03-20 7:50 ` Carsten Dominik
2008-03-20 8:55 ` Thomas Baumann
2 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2008-03-20 7:50 UTC (permalink / raw)
To: Thomas Baumann; +Cc: emacs-orgmode
On Mar 15, 2008, at 5:00 PM, Thomas Baumann wrote:
> Hi,
>
> I really like the most advanced (pure magic working ...) and easy
> way of
> entering dates in org mode. When answering a phone call it's only a
> few
> keystrokes to jump to the date and settle the appointment. However
> there
> are some people thinking in weeks (iso-week). So when those friends
> call
> it get's much more complicated. Currently when I would like to jump to
> say week 46, I might find an old paper calendar or M-x
> calendar-goto-iso-week.
>
> How difficult would it be to
> (a) add the current iso-week into the headline of the Week-View
That does not work, because the week view may or may not start
on a Monday, so it may contain days from two different weeks.
For now I am adding the ISO week number to every date in the
agenda, if this seems too cluttered we need to think of a
different solution.
> (b) include magic jump to a certain week eg. *46 to jump to week 46
I have just pushed the necessary changes into the git repo. Here is the
user interface:
Suport for ISO week dates (ISO 8601)
------------------------------------
Dates in the agenda now show the ISO week and day
specification, in the form `W08 2', meaning Tuesday of
week 2.
The keys `d', `w', `m', and `y' in the agenda view now accept
prefix arguments. Remember that in the agenda, you can
directly type a prefix argument by typing a number, no need
to press `C-u' first. The prefix argument may be used to
jump directly to a specific day of the year, ISO week, month,
or year, respectively. For example, `32 d' jumps to February
1st, `9 w' to ISO week number 9. When setting day, week, or
month view, a year may be encoded in the prefix argument as
well. For example, `200712 w' will jump to week 12 in
2007. If such a year specification has only one or two
digits, it will be mapped to the interval 1938-2037.
When entering a date at the date prompt, you may now also
specify an ISO week. For example
w4 Monday of week 4
fri w4 Friday of week 4
w4-5 Same as above
2012 w4 fri Friday of week 4 in 2012.
2012-W04-5 Same as above
So far I have not activated the effect of
`org-read-date-prefer-future' on this functionality, because
it seemed too unpredictable for me (as I usually do not know
which week I am in). I'd appreciate comments on this
issue: Should `org-read-date-prefer-future' also push dates
into the next year if the week you are entering has already
passed in the current year? For consistency I guess this
should be the case, but I cannot quite wrap my head around
it.
I hope but am not entirely convinced that this will behave
sanely also during the first/last week of a year. Please
test extensively and report back.
Enjoy!
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-20 7:50 ` Carsten Dominik
@ 2008-03-20 8:55 ` Thomas Baumann
2008-03-20 9:09 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Baumann @ 2008-03-20 8:55 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Thomas Baumann, emacs-orgmode
Hi Carsten,
thanks you so much for adding the week features, which sometimes are
necessary even inside universities :-)
> > How difficult would it be to
> > (a) add the current iso-week into the headline of the Week-View
>
> That does not work, because the week view may or may not start
> on a Monday, so it may contain days from two different weeks.
> For now I am adding the ISO week number to every date in the
> agenda, if this seems too cluttered we need to think of a
> different solution.
Hmmh, the view get a little busy, and I don't know about performance
issues when iso weekdays are calculated for each day (speed is an issue
on my N810). There's a lot of redundant information now.
Donnerstag 6 Dezember 2007 W49 4
Freitag 7 Dezember 2007 W49 5
BTW: (format "%-9s %2d %s %4d %s"
dayname day monthname year weekstring)))
doesn't work as expected for German locale
What about
Week-agenda (W01-02):
if the view does not start on weekday one. Similarly the day/month view
could show:
Day-Agenda (W01):
Month-agenda (W01-05):
I don't think we need weeks for the year view :-)
> I have just pushed the necessary changes into the git repo. Here is the
> user interface:
>
There seem's to be a problem with '.':
Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (sd span n) "Compute starting date and number of days for agenda.
SPAN may be `day', `week', `month', `year'. The return value
is a cons cell with the starting date and the number of days,
so that the date SD will be in that range." (let* ((greg (calendar-gregorian-from-absolute sd)) (dg (nth 1 greg)) (mg (car greg)) (yg (nth 2 greg)) nd w1 y1 m1 thisweek) (cond ((eq span (quote day)) (when n (setq sd (+ (calendar-absolute-from-gregorian (list mg 1 yg)) n -1))) (setq nd 1)) ((eq span (quote week)) (let* ((nt (calendar-day-of-week (calendar-gregorian-from-absolute sd))) (d (if org-agenda-start-on-weekday (- nt org-agenda-start-on-weekday) 0))) (setq sd (- sd (+ (if (< d 0) 7 0) d))) (when n (require (quote cal-iso)) (setq thisweek (car (calendar-iso-from-absolute sd))) (when (> n 99) (setq y1 (org-small-year-to-year (/ n 100)) n (mod n 100))) (setq sd (calendar-absolute-from-iso (list n 1 (or y1 (nth 2 (calendar-iso-from-absolute sd))))))) (setq nd 7))) ((eq span (quote month
)) (when (and n (> n 99)) (setq y1 (org-small-year-to-year (/ n 100)) n (mod n 100))) (setq sd (calendar-absolute-from-gregorian (list (or n mg) 1 (or y1 yg))) nd (- (calendar-absolute-from-
gregorian (list (1+ (or n mg)) 1 (or y1 yg))) sd))) ((eq span (quote year)) (setq sd (calendar-absolute-from-gregorian (list 1 1 (or n yg))) nd (- (calendar-absolute-from-gregorian (list 1 1 (1+ (or n yg)))) sd)))) (cons sd nd))) 2)
org-agenda-compute-time-span(733121 day)
(let* ((sd ...) (comp ...) (org-agenda-overriding-arguments org-agenda-last-arguments)) (setf (nth 1 org-agenda-overriding-arguments) (car comp)) (setf (nth 2 org-agenda-overriding-arguments) (cdr comp)) (org-agenda-redo) (org-agenda-find-same-or-today-or-agenda))
(cond (tdpos (goto-char tdpos)) ((eq org-agenda-type ...) (let* ... ... ... ... ...)) (t (error "Cannot find today")))
(let ((tdpos ...)) (cond (tdpos ...) (... ...) (t ...)))
org-agenda-goto-today()
call-interactively(org-agenda-goto-today nil nil)
And there's a general problem with emacs23 (which seems to be rather
unstable at the moment): Due to some changes in calendar,
calendar-absolute-from-iso is _not_ autoloaded. (require 'cal-iso) does
the trick.
> Enjoy!
Definitely, thanks again
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-20 8:55 ` Thomas Baumann
@ 2008-03-20 9:09 ` Carsten Dominik
2008-03-20 10:36 ` Thomas Baumann
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2008-03-20 9:09 UTC (permalink / raw)
To: dtbaumann; +Cc: emacs-orgmode
Hi Thomas,
On Mar 20, 2008, at 9:55 AM, Thomas Baumann wrote:
>
> Hmmh, the view get a little busy, and I don't know about performance
> issues when iso weekdays are calculated for each day (speed is an
> issue
> on my N810). There's a lot of redundant information now.
Performance is not an issue, certainly not in comparison with the other
stuff that is going on to compute the agenda.
Yes, it is a bit crowded. I'll try to shift this to the heading.
The alternative would be to list the week number only on Mondays.
>
> BTW: (format "%-9s %2d %s %4d %s"
> dayname day monthname year weekstring)))
>
>
> doesn't work as expected for German locale
In what way does it not work?
>
>> I have just pushed the necessary changes into the git repo. Here
>> is the
>> user interface:
>>
>
> There seem's to be a problem with '.':
Fixed, thanks.
>
>
> And there's a general problem with emacs23 (which seems to be rather
> unstable at the moment): Due to some changes in calendar,
> calendar-absolute-from-iso is _not_ autoloaded. (require 'cal-iso)
> does
> the trick.
I think I have fixed this as well, please try again.
Thanks for the quick feedback.
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-20 9:09 ` Carsten Dominik
@ 2008-03-20 10:36 ` Thomas Baumann
2008-03-20 13:21 ` Carsten Dominik
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Baumann @ 2008-03-20 10:36 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Hi Carsten,
the view is much clearer now, thanks. Personally, I don't need the Week
on Mondays but this is a matter of taste (or customize).
> Performance is not an issue, certainly not in comparison with the other
> stuff that is going on to compute the agenda.
Yes, I already moved most old stuff to archives which are included only
on my desktop.
> > BTW: (format "%-9s %2d %s %4d %s"
> > dayname day monthname year weekstring)))
> >
> >
> > doesn't work as expected for German locale
>
>
> In what way does it not work?
just an cosmetic issue, "Donnerstag" has 10 letters and does not fit
into "%-9s".
Ciao
Thomas
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: jump to iso-week in agenda
2008-03-20 10:36 ` Thomas Baumann
@ 2008-03-20 13:21 ` Carsten Dominik
0 siblings, 0 replies; 9+ messages in thread
From: Carsten Dominik @ 2008-03-20 13:21 UTC (permalink / raw)
To: dtbaumann; +Cc: emacs-orgmode
On Mar 20, 2008, at 11:36 AM, Thomas Baumann wrote:
> Hi Carsten,
>
> the view is much clearer now, thanks. Personally, I don't need the
> Week
> on Mondays but this is a matter of taste (or customize).
>
>> Performance is not an issue, certainly not in comparison with the
>> other
>> stuff that is going on to compute the agenda.
>
> Yes, I already moved most old stuff to archives which are included
> only
> on my desktop.
>
>>> BTW: (format "%-9s %2d %s %4d %s"
>>> dayname day monthname year weekstring)))
>>>
>>>
>>> doesn't work as expected for German locale
>>
>>
>> In what way does it not work?
>
> just an cosmetic issue, "Donnerstag" has 10 letters and does not fit
> into "%-9s".
Ah. Hmmmmm. I hate locale stuf :-)
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-03-20 13:21 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-15 16:00 jump to iso-week in agenda Thomas Baumann
2008-03-17 13:33 ` Detlef Steuer
2008-03-19 12:23 ` Manish
2008-03-17 18:49 ` Carsten Dominik
2008-03-20 7:50 ` Carsten Dominik
2008-03-20 8:55 ` Thomas Baumann
2008-03-20 9:09 ` Carsten Dominik
2008-03-20 10:36 ` Thomas Baumann
2008-03-20 13:21 ` Carsten Dominik
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.