* trailing whitespace visible on some buffers
@ 2002-09-14 9:45 Luis O. Silva
2002-09-17 10:30 ` Calendar's buffer hooks (was trailing whitespace visible on some buffers) Luis O. Silva
[not found] ` <mailman.1032257775.4079.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Luis O. Silva @ 2002-09-14 9:45 UTC (permalink / raw)
Dear Emacs community,
This is an elementary question, but I haven't found the
solution of my problem.
I want to set the buffer-local variable
`show-trailing-whitespace' to `t' for all buffers except
for *info*, *diary*, *calendar*, and *mail presentation*. In
the emacs node of info I found how to set local variables to
different _modes_ using "hooks", but I don't know how to set
buffer-local variables to concrete buffers.
Thank you very much in advance,
luis
--
Luis Octavio Silva P.
St. Petersburg State University.
66/3 Botanicheskaya St., Apt.119/2
Stary Peterhof
St. Petersburg, Russia.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Calendar's buffer hooks (was trailing whitespace visible on some buffers)
2002-09-14 9:45 trailing whitespace visible on some buffers Luis O. Silva
@ 2002-09-17 10:30 ` Luis O. Silva
[not found] ` <mailman.1032257775.4079.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Luis O. Silva @ 2002-09-17 10:30 UTC (permalink / raw)
Cc: help-gnu-emacs
Dear Emacs community,
On Sat, 14 Sep 2002 13:45:34 +0400, I wrote:
Luis> I want to set the buffer-local variable
Luis> `show-trailing-whitespace' to `t' for all buffers
Luis> except for *info*, *diary*, *calendar*, and *mail
Luis> presentation*. In the emacs node of info I found how
Luis> to set local variables to different _modes_ using
Luis> "hooks", but I don't know how to set buffer-local
Luis> variables to concrete buffers.
With your help I've almost solved the problem, I just need to
know the name of the hooks that take place after the
*calendar* buffer is created.
I've tried the following variants: (after making visible
whitespaces globally)
1. (add-hook 'today-visible-calendar-hook
(lambda ()
(setq show-trailing-whitespace nil)))
==> the whitespaces disappear only when I scroll the calendar
or hit "d" or "h".
2. (add-hook 'calendar-load-hook
(lambda ()
(setq show-trailing-whitespace nil)))
==> whitespaces don't disappear.
Any suggestions?
Thanks in advance
--
Luis Octavio Silva P.
St. Petersburg State University.
66/3 Botanicheskaya St., Apt.119/2
Stary Peterhof
St. Petersburg, Russia.
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.1032257775.4079.help-gnu-emacs@gnu.org>]
* Re: Calendar's buffer hooks (was trailing whitespace visible on some buffers)
[not found] ` <mailman.1032257775.4079.help-gnu-emacs@gnu.org>
@ 2002-09-17 10:49 ` Simon Hooper
2002-09-18 8:36 ` Calendar's buffer hooks Karl Eichwalder
0 siblings, 1 reply; 6+ messages in thread
From: Simon Hooper @ 2002-09-17 10:49 UTC (permalink / raw)
In article <mailman.1032257775.4079.help-gnu-emacs@gnu.org>, Luis O. Silva wrote:
> .....I've almost solved the problem, I just need to know the name of
> the hooks that take place after the *calendar* buffer is created.
>
> I've tried the following variants: (after making visible
> whitespaces globally)
>
> 1. (add-hook 'today-visible-calendar-hook
> (lambda ()
> (setq show-trailing-whitespace nil)))
>
>==> the whitespaces disappear only when I scroll the calendar
> or hit "d" or "h".
>
> 2. (add-hook 'calendar-load-hook
> (lambda ()
> (setq show-trailing-whitespace nil)))
>
>==> whitespaces don't disappear.
I've been trying to do the same thing for a while. Unfortunately my
knowledge of lisp is nonexistent :( I use the diary and calendar and
have been using the following in my ~/.emacs
(defun simon-calendar-function ()
(turn-off-auto-fill)
(turn-off-filladapt-mode)
(flyspell-mode nil)
(setq show-trailing-whitespace nil)
)
(add-hook 'calendar-mode-hook 'simon-calendar-function)
(add-hook 'diary-hook 'simon-calendar-function)
This works fine for the diary, but I still have the white space
markers in my calendar. I have also tried using the calendar-load-hook.
Any ideas?
Simon.
--
Simon Hooper
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calendar's buffer hooks
2002-09-17 10:49 ` Simon Hooper
@ 2002-09-18 8:36 ` Karl Eichwalder
2002-09-19 5:32 ` Luis O. Silva
[not found] ` <mailman.1032412637.13710.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 6+ messages in thread
From: Karl Eichwalder @ 2002-09-18 8:36 UTC (permalink / raw)
Simon Hooper <simon@trickshot.nu> writes:
> (add-hook 'calendar-mode-hook 'simon-calendar-function)
calendar-mode-hook isn't defined. Try:
(add-hook 'initial-calendar-window-hook 'simon-calendar-function)
I just found it's documented in the manual:
File: elisp, Node: Calendar Customizing, Next: Holiday Customizing, Up: Calendar
Customizing the Calendar
[...]
Starting the calendar runs the normal hook
`initial-calendar-window-hook'. Recomputation of the calendar display
does not run this hook. But if you leave the calendar with the `q'
command and reenter it, the hook runs again.
--
ke@suse.de (work) / keichwa@gmx.net (home): |
http://www.suse.de/~ke/ | ,__o
Free Translation Project: | _-\_<,
http://www.iro.umontreal.ca/contrib/po/HTML/ | (*)/'(*)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Calendar's buffer hooks
2002-09-18 8:36 ` Calendar's buffer hooks Karl Eichwalder
@ 2002-09-19 5:32 ` Luis O. Silva
[not found] ` <mailman.1032412637.13710.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 6+ messages in thread
From: Luis O. Silva @ 2002-09-19 5:32 UTC (permalink / raw)
Cc: help-gnu-emacs
Karl,
On Wed, 18 Sep 2002 10:36:32 +0200, Karl Eichwalder writes:
Karl> Simon Hooper <simon@trickshot.nu> writes:
>> (add-hook 'calendar-mode-hook 'simon-calendar-function)
Karl> calendar-mode-hook isn't defined. Try:
Karl> (add-hook 'initial-calendar-window-hook
Karl> 'simon-calendar-function)
Karl> I just found it's documented in the manual:
I don't know why but, when using
`initial-calendar-window-hook' in the following:
(setq-default show-trailing-whitespace t)
...
...
(add-hook 'initial-calendar-window-hook
(lambda ()
(setq show-trailing-whitespace nil)))
the trailing whitespace disappears only partially (!!!???) and,
after some event take place (or after some time --~30 sec.)
(!!!???), it disappears completely. The result is similar to
the one obtained using the hook: `today-visible-calendar-hook'.
Could anybody explain why this delay happens?
Thank you.
luis
--
Luis Octavio Silva P.
St. Petersburg State University.
66/3 Botanicheskaya St., Apt.119/2
Stary Peterhof
St. Petersburg, Russia.
^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <mailman.1032412637.13710.help-gnu-emacs@gnu.org>]
end of thread, other threads:[~2002-09-20 18:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-09-14 9:45 trailing whitespace visible on some buffers Luis O. Silva
2002-09-17 10:30 ` Calendar's buffer hooks (was trailing whitespace visible on some buffers) Luis O. Silva
[not found] ` <mailman.1032257775.4079.help-gnu-emacs@gnu.org>
2002-09-17 10:49 ` Simon Hooper
2002-09-18 8:36 ` Calendar's buffer hooks Karl Eichwalder
2002-09-19 5:32 ` Luis O. Silva
[not found] ` <mailman.1032412637.13710.help-gnu-emacs@gnu.org>
2002-09-20 18:51 ` Karl Eichwalder
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).