unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: Yuri D'Elia <wavexx@thregr.org>, emacs-devel@gnu.org
Subject: Re: Recent changes incorrectly calculate font size within daemon mode
Date: Thu, 30 Aug 2018 14:30:21 -0700	[thread overview]
Message-ID: <e3b0a9d4-4207-8434-c4ec-8c5e3fc59943@cs.ucla.edu> (raw)
In-Reply-To: <87lg8nisgf.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 510 bytes --]

Michael Heerdegen wrote:
> The crucial difference seems to be that in an older Emacs build I get
> 
> (assq 'font (frame-parameters))
> ==>
>   (font . "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-23-*-*-*-m-0-iso10646-1")
> 
> and with current master
> 
> (assq 'font (frame-parameters))
> ==>
>   (font . "-PfEd-DejaVu Sans Mono-normal-normal-normal-*-*-*-*-*-m-0-iso10646-1")

Thanks for narrowing that down; it was quite helpful. I installed the attached 
patch into Emacs master; please give it a try.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-off-by-1-typo-in-recent-bignum-changes.patch --]
[-- Type: text/x-patch; name="0001-Fix-off-by-1-typo-in-recent-bignum-changes.patch", Size: 1140 bytes --]

From 260e695dedd1cf9b9815a38e6b3369319b97b5f9 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Thu, 30 Aug 2018 14:28:19 -0700
Subject: [PATCH] Fix off-by-1 typo in recent bignum changes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Yuri D’Elia in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00977.html
and crucial clue provided by Michael Heerdegen in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg01043.html
* src/font.c (font_unparse_xlfd): Fix off-by-1 typo.
---
 src/font.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/font.c b/src/font.c
index 4a63700f79..e2414582f6 100644
--- a/src/font.c
+++ b/src/font.c
@@ -1290,7 +1290,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
   if (INTEGERP (val))
     {
       intmax_t v = FIXNUMP (val) ? XFIXNUM (val) : bignum_to_intmax (val);
-      if (! (0 <= v && v <= TYPE_MAXIMUM (uprintmax_t)))
+      if (! (0 < v && v <= TYPE_MAXIMUM (uprintmax_t)))
 	v = pixel_size;
       if (v > 0)
 	{
-- 
2.17.1


  reply	other threads:[~2018-08-30 21:30 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-29 10:29 Recent changes incorrectly calculate font size within daemon mode Yuri D'Elia
2018-08-29 11:05 ` Yuri D'Elia
2018-08-30 14:28   ` Paul Eggert
2018-08-30 14:59     ` Yuri D'Elia
2018-08-30 17:21       ` Paul Eggert
2018-08-30 17:43         ` Yuri D'Elia
2018-08-29 16:26 ` Michael Heerdegen
2018-08-30 14:39   ` Paul Eggert
2018-08-30 16:35     ` Michael Heerdegen
2018-08-30 17:27       ` Paul Eggert
2018-08-30 17:33         ` Michael Heerdegen
2018-08-30 19:07           ` Michael Heerdegen
2018-08-30 21:30             ` Paul Eggert [this message]
2018-08-30 21:51               ` Michael Heerdegen
2018-08-30 22:05               ` Yuri D'Elia
2018-08-31 17:31       ` Stefan Monnier
2018-08-31 19:45         ` Michael Heerdegen
2018-08-30 16:55     ` Drew Adams

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e3b0a9d4-4207-8434-c4ec-8c5e3fc59943@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=emacs-devel@gnu.org \
    --cc=michael_heerdegen@web.de \
    --cc=wavexx@thregr.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).