GNU bug report logs - #48148
27.2; ox-ascii breaks TITLE line wrongly when 2 width char is used

Previous Next

Package: org-mode;

Reported by: Shingo Tanaka <shingo.fg8 <at> gmail.com>

Date: Sat, 1 May 2021 23:53:02 UTC

Severity: normal

Found in version 27.2

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

Full log


Message #26 received at 48148 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: shingo.fg8 <at> gmail.com, 48148 <at> debbugs.gnu.org
Subject: Re: bug#48148: 27.2; ox-ascii breaks TITLE line wrongly when 2
 width char is used
Date: Sun, 02 May 2021 15:48:14 +0300
> From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
> Cc: shingo.fg8 <at> gmail.com,  48148 <at> debbugs.gnu.org
> Date: Sun, 02 May 2021 14:18:24 +0200
> 
> My problem is that I have some string, _which is not displayed anywhere_
> yet. I need to obtain its real width along with the width of a single
> character in order to compute the length argument in `make-string'.

The width of any text on display is meaningless unless you also tell
in what window will it be displayed.  That's because some of the
factors that affect the display width depend on the window and the
buffer shown by that window.

So assuming the string you have will eventually be displayed in some
window -- and most strings in Emacs are of that kind -- you should use
that window up front.  Otherwise, the value you get from other methods
can only be an approximation, which will sometimes be close, and
sometimes quite far from the truth.




This bug report was last modified 4 years and 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.