GNU bug report logs - #831
23.0.60; error in nsfonts.m

Previous Next

Packages: ns, emacs;

Reported by: Austin Frank <austin.frank <at> gmail.com>

Date: Sat, 30 Aug 2008 17:40:04 UTC

Severity: important

Merged with 823, 827, 832, 833, 852, 855, 862, 866, 887, 903

Done: Adrian Robert <adrian.b.robert <at> gmail.com>

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 831 in the body.
You can then email your comments to 831 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 bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#831; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Austin Frank <austin.frank <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Austin Frank <austin.frank <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60; error in nsfonts.m
Date: Sat, 30 Aug 2008 13:32:39 -0400
[Message part 1 (text/plain, inline)]
I'm trying to build emacs from a current CVS checkout on OSX 10.4.11
with the configure option --with-ns.

Build fails because of error in nsfonts.m.  That file references a
variable called gidx, which is not defined in the relevant structure.
The attached patch changes all instances of gidx to x, and allows emacs
to build on my system.

[gidx.patch (text/x-patch, inline)]
diff --git a/src/nsfont.m b/src/nsfont.m
index f49cd0f..10b1c90 100644
--- a/src/nsfont.m
+++ b/src/nsfont.m
@@ -904,14 +904,14 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
     int hi, lo;
     char isComposite = 0; /* s->first_glyph->type == COMPOSITE_GLYPH; */
     /* FIXME: composition: no vertical displacement is considered. */
-    t+= s->gidx; /* advance into composition */
-    for (i =0; i<s->nchars - s->gidx; i++, t++)
+    t+= s->x; /* advance into composition */
+    for (i =0; i<s->nchars - s->x; i++, t++)
       {
         hi = (*t & 0xFF00) >> 8;
         lo = *t & 0x00FF;
         if (isComposite)
           {
-            cwidth = s->cmp->offsets[s->gidx++ * 2] - twidth;
+            cwidth = s->cmp->offsets[s->x++ * 2] - twidth;
           }
         else
           {
@@ -1094,13 +1094,13 @@ nsfont_draw (struct glyph_string *s, int from, int to, int x, int y,
       [col set];
 
     CGContextSetTextPosition (gcontext, r.origin.x, r.origin.y);
-    CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx,
+    CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->x,
                                     advances, len);
 
     if (face->overstrike)
       {
         CGContextSetTextPosition (gcontext, r.origin.x+0.5, r.origin.y);
-        CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->gidx,
+        CGContextShowGlyphsWithAdvances (gcontext, s->char2b + s->x,
                                         advances, len);
       }
 
[Message part 3 (text/plain, inline)]

In GNU Emacs 23.0.60.1 (powerpc-apple-darwin8.11.0, X toolkit)
 of 2008-08-29 on malibu.local
Important settings:
  value of $LC_ALL: en_US.UTF-8
  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: nil
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t



-- 
Austin Frank
http://aufrank.net
GPG Public Key (D7398C2F): http://aufrank.net/personal.asc
[Message part 4 (application/pgp-signature, inline)]

bug reassigned from package `emacs' to `emacs,ns'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 30 Aug 2008 19:55:04 GMT) Full text and rfc822 format available.

Merged 823 827 831 832. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 30 Aug 2008 19:55:05 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#831; Package emacs,ns. Full text and rfc822 format available.

Message #12 received at 831 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Austin Frank <austin.frank <at> gmail.com>
Cc: 831 <at> debbugs.gnu.org, Kenichi Handa <handa <at> m17n.org>
Subject: Re: bug#831: 23.0.60; error in nsfonts.m
Date: Sat, 30 Aug 2008 15:59:30 -0400
Austin Frank wrote:

> I'm trying to build emacs from a current CVS checkout on OSX 10.4.11
> with the configure option --with-ns.
>
> Build fails because of error in nsfonts.m.  That file references a
> variable called gidx, which is not defined in the relevant structure.
> The attached patch changes all instances of gidx to x, and allows emacs
> to build on my system.

That may happen to build, but I don't believe it to be the correct fix.

This is fallout from:

2008-08-29  Kenichi Handa  <handa <at> m17n.org>

    * dispextern.h (struct glyph_string): Delete the member gidx.
      New members cmp_id, cmp_from, and cmp_to.

(There are also some out-of-date comments in xdisp.c that still refer
to gidx.)




Merged 823 827 831 832 833. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 30 Aug 2008 22:45:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#831; Package emacs,ns. Full text and rfc822 format available.

Acknowledgement sent to "Austin Frank" <austin.frank <at> gmail.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #19 received at 831 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Austin Frank" <austin.frank <at> gmail.com>
To: "Glenn Morris" <rgm <at> gnu.org>
Cc: 831 <at> debbugs.gnu.org, "Kenichi Handa" <handa <at> m17n.org>
Subject: Re: bug#831: 23.0.60; error in nsfonts.m
Date: Sun, 31 Aug 2008 13:49:32 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, you're right that this builds but doesn't actually work.  Sorry
that I didn't dive deeper in debugging!  Unfortunately I don't have
time to work on a patch-- apologies.  I'll keep an eye on CVS for
changes to nsfonts.m and xdisp.c.

Thanks,
/au

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)
Comment: http://getfiregpg.org

iEYEARECAAYFAki62bIACgkQlHMl2/XbR4HBWgCgsfk0mlSrjW62yhDGnJahQVZH
XH8AoM+gZlh6I90lkZh/Xen3vb21mWJP
=tyto
-----END PGP SIGNATURE-----

On Sat, Aug 30, 2008 at 3:59 PM, Glenn Morris <rgm <at> gnu.org> wrote:
> Austin Frank wrote:
>
>> I'm trying to build emacs from a current CVS checkout on OSX 10.4.11
>> with the configure option --with-ns.
>>
>> Build fails because of error in nsfonts.m.  That file references a
>> variable called gidx, which is not defined in the relevant structure.
>> The attached patch changes all instances of gidx to x, and allows emacs
>> to build on my system.
>
> That may happen to build, but I don't believe it to be the correct fix.
>
> This is fallout from:
>
> 2008-08-29  Kenichi Handa  <handa <at> m17n.org>
>
>    * dispextern.h (struct glyph_string): Delete the member gidx.
>      New members cmp_id, cmp_from, and cmp_to.
>
> (There are also some out-of-date comments in xdisp.c that still refer
> to gidx.)
>




Merged 823 827 831 832 833 852. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 01 Sep 2008 19:55:05 GMT) Full text and rfc822 format available.

