* Display fringe only if not one-window-p?
@ 2004-09-30 20:09 Drew Adams
2004-09-30 21:17 ` Kim F. Storm
0 siblings, 1 reply; 4+ messages in thread
From: Drew Adams @ 2004-09-30 20:09 UTC (permalink / raw)
I generally use one window per frame, and I automatically resize the frame
to fit the window (using
http://www.emacswiki.org/elisp/auto-resize-frames.el).
In Emacs 21 (.3.50), I would like to remove the fringe area for such
windows, but I don't necessarily want to remove the fringe area when a frame
has more than one window. Anyone know how to do this easily?
Better: Is there a way (an easy way) to associate a _predicate_ with display
of things like fringe area - to display the fringe area for a window, for
instance, only if a line wraps or is truncated? I can of course modify
display-buffer, but I'm wondering if there is a clean and easier way.
Also, I don't see what fringes-outside-margins does. I've changed it to t or
nil and done set-window-buffer, but I don't seen any visible change.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Display fringe only if not one-window-p?
2004-09-30 20:09 Display fringe only if not one-window-p? Drew Adams
@ 2004-09-30 21:17 ` Kim F. Storm
2004-09-30 21:37 ` Stefan Monnier
0 siblings, 1 reply; 4+ messages in thread
From: Kim F. Storm @ 2004-09-30 21:17 UTC (permalink / raw)
Cc: help-gnu-emacs, Emacs-Devel
"Drew Adams" <drew.adams@oracle.com> writes:
> I generally use one window per frame, and I automatically resize the frame
> to fit the window (using
> http://www.emacswiki.org/elisp/auto-resize-frames.el).
>
> In Emacs 21 (.3.50), I would like to remove the fringe area for such
> windows, but I don't necessarily want to remove the fringe area when a frame
> has more than one window. Anyone know how to do this easily?
>
> Better: Is there a way (an easy way) to associate a _predicate_ with display
> of things like fringe area - to display the fringe area for a window, for
> instance, only if a line wraps or is truncated? I can of course modify
> display-buffer, but I'm wondering if there is a clean and easier way.
It can probably be done with a post-command-hook:
call sit-for to update the display
then scan the fringes of each display line for
truncation bitmaps etc. with fringe-bitmaps-at-pos,
then use set-window-fringes to show/hide the fringes.
>
> Also, I don't see what fringes-outside-margins does. I've changed it to t or
> nil and done set-window-buffer, but I don't seen any visible change.
It is only used if the window has display margins (see set-window-margins).
--
Kim F. Storm http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Display fringe only if not one-window-p?
2004-09-30 21:17 ` Kim F. Storm
@ 2004-09-30 21:37 ` Stefan Monnier
2004-09-30 22:04 ` Kim F. Storm
0 siblings, 1 reply; 4+ messages in thread
From: Stefan Monnier @ 2004-09-30 21:37 UTC (permalink / raw)
Cc: help-gnu-emacs, Drew Adams, Emacs-Devel
> It can probably be done with a post-command-hook:
> call sit-for to update the display
> then scan the fringes of each display line for
> truncation bitmaps etc. with fringe-bitmaps-at-pos,
Hmm... that would work to detect when a fringe is present-but-empty.
How 'bout detecting when a fringe is absent-but-needed?
Stefan
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Display fringe only if not one-window-p?
2004-09-30 21:37 ` Stefan Monnier
@ 2004-09-30 22:04 ` Kim F. Storm
0 siblings, 0 replies; 4+ messages in thread
From: Kim F. Storm @ 2004-09-30 22:04 UTC (permalink / raw)
Cc: help-gnu-emacs, Drew Adams, Emacs-Devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> It can probably be done with a post-command-hook:
>> call sit-for to update the display
>> then scan the fringes of each display line for
>> truncation bitmaps etc. with fringe-bitmaps-at-pos,
>
> Hmm... that would work to detect when a fringe is present-but-empty.
> How 'bout detecting when a fringe is absent-but-needed?
You are right.
I thought (slippery memory) that the fringe bitmaps were still
determined internally even if the fringes have zero width, but they
are not.
However, it would be trivial to add a new variable force-fringe-bitmap-update
or some such which did the fringe calculations even for zero-width fringes.
WDYT?
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-09-30 22:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-30 20:09 Display fringe only if not one-window-p? Drew Adams
2004-09-30 21:17 ` Kim F. Storm
2004-09-30 21:37 ` Stefan Monnier
2004-09-30 22:04 ` Kim F. Storm
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).