From: Eli Zaretskii <eliz@gnu.org>
To: acm@muc.de
Cc: 17303@debbugs.gnu.org
Subject: bug#17303: On tty or -nw, (window-body-width) is one column too big.
Date: Sun, 20 Apr 2014 23:05:46 +0300 [thread overview]
Message-ID: <83d2gbepgl.fsf@gnu.org> (raw)
In-Reply-To: <83ha5neqv7.fsf@gnu.org>
> Date: Sun, 20 Apr 2014 22:35:24 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 17303@debbugs.gnu.org
>
> > Date: Sun, 20 Apr 2014 17:03:43 +0000
> > From: Alan Mackenzie <acm@muc.de>
> >
> > I'm doing something at the moment involving scrolling of windows, and I
> > need to know at what "visual" column point is in. So, naturally, I do
> >
> > (% (current-column) (window-body-width))
> >
> > . At the start of the first continuation line, this formula (correctly)
> > returns 0 on a GUI, but (e.g.) 79 on a tty or in emacs -nw.
>
> You mean, it says 80 in a GUI session, not 0, right?
Wait, perhaps I misunderstood your complain.
Is the problem with window-body-width, rather than with
current-column? (You seemed to ask about current-column, not
window-body-width.)
If so, then you should know that the continuation character does not
have to take one column, it can be customized via the buffer display
table. So the effective window width on a TTY is not always 1 column
less than on GUI frames. Also, if there's a truncation glyph at the
left, you'd probably want us to subtract its length as well, right?
Moreover, when there are no fringes on a GUI frame, we also use "\"
there to indicate a continued line, but we still return from
window-body-width a value that counts the continuation character.
So this is not an easy thing to change. And the question is of
course: why do it? What is the use case where you bumped into this
issue, and why window-body-width was important to you?
next prev parent reply other threads:[~2014-04-20 20:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-20 17:03 bug#17303: On tty or -nw, (window-body-width) is one column too big Alan Mackenzie
2014-04-20 19:35 ` Eli Zaretskii
2014-04-20 20:05 ` Eli Zaretskii [this message]
2014-04-20 20:39 ` Alan Mackenzie
2014-04-21 6:56 ` Eli Zaretskii
2014-04-21 15:43 ` Alan Mackenzie
2014-04-21 16:07 ` Eli Zaretskii
[not found] ` <handler.17303.B.13980136924874.ack@debbugs.gnu.org>
2014-04-21 15:29 ` bug#17303: Acknowledgement (On tty or -nw, (window-body-width) is one column too big.) Alan Mackenzie
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=83d2gbepgl.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=17303@debbugs.gnu.org \
--cc=acm@muc.de \
/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.