unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Uwe Brauer <oub@mat.ucm.es>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Uwe Brauer <oub@mat.ucm.es>, Robert Pluim <rpluim@gmail.com>,
	45693@debbugs.gnu.org
Subject: bug#45693: [two word expansion works, but write-abbrev-file destroys it] (was: bug#45693: 28.0.50; abbrev does not expand two words any more)
Date: Sun, 10 Jan 2021 22:21:11 +0100	[thread overview]
Message-ID: <87eeis1oag.fsf_-_@mat.ucm.es> (raw)
In-Reply-To: <87v9cam56e.fsf@mat.ucm.es>

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

>>> "LI" == Lars Ingebrigtsen <larsi@gnus.org> writes:

> Uwe Brauer <oub@mat.ucm.es> writes:
>> I am trying to set up a recipe to reproduce that behavior. If I do that,
>> should I open a new bug or just post it here?

> Just post it here.

The solution posted by Robert Pluim allows a two word expansion but will
be destroyed by write-abbrev-file

Step to reproduce the issue.

    1. Start emacs -Q (using master commit  "84ec57fe06e187f41a3546131d5dae3b185c3511")

    2. Create an abbrev file (see attachment) called .abbrev-doble_defs
       that contain 
       (define-abbrev-table 'fundamental-mode-abbrev-table
      '(
        ("asi" "así" nil :count 0)))

        (define-abbrev-table 'my-abbrev-table
      '(
        ("a que" "a qué" nil :count 0))
      "Uwe's table"
      :regexp "\\(\\w+ \\w+\\)")

    3. Load files with the following lines
       (setq abbrev-file-name "~/ALLES/HGs/init_files/Abbrev-Doble/.abbrev-new_defs")
       (read-abbrev-file "~/ALLES/HGs/init_files/Abbrev-Doble/.abbrev-double_defs")
       (setq-default abbrev-mode t)
       Or any other path that is convenient.

    4. Open new file in fundamental mode, say called new
       execute in that file
       (setq local-abbrev-table (list my-abbrev-table fundamental-mode-abbrev-table))

       Then asi--> así
       and 
       a que--> a quë

    5. (write-abbrev-file "~/ALLES/HGs/init_files/Abbrev-Doble/.abbrev-new_defs")

The part 
        (define-abbrev-table 'my-abbrev-table
      '(
        ("a que" "a qué" nil :count 0))
      "Uwe's table"
      :regexp "\\(\\w+ \\w+\\)")

Is gone!

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5673 bytes --]

  parent reply	other threads:[~2021-01-10 21:21 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-06 15:54 bug#45693: 28.0.50; abbrev does not expand two words any more Uwe Brauer
2021-01-10 14:35 ` Lars Ingebrigtsen
2021-01-10 15:51   ` Uwe Brauer
2021-01-10 15:52     ` Lars Ingebrigtsen
2021-01-10 17:22       ` Uwe Brauer
2021-01-10 21:21       ` Uwe Brauer [this message]
2021-01-11 10:49         ` bug#45693: [two word expansion works, but write-abbrev-file destroys it] Robert Pluim
2021-01-11 15:26           ` Eli Zaretskii
2021-01-11 15:50             ` Uwe Brauer
2021-01-11 17:38               ` Robert Pluim
2021-01-11 20:17                 ` Uwe Brauer
2021-01-11 20:38                   ` Robert Pluim
2021-01-11 20:48                     ` Uwe Brauer
2021-01-11 21:03                       ` Robert Pluim
2021-01-12  8:01                         ` Uwe Brauer
2021-01-12 10:34                           ` Robert Pluim
2021-01-12 13:26                             ` Uwe Brauer
2021-01-12 16:45                             ` Uwe Brauer
2021-01-12 17:59                               ` Robert Pluim
2021-01-13  7:37                                 ` Uwe Brauer
2021-01-13  9:16                                   ` Robert Pluim
2021-01-13  9:28                                     ` Uwe Brauer
2021-01-13  9:39                                       ` Robert Pluim
2021-01-13  9:51                                         ` Uwe Brauer
2021-01-13 10:09                                           ` Robert Pluim
2021-01-13 13:18                                             ` Uwe Brauer
2021-01-13 14:03                                               ` Robert Pluim
2021-01-13 16:25                                                 ` Uwe Brauer

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=87eeis1oag.fsf_-_@mat.ucm.es \
    --to=oub@mat.ucm.es \
    --cc=45693@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=rpluim@gmail.com \
    /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).