From: Ed Reingold <reingold@emr.cs.iit.edu>
Cc: Emilio Lopes <eclig@gmx.net>, emacs-devel@gnu.org
Subject: Re: calendar-goto-iso-week
Date: Sun, 05 Sep 2004 14:15:23 -0500 [thread overview]
Message-ID: <200409051915.i85JFNLL025425@emr.cs.iit.edu> (raw)
In-Reply-To: "Your message of Sat, 04 Sep 2004 18:39:42 +0200." <87wtzaugxd.fsf@deepthought.outer.space.org>
I would add the following to cal-iso.el; this requires the user to hit return
after the year, but allows movement more generally to other years:
(defun calendar-goto-iso-week (week year &optional noecho)
"Move cursor to start of ISO WEEK in YEAR; echo ISO date unless NOECHO is t."
(interactive
(let* ((today (calendar-current-date))
(year (calendar-read
"ISO calendar year (>0): "
'(lambda (x) (> x 0))
(int-to-string (extract-calendar-year today))))
(no-weeks (extract-calendar-month
(calendar-iso-from-absolute
(1-
(calendar-dayname-on-or-before
1 (calendar-absolute-from-gregorian
(list 1 4 (1+ year))))))))
(week (calendar-read
(format "ISO calendar week (1-%d): " no-weeks)
'(lambda (x) (and (> x 0) (<= x no-weeks))))))
(list week year)))
(calendar-goto-date (calendar-gregorian-from-absolute
(calendar-absolute-from-iso (list week 1 year))))
(or noecho (calendar-print-iso-date)))
And the following the appropriate places in calendar.el:
(autoload 'calendar-goto-iso-week "cal-iso"
"Move cursor to start of ISO WEEK in YEAR."
t)
(define-key calendar-mode-map "gw" 'calendar-goto-iso-week)
next prev parent reply other threads:[~2004-09-05 19:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <r3hdqmqa48.fsf@tiscali.de>
[not found] ` <87656xepjz.fsf@deepthought.outer.space.org>
[not found] ` <413646C5.4030607@yahoo.com>
[not found] ` <87656wbm9z.fsf@deepthought.outer.space.org>
2004-09-02 19:33 ` calendar-goto-iso-week Emilio Lopes
2004-09-02 23:31 ` calendar-goto-iso-week Kevin Rodgers
2004-09-04 3:29 ` calendar-goto-iso-week Richard Stallman
2004-09-04 16:39 ` calendar-goto-iso-week Detlev Zundel
2004-09-05 19:15 ` Ed Reingold [this message]
2004-09-11 9:43 ` calendar-goto-iso-week Emilio Lopes
2004-09-12 1:16 ` calendar-goto-iso-week Ed Reingold
2004-09-12 12:38 ` calendar-goto-iso-week Emilio Lopes
2004-09-12 20:06 ` calendar-goto-iso-week Ed Reingold
2004-09-13 19:50 ` calendar-goto-iso-week Emilio Lopes
2004-09-13 19:58 ` calendar-goto-iso-week Ed Reingold
2004-09-04 20:19 ` calendar-goto-iso-week Emilio Lopes
2004-09-18 21:09 Patches to calendar Emilio Lopes
2004-09-20 0:05 ` Richard Stallman
2004-09-20 20:57 ` Emilio Lopes
2004-09-20 20:57 ` Emilio Lopes
2004-09-22 7:11 ` Richard Stallman
2004-09-22 19:25 ` Emilio Lopes
2004-09-20 22:20 ` Glenn Morris
2004-09-20 22:34 ` Miles Bader
2004-09-20 22:52 ` Glenn Morris
2004-09-20 23:05 ` Miles Bader
2004-09-21 11:35 ` Emilio C. Lopes
2004-09-21 14:10 ` Ed Reingold
2004-09-28 17:48 ` Glenn Morris
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409051915.i85JFNLL025425@emr.cs.iit.edu \
--to=reingold@emr.cs.iit.edu \
--cc=eclig@gmx.net \
--cc=emacs-devel@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 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.