Merged 823 827 831 832 833 852 855. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Mon, 01 Sep 2008 22:05:07 GMT) Full text and rfc822 format available.

Merged 823 827 831 832 833 852 855 862. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 02 Sep 2008 16:10:07 GMT) Full text and rfc822 format available.

Merged 823 827 831 832 833 852 855 862 866. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 02 Sep 2008 17:35:04 GMT) Full text and rfc822 format available.

Merged 823 827 831 832 833 852 855 862 866 887. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 04 Sep 2008 16:40:06 GMT) Full text and rfc822 format available.

Tags added: patch Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 04 Sep 2008 16:40:06 GMT) Full text and rfc822 format available.

Merged 823 827 831 832 833 852 855 862 866 887 903. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 06 Sep 2008 18:35:03 GMT) Full text and rfc822 format available.

Severity set to `important' from `normal' Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Sat, 06 Sep 2008 21:45:06 GMT) Full text and rfc822 format available.

Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#831; Package emacs,ns. Full text and rfc822 format available.

Message #38 received at 831 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: bug-gnu-emacs <at> gnu.org
Cc: emacs-app-dev-@lists.sourceforge.net, Kenichi Handa <handa <at> m17n.org>
Subject: Re: bug#831: 23.0.60; error in nsfonts.m
Date: Sun, 07 Sep 2008 06:26:03 -0500
The following message is a courtesy copy of an article
that has been posted to gnu.emacs.bug as well.

On Sun, 31 Aug 2008 13:49:32 -0400 "Austin Frank" <austin.frank <at> gmail.com> wrote: 

AF> On Sat, Aug 30, 2008 at 3:59 PM, Glenn Morris <rgm <at> gnu.org> wrote:
>> Austin Frank wrote:
>> 
>>> I'm trying to build emacs from a current CVS checkout on OSX 10.4.11
>>> with the configure option --with-ns.
>>> 
>>> Build fails because of error in nsfonts.m.  That file references a
>>> variable called gidx, which is not defined in the relevant structure.
>>> The attached patch changes all instances of gidx to x, and allows emacs
>>> to build on my system.
>> 
>> That may happen to build, but I don't believe it to be the correct fix.
>> 
>> This is fallout from:
>> 
>> 2008-08-29  Kenichi Handa  <handa <at> m17n.org>
>> 
>> * dispextern.h (struct glyph_string): Delete the member gidx.
>> New members cmp_id, cmp_from, and cmp_to.
>> 
>> (There are also some out-of-date comments in xdisp.c that still refer
>> to gidx.)

AF> Yes, you're right that this builds but doesn't actually work.  Sorry
AF> that I didn't dive deeper in debugging!  Unfortunately I don't have
AF> time to work on a patch-- apologies.  I'll keep an eye on CVS for
AF> changes to nsfonts.m and xdisp.c.

I used the data member rename patch Austin and others suggested for two
days now without problems.  It lets Emacs build on Mac OS X and despite
being insufficient as a full fix, at least the users don't have to wait
for the full fix to have a working compile.

I comitted this change to the Emacs CVS HEAD, including fixing the
references to gidx in the xdisp.c docs, and will back it out (or anyone
else can back it out) if it's a problem.  I apologize in advance if
that's the case.  All the gidx references are changed to cmp_from,
that's all it does.

Thanks
Ted




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#831; Package emacs,ns. Full text and rfc822 format available.

Message #41 received at 831 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 381 <at> debbugs.gnu.org
Subject: Re: bug#831: 23.0.60; error in nsfonts.m
Date: Sun, 07 Sep 2008 16:37:14 -0400
[Sent this to bug 381 instead of 831 the first time, sigh]

