all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emilio Lopes <eclig@gmx.net>
Cc: Glenn Morris <gmorris@ast.cam.ac.uk>,
	Ed Reingold <reingold@emr.cs.iit.edu>,
	emacs-devel@gnu.org
Subject: Re: calendar-goto-iso-week
Date: Sat, 04 Sep 2004 22:19:51 +0200	[thread overview]
Message-ID: <miisat7pnc.fsf@tiscali.de> (raw)
In-Reply-To: <E1C3RFG-0005vH-1z@fencepost.gnu.org> (Richard Stallman's message of "Fri, 03 Sep 2004 23:29:42 -0400")

Richard Stallman writes:

>     It is somewhat unfortunate that one can't find
>     `calendar-goto-iso-date' using an apropos search with
>     "calendar.*week", but I can't suggest a better name
>     either.

> We could add an alias or trivial interface function named
> calendar-goto-week if that will be useful.

Indeed the function I wrote is just a simple wrapper around
`calendar-goto-iso-date', but I had to copy most of code
from its `interactive' declaration.

(defun calendar-goto-iso-week (week year)
  "Move cursor to ISO week number WEEK of year YEAR.
Interactively uses the \"current\" year and just asks for a week number."
  (interactive
   (progn 
     (require 'cal-iso)
     (let* ((year (extract-calendar-year (calendar-cursor-to-date t)))
            (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-iso-date (list week calendar-week-start-day year)))

  parent reply	other threads:[~2004-09-04 20:19 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             ` calendar-goto-iso-week Ed Reingold
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           ` Emilio Lopes [this message]
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=miisat7pnc.fsf@tiscali.de \
    --to=eclig@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=gmorris@ast.cam.ac.uk \
    --cc=reingold@emr.cs.iit.edu \
    /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.