GNU bug report logs - #29924
25.3; write-abbrev-file does not preserve abbrev properties

Previous Next

Package: emacs;

Reported by: Allen Li <vianchielfaura <at> gmail.com>

Date: Mon, 1 Jan 2018 03:48:01 UTC

Severity: normal

Tags: fixed, patch

Found in version 25.3

Fixed in version 27.1

Done: Noam Postavsky <npostavs <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 29924 in the body.
You can then email your comments to 29924 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#29924; Package emacs. (Mon, 01 Jan 2018 03:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Allen Li <vianchielfaura <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 01 Jan 2018 03:48:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <vianchielfaura <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.3; write-abbrev-file does not preserve abbrev properties
Date: Sun, 31 Dec 2017 19:47:03 -0800
Steps:

Create abbrevs_defs file with contents:

  (define-abbrev-table 'python-mode-abbrev-table
    '(
      ("NT" "NamedTuple" nil :count 0 :case-fixed t)
     ))

Load abbrevs_defs.  Write abbrevs with write-abbrev-file

Expected: File contains something like:

  (define-abbrev-table 'python-mode-abbrev-table
    '(
      ("NT" "NamedTuple" nil :count 0 :case-fixed t)
     ))

Actual:  :case-fixed is missing:

  (define-abbrev-table 'python-mode-abbrev-table
    '(
      ("NT" "NamedTuple" nil 0)
     ))

In GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2017-12-04 built on arojas
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
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'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Mon, 01 Jan 2018 04:19:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <vianchielfaura <at> gmail.com>
To: 29924 <at> debbugs.gnu.org
Subject: [PATCH] Preserve special abbrev properties when writing
Date: Sun, 31 Dec 2017 20:18:13 -0800
[Message part 1 (text/plain, inline)]
Attached patch
[0001-Preserve-special-abbrev-properties-when-writing.patch (text/x-patch, attachment)]

Added tag(s) patch. Request was from Noam Postavsky <npostavs <at> users.sourceforge.net> to control <at> debbugs.gnu.org. (Tue, 23 Jan 2018 01:43:01 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Tue, 23 Jan 2018 08:20:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <vianchielfaura <at> gmail.com>
To: 29924 <at> debbugs.gnu.org
Subject: Re: [PATCH] Preserve special abbrev properties when writing
Date: Tue, 23 Jan 2018 00:19:07 -0800
[Message part 1 (text/plain, inline)]
Apologies, the original patch is incorrect because define-abbrev
requires passing :count as a keyword argument unlike the obsolete
calling convention.

Attached is a new patch, which unfortunately does not preserve the old
abbrev file writing format. However, any recent version of Emacs will
be able to accept this format for define-abbrev, and the previously
written abbrev file format is documented as obsolete, so now is as
good a time as any.
[0001-Preserve-special-abbrev-properties-when-writing.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Sat, 27 Jan 2018 02:13:01 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Allen Li <vianchielfaura <at> gmail.com>
Cc: 29924 <at> debbugs.gnu.org
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Fri, 26 Jan 2018 21:12:02 -0500
Allen Li <vianchielfaura <at> gmail.com> writes:

> Apologies, the original patch is incorrect because define-abbrev
> requires passing :count as a keyword argument unlike the obsolete
> calling convention.
>
> Attached is a new patch, which unfortunately does not preserve the old
> abbrev file writing format. However, any recent version of Emacs will
> be able to accept this format for define-abbrev, and the previously
> written abbrev file format is documented as obsolete, so now is as
> good a time as any.

I think it would be helpful to have a basic test to ensure we preserve
round-tripping.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Sat, 27 Jan 2018 02:49:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <vianchielfaura <at> gmail.com>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 29924 <at> debbugs.gnu.org
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Fri, 26 Jan 2018 18:48:02 -0800
On Fri, Jan 26, 2018 at 6:12 PM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:
> Allen Li <vianchielfaura <at> gmail.com> writes:
>
>> Apologies, the original patch is incorrect because define-abbrev
>> requires passing :count as a keyword argument unlike the obsolete
>> calling convention.
>>
>> Attached is a new patch, which unfortunately does not preserve the old
>> abbrev file writing format. However, any recent version of Emacs will
>> be able to accept this format for define-abbrev, and the previously
>> written abbrev file format is documented as obsolete, so now is as
>> good a time as any.
>
> I think it would be helpful to have a basic test to ensure we preserve
> round-tripping.

What round-tripping are you referring to?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Sat, 27 Jan 2018 12:20:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Allen Li <vianchielfaura <at> gmail.com>
Cc: 29924 <at> debbugs.gnu.org
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Sat, 27 Jan 2018 07:19:51 -0500
Allen Li <vianchielfaura <at> gmail.com> writes:

>> I think it would be helpful to have a basic test to ensure we preserve
>> round-tripping.
>
> What round-tripping are you referring to?

I meant writing the abbrevs out and then reading them back again should
end up with the same set of abbrevs, which should make a good test case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Tue, 30 Jan 2018 21:50:01 GMT) Full text and rfc822 format available.

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

From: Allen Li <vianchielfaura <at> gmail.com>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 29924 <at> debbugs.gnu.org
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Tue, 30 Jan 2018 13:49:21 -0800
There is already an ERT test for the roundtrip "write, read, compare
read to original"

On Sat, Jan 27, 2018 at 4:19 AM, Noam Postavsky
<npostavs <at> users.sourceforge.net> wrote:
> Allen Li <vianchielfaura <at> gmail.com> writes:
>
>>> I think it would be helpful to have a basic test to ensure we preserve
>>> round-tripping.
>>
>> What round-tripping are you referring to?
>
> I meant writing the abbrevs out and then reading them back again should
> end up with the same set of abbrevs, which should make a good test case.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Thu, 01 Feb 2018 02:13:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Allen Li <vianchielfaura <at> gmail.com>
Cc: 29924 <at> debbugs.gnu.org
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Wed, 31 Jan 2018 21:12:34 -0500
Allen Li <vianchielfaura <at> gmail.com> writes:

> There is already an ERT test for the roundtrip "write, read, compare
> read to original"

Ah, so there is.  We should add one testing with abbrev properties then.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Fri, 16 Feb 2018 05:41:02 GMT) Full text and rfc822 format available.

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

