GNU bug report logs - #6437
23.2; Fail to parse GTK font size with decimal point

Previous Next

Package: emacs;

Reported by: Keith Packard <keithp <at> keithp.com>

Date: Wed, 16 Jun 2010 12:45:02 UTC

Severity: normal

Tags: fixed

Found in version 23.2

Fixed in version 24.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 6437 in the body.
You can then email your comments to 6437 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6437; Package emacs. (Wed, 16 Jun 2010 12:45:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Keith Packard <keithp <at> keithp.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 16 Jun 2010 12:45:03 GMT) Full text and rfc822 format available.

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

From: Keith Packard <keithp <at> keithp.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 23.2; Fail to parse GTK font size with decimal point
Date: Wed, 16 Jun 2010 01:15:23 -0700
[Message part 1 (text/plain, inline)]
Running emacs-gtk, I have my default font set to 'Monospace 7.5' in
gconf which causes emacs to fail to start with the following error
message:

$ emacs
Font `Monospace 7.5' is not defined


Emacs is mis-parsing the font name, not allowing for the point size
field to contain a decimal point.

Here's a patch:

diff --git a/src/font.c b/src/font.c
index 7657121..cdaa16e 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1544,7 +1544,7 @@ font_parse_fcname (name, font)
              int size_found = 1;
 
              for (q = p + 1; *q && *q != ' '; q++)
-               if (! isdigit (*q))
+               if (! isdigit (*q) && *q != '.')
                  {
                    size_found = 0;
                    break;

In GNU Emacs 23.2.1 (i486-pc-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-16 on aiko, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.10899901
configured using `configure  '--build' 'i486-linux-gnu' '--build' 'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.2/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.2/leim' '--with-x=yes' '--with-x-toolkit=gtk' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS=''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: en_US.UTF-8
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  diff-auto-refine-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x r e p o r t <tab> <return>

Recent messages:
Loading /etc/emacs/site-start.d/50git-core.el (source)...done
Loading /etc/emacs/site-start.d/50gtk-doc-tools.el (source)...done
Loading /etc/emacs/site-start.d/50lilypond-data.el (source)...done
Loading /etc/emacs/site-start.d/50mgp.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Loading /etc/emacs/site-start.d/50python-docutils.el (source)...done
Loading /etc/emacs/site-start.d/50w3m-el.el (source)...done
Loading /etc/emacs/site-start.d/50w3m-el-snapshot.el (source)...done
Connection file "/tmp/emacs1488/server" deleted
For information about GNU Emacs and the GNU system, type C-h C-a.

Load-path shadows:
/usr/share/emacs23/site-lisp/flim/sha1 hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/sha1
/usr/share/emacs23/site-lisp/flim/hex-util hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/hex-util
/usr/share/emacs23/site-lisp/flim/md4 hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/md4
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/textmodes/flyspell
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/flim/sasl-ntlm hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl-ntlm
/usr/share/emacs23/site-lisp/flim/hmac-def hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/hmac-def
/usr/share/emacs23/site-lisp/flim/sasl-digest hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl-digest
/usr/share/emacs23/site-lisp/flim/hmac-md5 hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/hmac-md5
/usr/share/emacs23/site-lisp/flim/sasl hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl
/usr/share/emacs23/site-lisp/flim/sasl-cram hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/sasl-cram
/usr/share/emacs23/site-lisp/flim/ntlm hides /local/src/debian/emacs23-23.2+1/debian/build-x/lisp/net/ntlm
/usr/share/emacs/23.2/site-lisp/cmake-data/cmake-mode hides /usr/share/emacs/site-lisp/cmake-mode
/usr/share/emacs/23.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/local/src/debian/emacs23-23.2+1/debian/build-x/lisp/textmodes/rst hides /usr/share/emacs/site-lisp/rst
/local/src/debian/emacs23-23.2+1/debian/build-x/leim/leim-list hides /usr/share/emacs/23.2/leim/leim-list

Features:
(shadow sort flyspell ispell mail-extr emacsbug uniquify bbdb-com advice
help-fns advice-preload bbdb timezone notmuch notmuch-message
notmuch-maildir-fcc notmuch-hello notmuch-show notmuch-mua
notmuch-address notmuch-wash diff-mode easy-mmode coolj notmuch-query
json notmuch-lib message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec mailabbrev nnheader gmm-utils wid-edit mailheader
canlock sha1 sha1-el hex-util hashcash mail-utils mm-view smime
password-cache dig mm-decode gnus-util netrc mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mm-util time-date
mail-prsvr cl cl-19 server w3m-load devhelp bbdb-autoloads tooltip
ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting
tool-bar dnd fontset image fringe lisp-mode register page menu-bar
rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind system-font-setting
font-render-setting gtk x-toolkit x multi-tty emacs)
[Message part 2 (text/plain, inline)]
-- 
keith.packard <at> intel.com
[Message part 3 (application/pgp-signature, inline)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6437; Package emacs. (Tue, 22 Jun 2010 06:45:02 GMT) Full text and rfc822 format available.

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

From: Jan Djärv <jan.h.d <at> swipnet.se>
To: Keith Packard <keithp <at> keithp.com>
Cc: 6437 <at> debbugs.gnu.org
Subject: Re: bug#6437: 23.2; Fail to parse GTK font size with decimal point
Date: Tue, 22 Jun 2010 08:44:48 +0200
2010-06-16 10:15, Keith Packard skrev:
>
> Running emacs-gtk, I have my default font set to 'Monospace 7.5' in
> gconf which causes emacs to fail to start with the following error
> message:
>
> $ emacs
> Font `Monospace 7.5' is not defined
>
>
> Emacs is mis-parsing the font name, not allowing for the point size
> field to contain a decimal point.
>
> Here's a patch:
>
> diff --git a/src/font.c b/src/font.c
> index 7657121..cdaa16e 100644
> --- a/src/font.c
> +++ b/src/font.c
> @@ -1544,7 +1544,7 @@ font_parse_fcname (name, font)
>                int size_found = 1;
>
>                for (q = p + 1; *q&&  *q != ' '; q++)
> -               if (! isdigit (*q))
> +               if (! isdigit (*q)&&  *q != '.')
>                    {
>                      size_found = 0;
>                      break;
>

Applied.  But on my system it seems I get 7 even if I specify 7.5.  I tried a 
couple of applications, they all behave the same.

	Jan D.







Added tag(s) fixed. Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 21 Sep 2011 20:43:05 GMT) Full text and rfc822 format available.

bug marked as fixed in version 24.1, send any further explanations to 6437 <at> debbugs.gnu.org and Keith Packard <keithp <at> keithp.com> Request was from Lars Magne Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 21 Sep 2011 20:43:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#6437; Package emacs. (Wed, 21 Sep 2011 20:44:02 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Jan Djärv <jan.h.d <at> swipnet.se>
Cc: Keith Packard <keithp <at> keithp.com>, 6437 <at> debbugs.gnu.org
Subject: Re: bug#6437: 23.2; Fail to parse GTK font size with decimal point
Date: Wed, 21 Sep 2011 22:38:27 +0200
Jan Djärv <jan.h.d <at> swipnet.se> writes:

>> Running emacs-gtk, I have my default font set to 'Monospace 7.5' in
>> gconf which causes emacs to fail to start with the following error
>> message:

[...]

> Applied.  But on my system it seems I get 7 even if I specify 7.5.  I
> tried a couple of applications, they all behave the same.

But apparently the patch fixed the bug on the original reporter's
system?  There was no followup here, so I'm closing the bug report, but
if it turns out that this is still a problem, please reopen.

-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 20 Oct 2011 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 250 days ago.

Previous Next


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