GNU bug report logs - #32395
26.1; generated autoloads includes string properties if buffer is open

Previous Next

Package: emacs;

Reported by: Allen Li <darkfeline <at> felesatra.moe>

Date: Wed, 8 Aug 2018 07:10:02 UTC

Severity: normal

Found in version 26.1

Fixed in version 27.1

Done: Eli Zaretskii <eliz <at> gnu.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 32395 in the body.
You can then email your comments to 32395 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-gnu-emacs <at> gnu.org:
bug#32395; Package emacs. (Wed, 08 Aug 2018 07:10:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Allen Li <darkfeline <at> felesatra.moe>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 08 Aug 2018 07:10:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: bug-gnu-emacs <at> gnu.org
Subject: 26.1; generated autoloads includes string properties if buffer is open
Date: Wed, 8 Aug 2018 00:09:22 -0700
The autoload generation code inserts a form with a string that may or
may not have text properties, depending on if the buffer is already
open.

(if (fboundp 'register-definition-prefixes)
             (register-definition-prefixes "foo"
                                           '(#("foo-" 0 4 (fontified nil)))))

(if (fboundp 'register-definition-prefixes)
             (register-definition-prefixes "foo" '("foo-")))

This makes autoload generation depend on the odd condition of whether
the file under consideration is already open and fontified.

In GNU Emacs 26.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30)
 of 2018-07-05 built on juergen
Windowing system distributor 'The X.Org Foundation', version 11.0.12000000

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --with-x-toolkit=gtk3 --with-xft --with-modules
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong
 -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS
GTK3 X11 MODULES THREADS LIBSYSTEMD LCMS2




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32395; Package emacs. (Wed, 08 Aug 2018 07:14:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: 32395 <at> debbugs.gnu.org
Subject: [PATCH] Don't include text properties when making autoloads
Date: Wed, 8 Aug 2018 00:13:04 -0700
[Message part 1 (text/plain, inline)]
Attached patch fixing this
[0001-Don-t-include-text-properties-when-making-autoloads.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32395; Package emacs. (Sat, 11 Aug 2018 09:19:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Allen Li <darkfeline <at> felesatra.moe>
Cc: 32395 <at> debbugs.gnu.org
Subject: Re: bug#32395: 26.1;
 generated autoloads includes string properties if buffer is open
Date: Sat, 11 Aug 2018 12:18:16 +0300
> From: Allen Li <darkfeline <at> felesatra.moe>
> Date: Wed, 8 Aug 2018 00:09:22 -0700
> 
> The autoload generation code inserts a form with a string that may or
> may not have text properties, depending on if the buffer is already
> open.
> 
> (if (fboundp 'register-definition-prefixes)
>              (register-definition-prefixes "foo"
>                                            '(#("foo-" 0 4 (fontified nil)))))
> 
> (if (fboundp 'register-definition-prefixes)
>              (register-definition-prefixes "foo" '("foo-")))
> 
> This makes autoload generation depend on the odd condition of whether
> the file under consideration is already open and fontified.

Can you tell more about the use case where you see this?  Does this
happen when the autoload files in the Emacs tree are generated?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#32395; Package emacs. (Sat, 11 Aug 2018 09:50:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <darkfeline <at> felesatra.moe>
To: eliz <at> gnu.org
Cc: 32395 <at> debbugs.gnu.org
Subject: Re: bug#32395: 26.1; generated autoloads includes string properties
 if buffer is open
Date: Sat, 11 Aug 2018 02:49:30 -0700
On Sat, Aug 11, 2018 at 2:18 AM Eli Zaretskii <eliz <at> gnu.org> wrote:
>
> > From: Allen Li <darkfeline <at> felesatra.moe>
> > Date: Wed, 8 Aug 2018 00:09:22 -0700
> >
> > The autoload generation code inserts a form with a string that may or
> > may not have text properties, depending on if the buffer is already
> > open.
> >
> > (if (fboundp 'register-definition-prefixes)
> >              (register-definition-prefixes "foo"
> >                                            '(#("foo-" 0 4 (fontified nil)))))
> >
> > (if (fboundp 'register-definition-prefixes)
> >              (register-definition-prefixes "foo" '("foo-")))
> >
> > This makes autoload generation depend on the odd condition of whether
> > the file under consideration is already open and fontified.
>
> Can you tell more about the use case where you see this?  Does this
> happen when the autoload files in the Emacs tree are generated?

I use update-directory-autoloads to generate autoloads for personal
Emacs Lisp files.  The text changes depending on whether I have a
buffer open for any of said files, which is annoying as I have the
autoload file under source version control.  If I edit one file and
update autoloads, it will create a number of unrelated changes in
version control, depending on whether I have any other files open in
buffers or not.

I don't see why there is a need to preserve the text properties of the
package prefix in the autoload file, only when the file for which
autoloads are being generated is open in a buffer.  That seems like
very silly behavior to me and I would fix it on principle even if it
were not affecting my work flow.




Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Fri, 17 Aug 2018 14:11:01 GMT) Full text and rfc822 format available.

Notification sent to Allen Li <darkfeline <at> felesatra.moe>:
bug acknowledged by developer. (Fri, 17 Aug 2018 14:11:02 GMT) Full text and rfc822 format available.

Message #19 received at 32395-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Allen Li <darkfeline <at> felesatra.moe>
Cc: 32395-done <at> debbugs.gnu.org
Subject: Re: bug#32395: 26.1; generated autoloads includes string properties
 if buffer is open
Date: Fri, 17 Aug 2018 17:10:22 +0300
> From: Allen Li <darkfeline <at> felesatra.moe>
> Date: Sat, 11 Aug 2018 02:49:30 -0700
> Cc: 32395 <at> debbugs.gnu.org
> 
> > Can you tell more about the use case where you see this?  Does this
> > happen when the autoload files in the Emacs tree are generated?
> 
> I use update-directory-autoloads to generate autoloads for personal
> Emacs Lisp files.  The text changes depending on whether I have a
> buffer open for any of said files, which is annoying as I have the
> autoload file under source version control.  If I edit one file and
> update autoloads, it will create a number of unrelated changes in
> version control, depending on whether I have any other files open in
> buffers or not.
> 
> I don't see why there is a need to preserve the text properties of the
> package prefix in the autoload file, only when the file for which
> autoloads are being generated is open in a buffer.  That seems like
> very silly behavior to me and I would fix it on principle even if it
> were not affecting my work flow.

Thanks, I've pushed your changes to the master branch.  If as result
you no longer think of Emacs as being silly, we all win.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 15 Sep 2018 11:24:04 GMT) Full text and rfc822 format available.

bug unarchived. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 25 Jun 2019 10:49:01 GMT) Full text and rfc822 format available.

bug Marked as fixed in versions 27.1. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Tue, 25 Jun 2019 10:49:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: 32395-quiet <at> debbugs.gnu.org
Subject: Re: bug#32395: 26.1;
 generated autoloads includes string properties if buffer is open
Date: Tue, 25 Jun 2019 06:50:02 -0400
58e5f10f88 2018-08-17T17:05:20+03:00 "Don't include text properties when making autoloads"
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=58e5f10f884f70faea2dc577e890ccc9e8c5d0f5





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Jul 2019 11:24:13 GMT) Full text and rfc822 format available.

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

Previous Next


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