Would you mind not using the newsgroup interface? It seems to break
the bug tracker, in that your posts don't appear there (I have
forwarded some there). This is some bug, not your fault.

Ted Zlatanov wrote:

> I used the data member rename patch Austin and others suggested for two
> days now without problems.  It lets Emacs build on Mac OS X and despite
> being insufficient as a full fix, at least the users don't have to wait
> for the full fix to have a working compile.
>
> I comitted this change to the Emacs CVS HEAD, including fixing the
> references to gidx in the xdisp.c docs, and will back it out (or anyone
> else can back it out) if it's a problem.

Can you give it the correct attribution in the ChangeLog? Maybe you
came up with it independently, in which case it's correct as is.
I thought it was Daniel Koning's.

> I apologize in advance if that's the case. All the gidx references
> are changed to cmp_from, that's all it does.

I left it alone partly because obviously wrong is better than subtly wrong.
(Not that I can say if it is right or wrong).
And also partly to see how many duplicate reports were received. :)
About 13 I think, none apart from the first and the one with the patch
conveying any useful information. And most saying "is this known?" :)

(I'm not saying you should take it out.)




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#831; Package emacs,ns. Full text and rfc822 format available.

Acknowledgement sent to Ted Zlatanov <tzz <at> lifelogs.com>:
Extra info received and forwarded to list. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com. Full text and rfc822 format available.

Message #46 received at 831 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Ted Zlatanov <tzz <at> lifelogs.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 381 <at> debbugs.gnu.org
Subject: Re: bug#831: 23.0.60; error in nsfonts.m
Date: Mon, 08 Sep 2008 05:29:37 -0500
On Sun, 07 Sep 2008 16:37:14 -0400 Glenn Morris <rgm <at> gnu.org> wrote: 

GM> Would you mind not using the newsgroup interface? It seems to break
GM> the bug tracker, in that your posts don't appear there (I have
GM> forwarded some there). This is some bug, not your fault.

I'll try to CC correctly.  I have to use that interface, unfortunately.

GM> Ted Zlatanov wrote:

>> I used the data member rename patch Austin and others suggested for two
>> days now without problems.  It lets Emacs build on Mac OS X and despite
>> being insufficient as a full fix, at least the users don't have to wait
>> for the full fix to have a working compile.
>> 
>> I comitted this change to the Emacs CVS HEAD, including fixing the
>> references to gidx in the xdisp.c docs, and will back it out (or anyone
>> else can back it out) if it's a problem.

GM> Can you give it the correct attribution in the ChangeLog? Maybe you
GM> came up with it independently, in which case it's correct as is.
GM> I thought it was Daniel Koning's.

There were 2 suggestions plus I looked at it myself (with a `grep
gidx').  I'll gladly attribute it to Daniel but Austin has a claim to
it as well, and I don't know how to do mulitple authors.

>> I apologize in advance if that's the case. All the gidx references
>> are changed to cmp_from, that's all it does.

GM> I left it alone partly because obviously wrong is better than subtly wrong.
GM> (Not that I can say if it is right or wrong).

I figured wrong is OK, broken is not OK for most Emacs users.  Testing
it for 2 days gave me confidence it would not be annoying.

GM> And also partly to see how many duplicate reports were received. :)
GM> About 13 I think, none apart from the first and the one with the patch
GM> conveying any useful information. And most saying "is this known?" :)

GM> (I'm not saying you should take it out.)

OK.  Kenichi Handa thinks it's a lot of work to make it work correctly
with composition, so I think this should be documented as a TODO item.
I don't know the right place to document this; it's not FOR-RELEASE
since it probably won't block a release.

Thanks for all your help with this and other issues.

Ted




Information forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>, don <at> donarmstrong.com:
bug#831; Package emacs,ns. Full text and rfc822 format available.

Message #49 received at 831 <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: Ted Zlatanov <tzz <at> lifelogs.com>
Cc: 831 <at> debbugs.gnu.org
Subject: Re: bug#831: 23.0.60; error in nsfonts.m
Date: Mon, 08 Sep 2008 17:17:19 -0400
Ted Zlatanov wrote:

> I'll try to CC correctly.  I have to use that interface, unfortunately.

Of course, I went and cc'd the wrong bug number, sigh. :(
It should have been 831, not 381.

Perhaps you should just continue to do what is convenient for you.
It's not your fault we have a broken system.

> There were 2 suggestions plus I looked at it myself (with a `grep
> gidx'). I'll gladly attribute it to Daniel but Austin has a claim to
> it as well, and I don't know how to do mulitple authors.

The first suggestion (from #831 "replace gidx with x") was just wrong.
The #832 patch was the one applied. It should be marked (tiny change).

(See eg 2008-06-20, textmodes/rst.el in lisp/ChangeLog for how to do
multiple authors.)




Tags removed: patch Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Tue, 09 Sep 2008 21:30:03 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Sat, 01 Nov 2008 14:24:03 GMT) Full text and rfc822 format available.

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

Previous Next


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