* header-line-format vs. window fringes
@ 2005-08-01 13:37 Juanma Barranquero
2005-08-01 14:23 ` Juanma Barranquero
2005-08-01 20:05 ` Stefan Monnier
0 siblings, 2 replies; 3+ messages in thread
From: Juanma Barranquero @ 2005-08-01 13:37 UTC (permalink / raw)
I'm trying to use `header-line-format' to create a header line for a
buffer which contains several columns of fixed width. The intent,
obviously, is for the header line to contain titles that should be
aligned right over each corresponding column (assuming the face used
on the buffer and the one for the header line use the same, or
equivalent, monospaced font).
I don't know how to do that when the window has non-null fringes,
because I know the fringes' widths, but I don't see a way to know the
width of the monospaced font, in pixels. As the header doesn't take
into account the fringes, its content is not character-aligned with
the buffer's content.
Am I missing something?
--
/L/e/k/t/u
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: header-line-format vs. window fringes
2005-08-01 13:37 header-line-format vs. window fringes Juanma Barranquero
@ 2005-08-01 14:23 ` Juanma Barranquero
2005-08-01 20:05 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Juanma Barranquero @ 2005-08-01 14:23 UTC (permalink / raw)
On 8/1/05, Juanma Barranquero <lekktu@gmail.com> wrote:
> As the header doesn't take
> into account the fringes, its content is not character-aligned with
> the buffer's content.
Move along, move along. That is not the question you're reading.
[Or, let's suppose I just found about the :align-to stuff for display
attributes.]
--
/L/e/k/t/u
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: header-line-format vs. window fringes
2005-08-01 13:37 header-line-format vs. window fringes Juanma Barranquero
2005-08-01 14:23 ` Juanma Barranquero
@ 2005-08-01 20:05 ` Stefan Monnier
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Monnier @ 2005-08-01 20:05 UTC (permalink / raw)
Cc: Emacs Devel
> I don't know how to do that when the window has non-null fringes,
> because I know the fringes' widths, but I don't see a way to know the
> width of the monospaced font, in pixels. As the header doesn't take
> into account the fringes, its content is not character-aligned with
> the buffer's content.
IIRC if you use a :align-to display property, the 0 position is at the
beginning of the text, so you should just need to add a leading space with
an (:align-to 0) text property.
Take a look at the code for list-buffers which has to deal with the
same issue.
Stefan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-08-01 20:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-01 13:37 header-line-format vs. window fringes Juanma Barranquero
2005-08-01 14:23 ` Juanma Barranquero
2005-08-01 20:05 ` Stefan Monnier
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.