From: Allen Li <vianchielfaura <at> gmail.com>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 29924 <at> debbugs.gnu.org
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Fri, 16 Feb 2018 05:40:35 +0000
[Message part 1 (text/plain, inline)]
On Wed, Jan 31, 2018 at 6:12 PM Noam Postavsky <
npostavs <at> users.sourceforge.net> wrote:

> Allen Li <vianchielfaura <at> gmail.com> writes:

> > There is already an ERT test for the roundtrip "write, read, compare
> > read to original"

> Ah, so there is.  We should add one testing with abbrev properties then.

Sorry for the delay.  The attached patch contains a test along with the
change.  I have also added a NEWS entry; apologies if I did it wrong.
[0001-Preserve-special-abbrev-properties-when-writing.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#29924; Package emacs. (Sat, 17 Feb 2018 14:12:02 GMT) Full text and rfc822 format available.

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

From: Noam Postavsky <npostavs <at> gmail.com>
To: Allen Li <vianchielfaura <at> gmail.com>
Cc: 29924 <at> debbugs.gnu.org, Noam Postavsky <npostavs <at> users.sourceforge.net>
Subject: Re: bug#29924: [PATCH] Preserve special abbrev properties when writing
Date: Sat, 17 Feb 2018 09:11:37 -0500
tags 29924 fixed
close 29924 27.1
quit

Allen Li <vianchielfaura <at> gmail.com> writes:

> Sorry for the delay.  The attached patch contains a test along with the
> change.  I have also added a NEWS entry; apologies if I did it wrong.

Thanks, pushed to master.

[1: 0f5cc9a085]: 2018-02-17 08:47:20 -0500
  Preserve special abbrev properties when writing
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0f5cc9a085565c4f6d6d7e124a8b2965d8800ae5




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 17 Feb 2018 14:12:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 27.1, send any further explanations to 29924 <at> debbugs.gnu.org and Allen Li <vianchielfaura <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sat, 17 Feb 2018 14:12:03 GMT) Full text and rfc822 format available.

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

This bug report was last modified 6 years and 40 days ago.

Previous Next


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