all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon Josefsson <jas@extundo.com>
Cc: emacs-devel@gnu.org
Subject: Re: Fringes again
Date: Sat, 25 May 2002 01:48:53 +0200	[thread overview]
Message-ID: <iluit5dksyi.fsf@latte.josefsson.org> (raw)
In-Reply-To: <5xsn4hdudc.fsf@kfs2.cua.dk> (storm@cua.dk's message of "25 May 2002 01:00:15 +0200")

storm@cua.dk (Kim F. Storm) writes:

> Actually, the default is to take 2x8 = 16 pixels and find the minimum
> number of characters in the default font that is at least 16 pixels wide,
> and then distribute that space evenly between the two fringes.
>
> Suppose the default font width is 6 pixels.  This needs 3 characters =
> 18 pixels to hold the fringes => 9 pixels for each fringe.
>
> If an odd number of pixels are allocated, the extra pixel is
> added to the right fringe.
>
>> Right, but how do you programmatically calculate that?
>
> Something like
>
> (/ (* (/ (+ (* 2 8) (frame-char-width) -1)
>          (frame-char-width))
>       (frame-char-width))
>    2)

Hm.  Will this work for e.g. `default-frame-alist'?  It need to have
integers, not expressions that can vary depending on the font or
display (consider multi-head X where the screens has different
resolutions, `frame-char-width' would probably return different values
depending on which screen it is on).  It doesn't look very reliable to
calculate "half fringe width" (if there isn't something better than
the above), so perhaps the "half width" option should be removed.
Opinions?

  reply	other threads:[~2002-05-24 23:48 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-20 20:03 Fringes again Simon Josefsson
2002-05-20 23:37 ` Miles Bader
2002-05-21 19:12   ` Richard Stallman
2002-05-21 20:53   ` Simon Josefsson
2002-05-21 21:40     ` Thien-Thi Nguyen
2002-05-22  8:20       ` Simon Josefsson
2002-05-22  1:24     ` Miles Bader
2002-05-22  3:21       ` Eli Zaretskii
2002-05-22  3:40         ` Miles Bader
2002-05-22  8:54       ` Simon Josefsson
2002-05-24  0:07         ` Miles Bader
2002-05-24  9:47           ` Simon Josefsson
2002-05-24 23:00             ` Kim F. Storm
2002-05-24 23:48               ` Simon Josefsson [this message]
2002-05-25 23:06                 ` Kim F. Storm
2002-05-25 23:15                   ` Simon Josefsson
2002-05-21 15:57 ` Richard Stallman

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=iluit5dksyi.fsf@latte.josefsson.org \
    --to=jas@extundo.com \
    --cc=emacs-devel@gnu.org \
    /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.