From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: 16257-done@debbugs.gnu.org
Subject: bug#16257: 24.3.50; calendar-cursor-to-visible-date needs set-window-point
Date: Fri, 03 Jan 2014 17:25:09 -0500 [thread overview]
Message-ID: <jwvwqigr9su.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <m2ppokcpyu.wl%esq@lawlist.com> (Keith David Bershatsky's message of "Wed, 25 Dec 2013 18:20:57 -0800")
tags 16257 notabug
thanks
> Here is the thread on stackoverflow that provides a working example of
> the problem, and a working solution:
> http://stackoverflow.com/questions/20776564/how-to-use-calendar-cursor-to-visible-date-without-switching-to-calendar
The question is not clear. E.g.:
"I would like the function to work without actually switching to the
calendar window -- i.e., it should work even when the buffer is buried."
While we clearly can't select the calendar window if the calendar is
not displayed, I don't see why that would make it undesirable to
temporarily select that window when it does exist. E.g.
(with-selected-window (or (get-buffer-window (current-buffer) 0)
(selected-window))
(calendar-cursor-to-visible-date date))
Of course, if there are various windows displaying that buffer, things
are more interesting.
> Without adding `set-window-point` to the function
> `calendar-cursor-to-visible-date`, functions like
> `with-current-buffer` and `set-buffer` do not work properly.
Those work just fine (although they don't quite do what you think they do).
> From another window, it should be possible to use
> `calendar-cursor-to-visible-date` without actually switching to that
> "*Calendar*" buffer.
Here I lost you again. calendar-cursor-to-visible-date works inside the
calendar buffer, so you can't use it without switching to the
*Calendar* buffer. But that's unrelated to whether or not you select
the corresponding window (if any).
Stefan
prev parent reply other threads:[~2014-01-03 22:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-26 2:20 bug#16257: 24.3.50; calendar-cursor-to-visible-date needs set-window-point Keith David Bershatsky
2014-01-03 22:25 ` Stefan Monnier [this message]
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=jwvwqigr9su.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=16257-done@debbugs.gnu.org \
--cc=esq@lawlist.com \
/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.