[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SOLVED] emacs problem: M-x write-abbrev-file does not seem to work.





On Thu, Mar 19, 2020 at 1:57 PM davidson <davidson@freevolt.org> wrote:
On Thu, 19 Mar 2020, davidson wrote:
> On Wed, 18 Mar 2020, Default User wrote:
[snip]

>> dummy@dummy:~$ sudo aptitude show emacs
>> [sudo] password for default:
>
> Just FYI, it would greatly surprise me if you actually needed root
> privileges for aptitude's "show" command. I wager you could get the
> same information with
>
>  dummy@dummy:~$ aptitude show emacs
>
> and save yourself a password entry.
>
> (I am wagering, not promising, because I use apt-get exclusively,

*apt-get and apt-cache

> never aptitude.)
[big snip]

> Then, in emacs, do
>
> M-x info
>
> This brings up a menu of info documentation properly installed on your
> system. You'll want to traverse "Emacs" > "Abbrevs".

I now see that GW Haywood has already pointed you to a version of the
same document, posted on the web:

   [🔎] alpine.DEB.2.21.2003191433310.9593@piplus.local.jubileegroup.co.uk" rel="noreferrer" target="_blank">https://lists.debian.org/msgid-search/[🔎] alpine.DEB.2.21.2003191433310.9593@piplus.local.jubileegroup.co.uk

--
  The day will come              |  Last words, August Spies (1855--1887).
  When our silence will be       |  Hanged, by the U.S. state of Illinois,
  More powerful than             |  alongside fellow journalists
  The voices you strangle today  |  Adolf Fischer and Albert Parsons.


Davidson, thank you for the link to the information.

1)  Yes,  "dummy@dummy:~$ aptitude show emacs" does work just fine. I guess I just got into the habit of using "sudo" more than I really need to.

2)  The book is Second Edition (1996).  Almost a quarter of a century old, but still quite useful, especially for a "mature" program like Emacs. 

3)  I do have "emacs-common-non-dfsg" installed, and do have "non-free" in my /etc/apt/sources.list.  I do use "info" from time to time, but I more often use man pages, or just search online. 

4)  The problem has been SOLVED. 
I believe it was due to the insistence on Emacs on using 
~/.emacs.d/abbrev_defs to store the saved abbreviations, instead of 
~/.abbrev_defs as suggested in the book.  
I am guessing this is due to the change in recent years to using ".d" supplemental directories. 

The fix was to change a section of".emacs" from this (in the book):

(setq-default abbrev-mode t)
(read-abbrev-file "~/.abbrev_defs")
(setq save-abbrevs t)

to this:

(setq-default abbrev-mode t)
(setq save-abbrevs t)
(setq abbrev-file-name  "~/.emacs.d/abbrev_defs") ;; tell emacs where to read abbrev definitions from . . .
;; (read-abbrev-file "~/.emacs.d/abbrev_defs") This line may be obsolete [from "Learning GNU Emacs"]

[Note: it seems to work either with or without (read-abbrev-file "~/.emacs.d/abbrev_defs") being commented out].

So now "M-x write-abbrev-file" does seem to save the edited abbreviations as it was supposed to all along. 

I had mentioned that it was possible to manually edit ~/.emacs.d/abbrev_defs to remove the entry, and then save ~/.emacs.d/abbrev_defs, as a work-around. 

But if I should be able "To delete any abbreviation, delete the line for that abbreviation and save the file by
typing M-x write-abbrev-file.", then I should be able to do so. 

Anyway, problem solved.
Thanks to all for the help. 





Reply to: