GNU bug report logs -
#2199
23.0.60; calendar marks and font-lock-mode
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 2199 in the body.
You can then email your comments to 2199 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>
:
bug#2199
; Package
emacs
.
(Wed, 04 Feb 2009 17:10:05 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
New bug report received and forwarded. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>
.
(Wed, 04 Feb 2009 17:10:05 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
In GNU Emacs 23.0.60.31 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
of 2009-01-31 on escher
Let ~/.emacs consist of the following three sexps:
(add-hook 'calendar-today-visible-hook 'calendar-mark-today)
(setq calendar-mark-diary-entries-flag t)
(setq calendar-mark-holidays-flag t)
(i) Start Emacs by invoking `emacs', then type `M-x calendar'.
=> In the Calendar, today's date is marked with `=', diary entries are
marked with `+' and holidays are marked with `*'.
(ii) Start Emacs by invoking `emacs', type `q' to quit the splash
screen, then type `M-x calendar'.
=> In the Calendar, today's date is marked with the face calendar-today,
diary entries are marked with the face diary and holidays are marked
with the face holiday.
The difference between (i) and (ii) is that the splash screen is in
Fundamental mode and in this mode font-lock-mode is nil, which makes the
calendar marks use string displays rather than faces, due, I believe, to
this change:
2008-04-02 Glenn Morris <rgm <at> gnu.org>
* calendar/calendar.el (diary-entry-marker, calendar-today-marker)
(calendar-holiday-marker, mark-visible-calendar-date):
* calendar/diary-lib.el (fancy-diary-display):
Check for font-lock-mode before using faces.
This change is justified by the following comment in calendar.el: "These
[defcustoms] don't respect changes in font-lock-mode after loading." So
maybe having to live with (i) is the lesser evil (the faces can (only)
be restored in the same Emacs session by explicitly changing the
variables' values in Custom or with setq).
Steve Berman
bug reassigned from package `emacs' to `emacs,calendar'.
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Thu, 05 Feb 2009 00:00:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Thu, 05 Feb 2009 09:55:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Thu, 05 Feb 2009 09:55:04 GMT)
Full text and
rfc822 format available.
Message #12 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):
The issue seems to be more complicated than I thought. Calendar marks
are displayed with strings instead of faces not only when Calendar is
invoked from a buffer in which font-lock-mode is nil (e.g. in
Fundamental mode), as in my OP, but also in the following case:
Let ~/.emacs consist of the following four sexps:
(add-hook 'today-visible-calendar-hook 'calendar-mark-today)
(setq calendar-mark-diary-entries-flag t)
(setq calendar-mark-holidays-flag t)
(appt-activate 1)
Also, let ~/diary contain entries for today (either date or day).
Now start Emacs like this:
$ emacs --daemon
$ emacsclient -c
The frame that now opens displays the *scratch* buffer only (the diary
is not displayed), in which font-lock-mode is t. Nevertheless, after
`M-x calendar' the Calendar displays string marks rather than faces.
There are two additional oddities:
(i) Typing `q' in the *Calendar* buffer does nothing -- but on the next
keystroke, whatever it is, the *Calendar* buffer does disappear.
(ii) `M-x diary' correctly displays today's diary entries, but the mode
line consists of the string "---Diar---", rather than the expected
"-----------------Diary for Thursday, February 5, 2009-----------------"
Note that if I start Emacs simply by invoking `emacs' (still with the
above ~/.emacs), then everything is as expected: the frame is vertically
split, above the splash screen, below today's diary entries, and `M-x
calendar' displays the Calendar with faces.
Note, too, that if instead of `emacs --daemon' I invoke Emacs with
`emacs -nw -f server-start' (still with the above ~/.emacs), then in the
terminal display the frame is vertically split, above *scratch*, below
today's diary entries, and `M-x calendar' displays the Calendar with
faces (likewise in the X11 frame opened by `emacsclient -c').
Finally, if I comment out "(appt-activate 1)" in the above ~/.emacs,
then start Emacs with `emacs --daemon' and `emacsclient -c', then the
behavior is as in my OP: Calendar marks are displayed with strings
instead of faces only when Calendar is invoked from a buffer in which
font-lock-mode is nil (e.g. in Fundamental mode)
Steve Berman
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Thu, 05 Feb 2009 09:55:06 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Thu, 05 Feb 2009 09:55:06 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Sun, 08 Feb 2009 02:10:04 GMT)
Full text and
rfc822 format available.
Message #20 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
severity 2199 minor
stop
I've taken out the checking of font-lock-mode. The implementation was
broken, since it just depended on which buffer was current when one
loaded calendar.el. And the idea didn't make sense either, since the
relevant features don't use font-lock.
Note that when run from --daemon, (display-color-p) apparently returns
nil (no display at all, I guess). So if you happen to load calendar.el
then, again you won't get faces. Don't know how to fix that, other
than to say customize the markers appropriately if you want to do
that, rather than relying on the defaults.
Stephen Berman wrote:
> There are two additional oddities:
> (i) Typing `q' in the *Calendar* buffer does nothing -- but on the next
> keystroke, whatever it is, the *Calendar* buffer does disappear.
No idea about that. I guess the buffer is not getted buried for some
reason.
> (ii) `M-x diary' correctly displays today's diary entries, but the mode
> line consists of the string "---Diar---", rather than the expected
> "-----------------Diary for Thursday, February 5, 2009-----------------"
Couldn't reproduce that. It tries to fit to the width of the frame, so
I can imagine it getting confused it if somehow tries to run from
--daemon, when there is no frame.
Severity set to `minor' from `normal'
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> emacsbugs.donarmstrong.com
.
(Sun, 08 Feb 2009 02:10:05 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Sun, 08 Feb 2009 20:50:03 GMT)
Full text and
rfc822 format available.
Message #25 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris wrote:
> Note that when run from --daemon, (display-color-p) apparently returns
> nil (no display at all, I guess). So if you happen to load calendar.el
> then, again you won't get faces.
Actually, I'll probably just take that test out too. I don't imagine
B&W displays are too common any more.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Mon, 09 Feb 2009 15:10:03 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Mon, 09 Feb 2009 15:10:04 GMT)
Full text and
rfc822 format available.
Message #30 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
On Sat, 07 Feb 2009 20:58:17 -0500 Glenn Morris <rgm <at> gnu.org> wrote:
> severity 2199 minor
> stop
>
> I've taken out the checking of font-lock-mode. The implementation was
> broken, since it just depended on which buffer was current when one
> loaded calendar.el. And the idea didn't make sense either, since the
> relevant features don't use font-lock.
>
> Note that when run from --daemon, (display-color-p) apparently returns
> nil (no display at all, I guess). So if you happen to load calendar.el
> then, again you won't get faces. Don't know how to fix that, other
> than to say customize the markers appropriately if you want to do
> that, rather than relying on the defaults.
>
>
> Stephen Berman wrote:
>
>> There are two additional oddities:
>> (i) Typing `q' in the *Calendar* buffer does nothing -- but on the next
>> keystroke, whatever it is, the *Calendar* buffer does disappear.
>
> No idea about that. I guess the buffer is not getted buried for some
> reason.
I found out what's happening with `q': when I do `emacsclient -c', the
frame initially shows only the *scratch* buffer. I now type `M-x
calendar', which as usual splits the screen vertically, with the
*Calendar* buffer below and *scratch* above. Now type `M-:
(calendar-window-list)': it returns (something like) "(#<window 8 on
*Calendar*> #<window 4 on diary>)", and indeed `C-x C-b' reveals that
the diary buffer is a live buffer. So when I type `q' in the *Calendar*
buffer, calendar-hide-window is applied to the unseen diary buffer and
to the displayed *Calendar* buffer, which explains my observation. What
remains to be explained, and fixed, is why the diary buffer is not in a
displayed window, although its window is in calendar-window-list. I
think this has to do with --daemon, because when I start Emacs without
--daemon but with the same ~/.emacs, then the diary is initially
displayed below and the splash screen above; but with --daemon neither
of these is displayed upon invoking `emacsclient -c'.
>> (ii) `M-x diary' correctly displays today's diary entries, but the mode
>> line consists of the string "---Diar---", rather than the expected
>> "-----------------Diary for Thursday, February 5, 2009-----------------"
>
> Couldn't reproduce that.
Sorry, I gave the wrong recipe: after invoking `emacsclient -c', just do
`C-x b diary' and you should get the diary buffer with the truncated
mode line.
> It tries to fit to the width of the frame, so
> I can imagine it getting confused it if somehow tries to run from
> --daemon, when there is no frame.
On Sun, 08 Feb 2009 15:44:04 -0500 Glenn Morris <rgm <at> gnu.org> wrote:
> Glenn Morris wrote:
>
>> Note that when run from --daemon, (display-color-p) apparently returns
>> nil (no display at all, I guess). So if you happen to load calendar.el
>> then, again you won't get faces.
>
> Actually, I'll probably just take that test out too. I don't imagine
> B&W displays are too common any more.
Thanks for removing this too. I think your comment in calendar.el on
this point probably has wider application:
;; They also used to check display-color-p, but that is a problem if
;; loaded from --daemon. Since BW displays are rare now, this was
;; also taken out. The way to keep it would be to have nil mean do a
;; runtime check whenever this variable is used.
Cf. also bug#2138 and Dan Nicolaescu's remark:
> Not really, this is not a problem with --daemon, it's a problem in the
> ediff implementation that it evaluates ediff-window-setup-function at
> load time. This is not appropriate anymore now when you can have both
> X11 and tty frames in the same emacs session.
Steve Berman
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Mon, 09 Feb 2009 20:15:03 GMT)
Full text and
rfc822 format available.
Message #33 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stephen Berman wrote:
> What remains to be explained, and fixed, is why the diary buffer
> is not in a displayed window, although its window is in
> calendar-window-list. I think this has to do with --daemon, because
> when I start Emacs without --daemon but with the same ~/.emacs, then
> the diary is initially displayed below and the splash screen above;
> but with --daemon neither of these is displayed upon invoking
> `emacsclient -c'.
With specified .emacs:
emacs --daemon
emacsclient -c
M-x calendar
(let (wlist)
(walk-windows (lambda (w) (push w wlist)) nil t)
wlist)
gives:
(#<window 5 on *scratch*> #<window 4 on diary>
#<window 1 on *GNU Emacs*> #<window 9 on *Calendar*>)
So there's an invisible frame with the splash and diary buffers.
Changing the last argument of walk-windows in calendar-window-list
from t to 0 is probably good enough.
> Sorry, I gave the wrong recipe: after invoking `emacsclient -c', just do
> `C-x b diary' and you should get the diary buffer with the truncated
> mode line.
As expected, window-edges is confused by --daemon:
emacs -Q --daemon --eval "(setq in (window-inside-edges) out (window-edges))"
emacsclient -c
in = (0 1 10 8)
out = (0 1 10 9)
No idea what to do about that.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Mon, 09 Feb 2009 20:25:04 GMT)
Full text and
rfc822 format available.
Message #36 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris wrote (on Mon, 9 Feb 2009 at 15:04 -0500):
> So there's an invisible frame with the splash and diary buffers.
>
> Changing the last argument of walk-windows in calendar-window-list
> from t to 0 is probably good enough.
But that breaks the behaviour if I have multiple frames open on
different workspaces in Window Maker. Only buffers on the current
workspace are buried. So I have no idea what to do about this either.
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Tue, 10 Feb 2009 02:35:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Tue, 10 Feb 2009 02:35:03 GMT)
Full text and
rfc822 format available.
Message #41 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
>> So there's an invisible frame with the splash and diary buffers.
>>
>> Changing the last argument of walk-windows in calendar-window-list
>> from t to 0 is probably good enough.
> But that breaks the behaviour if I have multiple frames open on
> different workspaces in Window Maker. Only buffers on the current
> workspace are buried. So I have no idea what to do about this either.
Not sure I understand what you mean by "different workspaces in Window
Maker"? I'm guessing that these are different X displays, maybe of the
form "foo:0.0" and "foo:0.1"?
Stefan
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Tue, 10 Feb 2009 21:35:03 GMT)
Full text and
rfc822 format available.
Message #44 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
Stefan Monnier wrote:
>>> Changing the last argument of walk-windows in calendar-window-list
>>> from t to 0 is probably good enough.
>
>> But that breaks the behaviour if I have multiple frames open on
>> different workspaces in Window Maker.
I was wrong, it doesn't make a difference in that regard, so I can
install that.
> Not sure I understand what you mean by "different workspaces in Window
> Maker"? I'm guessing that these are different X displays, maybe of the
> form "foo:0.0" and "foo:0.1"?
No. I probably should have said "virtual desktop"? The different
screens provided by your window manager / "desktop environment", which
you can switch between and move applications between.
I noticed that frames on workspaces other than the current one have a
'visibility frame-parameter of 'icon, which surprised me. Does that
make sense?
Information forwarded
to
bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
:
bug#2199
; Package
emacs,calendar
.
(Wed, 11 Feb 2009 01:40:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Stefan Monnier <monnier <at> iro.umontreal.ca>
:
Extra info received and forwarded to list. Copy sent to
Emacs Bugs <bug-gnu-emacs <at> gnu.org>, owner <at> emacsbugs.donarmstrong.com
.
(Wed, 11 Feb 2009 01:40:04 GMT)
Full text and
rfc822 format available.
Message #49 received at 2199 <at> emacsbugs.donarmstrong.com (full text, mbox):
> I noticed that frames on workspaces other than the current one have a
> 'visibility frame-parameter of 'icon, which surprised me. Does that
> make sense?
Yes. X11 doesn't have a notion of "workspace", fundamentally, so
window-managers simulate it by mapping/unmapping (the X11 terms for
display/hide) the windows according to which windows are displayed in
the current workspace.
Now mapping/unmapping is the same mechanism used to iconify/deiconify
a window, so Emacs treats an unmapped window as "iconified".
Note that window-managers could use other techniques to
hide/show windows. E.g. they could just move them "out of sight", in
which case Emacs would consider those windows as still "visible" but
with bogus left/right positions.
Stefan
Reply sent
to
Glenn Morris <rgm <at> gnu.org>
:
You have taken responsibility.
(Wed, 11 Feb 2009 04:10:14 GMT)
Full text and
rfc822 format available.
Notification sent
to
Stephen Berman <stephen.berman <at> gmx.net>
:
bug acknowledged by developer.
(Wed, 11 Feb 2009 04:10:14 GMT)
Full text and
rfc822 format available.
Message #54 received at 2199-done <at> emacsbugs.donarmstrong.com (full text, mbox):
Glenn Morris wrote:
> emacs -Q --daemon --eval "(setq in (window-inside-edges) out (window-edges))"
> emacsclient -c
>
> in = (0 1 10 8)
> out = (0 1 10 9)
>
> No idea what to do about that.
I've installed a hacky fix (for calendar) and am closing this bug.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> emacsbugs.donarmstrong.com
.
(Wed, 11 Mar 2009 14:24:10 GMT)
Full text and
rfc822 format available.
This bug report was last modified 16 years and 165 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.