From: Thomas Baumann <dtbaumann@yahoo.de>
To: Carsten Dominik <dominik@science.uva.nl>
Cc: Thomas Baumann <dtbaumann@yahoo.de>, emacs-orgmode@gnu.org
Subject: Re: jump to iso-week in agenda
Date: Thu, 20 Mar 2008 09:55:42 +0100 [thread overview]
Message-ID: <26699.1206003342@norvel.baumann-gauting.site> (raw)
In-Reply-To: <A07538F6-A066-41D5-BC89-EC3B5C7C326A@science.uva.nl>
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
next prev parent reply other threads:[~2008-03-20 8:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2008-03-20 9:09 ` Carsten Dominik
2008-03-20 10:36 ` Thomas Baumann
2008-03-20 13:21 ` Carsten Dominik
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=26699.1206003342@norvel.baumann-gauting.site \
--to=dtbaumann@yahoo.de \
--cc=dominik@science.uva.nl \
--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).