GNU bug report logs - #30737
[patch] global-abbrev-mode

Previous Next

Package: emacs;

Reported by: Alex Branham <alex.branham <at> gmail.com>

Date: Tue, 6 Mar 2018 23:28:01 UTC

Severity: wishlist

Tags: patch, wontfix

Merged with 30531

Found in version 26.0.91

Done: Lars Ingebrigtsen <larsi <at> gnus.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 30737 in the body.
You can then email your comments to 30737 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#30737; Package emacs. (Tue, 06 Mar 2018 23:28:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alex Branham <alex.branham <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 06 Mar 2018 23:28:02 GMT) Full text and rfc822 format available.

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

From: Alex Branham <alex.branham <at> gmail.com>
To: "" <bug-gnu-emacs <at> gnu.org>
Subject: [patch] global-abbrev-mode
Date: Tue, 06 Mar 2018 17:27:05 -0600
[Message part 1 (text/plain, inline)]
It's currently not very clear how we're supposed to turn on abbrev-mode
everywhere. This patch introduces global-abbrev-mode to solve that
particular problem. I've been using this line in my init.el for a few
months without issue.

[0001-lisp-abbrev.el-global-abbrev-mode-new-global-minor-m.patch (text/x-patch, attachment)]

Forcibly Merged 30531 30737. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Tue, 06 Mar 2018 23:35:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30737; Package emacs. (Wed, 07 Mar 2018 17:11:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alex Branham <alex.branham <at> gmail.com>
Cc: 30737 <at> debbugs.gnu.org
Subject: Re: bug#30737: [patch] global-abbrev-mode
Date: Wed, 07 Mar 2018 19:09:48 +0200
> From: Alex Branham <alex.branham <at> gmail.com>
> Date: Tue, 06 Mar 2018 17:27:05 -0600
> 
> It's currently not very clear how we're supposed to turn on abbrev-mode
> everywhere. This patch introduces global-abbrev-mode to solve that
> particular problem. I've been using this line in my init.el for a few
> months without issue.

Does it make sense to have it turned on in every single buffer?  What
major modes do you routinely use?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30737; Package emacs. (Wed, 07 Mar 2018 17:18:02 GMT) Full text and rfc822 format available.

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

From: Alex Branham <alex.branham <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30737 <at> debbugs.gnu.org
Subject: Re: bug#30737: [patch] global-abbrev-mode
Date: Wed, 07 Mar 2018 11:18:29 -0600
On Wed 07 Mar 2018 at 11:09, Eli Zaretskii <eliz <at> gnu.org> wrote:

>> From: Alex Branham <alex.branham <at> gmail.com>
>> Date: Tue, 06 Mar 2018 17:27:05 -0600
>>
>> It's currently not very clear how we're supposed to turn on abbrev-mode
>> everywhere. This patch introduces global-abbrev-mode to solve that
>> particular problem. I've been using this line in my init.el for a few
>> months without issue.
>
> Does it make sense to have it turned on in every single buffer?  What
> major modes do you routinely use?

I use a mix of text modes (auctex, org, etc) and programming modes
(python, ess, etc). I find it useful to have the global abbrev table
collect common spelling mistakes or typos like teh and automatically
correct them to "the".

This was inspired by a blog post[1]. The author there recommends turning
on abbrev-mode everywhere with setq-default, but the doc string
explicitly says not to do that: "Use the command ‘abbrev-mode’ to change
this variable."


Footnotes:
[1]  http://endlessparentheses.com/ispell-and-abbrev-the-perfect-auto-correct.html




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30737; Package emacs. (Wed, 07 Mar 2018 18:05:02 GMT) Full text and rfc822 format available.

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

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alex Branham <alex.branham <at> gmail.com>
Cc: 30737 <at> debbugs.gnu.org
Subject: Re: bug#30737: [patch] global-abbrev-mode
Date: Wed, 07 Mar 2018 20:03:46 +0200
> From: Alex Branham <alex.branham <at> gmail.com>
> Cc: 30737 <at> debbugs.gnu.org
> Date: Wed, 07 Mar 2018 11:18:29 -0600
> 
> > Does it make sense to have it turned on in every single buffer?  What
> > major modes do you routinely use?
> 
> I use a mix of text modes (auctex, org, etc) and programming modes
> (python, ess, etc). I find it useful to have the global abbrev table
> collect common spelling mistakes or typos like teh and automatically
> correct them to "the".

But what if you have a variable in a program called "teh"?  Or, as a
more practical use case, consider this: in a few places in Emacs we
have a variable named "defalt", because using "default" gets in the
way for some reason.  Having this turned on globally will silently
"correct" these variable names, and could cause you real trouble.

This is what I fear.




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

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

From: Alex Branham <alex.branham <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 30737 <at> debbugs.gnu.org
Subject: Re: bug#30737: [patch] global-abbrev-mode
Date: Wed, 07 Mar 2018 13:08:24 -0600
On Wed 07 Mar 2018 at 12:03, Eli Zaretskii <eliz <at> gnu.org> wrote:

> But what if you have a variable in a program called "teh"?  Or, as a
> more practical use case, consider this: in a few places in Emacs we
> have a variable named "defalt", because using "default" gets in the
> way for some reason.  Having this turned on globally will silently
> "correct" these variable names, and could cause you real trouble.

That's a fair worry. Ideally, what I'd like is to be able to use these
frequent misspells in much the same was I can use flyspell such that it
turns on in text modes and in comments in prog-modes. I'm not sure how
to implement that, though.

Maybe we could modify flyspell to do these quick auto-replacements using
its own abbrev table? Or something similar to an abbrev table, since
those are per-major mode...

Alex




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#30737; Package emacs. (Mon, 24 Jun 2019 20:01:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: Alex Branham <alex.branham <at> gmail.com>, 30531 <at> debbugs.gnu.org,
 30737 <at> debbugs.gnu.org
Subject: Re: bug#30737: [patch] global-abbrev-mode
Date: Mon, 24 Jun 2019 22:00:33 +0200
Eli Zaretskii <eliz <at> gnu.org> writes:

> But what if you have a variable in a program called "teh"?  Or, as a
> more practical use case, consider this: in a few places in Emacs we
> have a variable named "defalt", because using "default" gets in the
> way for some reason.  Having this turned on globally will silently
> "correct" these variable names, and could cause you real trouble.
>
> This is what I fear.

Yeah, I don't think a global abbrev mode would be generally useful, so
I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) wontfix. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 24 Jun 2019 20:01:03 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 30531 <at> debbugs.gnu.org and Alex Branham <alex.branham <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 24 Jun 2019 20:01: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. (Tue, 23 Jul 2019 11:24:09 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.