Proposal: remove emacs-style abbreviation commands

41 views
Skip to first unread message

Edward K. Ream

unread,
May 3, 2016, 10:17:06 AM5/3/16
to leo-editor
Does anyone use the static abbrev-* commands? I can see no use for them.

The abbreviations in `@data abbreviations` nodes, and especially '@outline-data tree-abbreviations' seem much more useful. I would like to moot #236 by eliminating these commands.

Your comments, please.

Edward

john lunzer

unread,
May 3, 2016, 10:37:16 AM5/3/16
to leo-editor
I use abbreviations but have never used an abbrev-* command. I am unsure of their function.

Edward K. Ream

unread,
May 4, 2016, 4:39:26 PM5/4/16
to leo-editor
On Tuesday, May 3, 2016 at 9:17:06 AM UTC-5, Edward K. Ream wrote:
Does anyone use the static abbrev-* commands? I can see no use for them.

The abbreviations in `@data abbreviations` nodes, and especially '@outline-data tree-abbreviations' seem much more useful. I would like to moot #236 by eliminating these commands.

I haven't heard any howls of protest, so rev 1b2536c2 provisionally removes them.  From the checkin log:

Removed seldom (never?) used emacs-style abbreviation commands:
abbrev-add-global, abbrev-inverse-add-global, abbrev-read, abbrev-write.

These are still in the code base, disabled with:

if 0:
     
@others

We'll see whether anyone is affected. In the meantime, I am going to close #236, which is mooted as a result.

EKR

Terry Brown

unread,
May 4, 2016, 5:41:09 PM5/4/16
to leo-e...@googlegroups.com
On Wed, 4 May 2016 13:39:26 -0700 (PDT)
"Edward K. Ream" <edre...@gmail.com> wrote:

> On Tuesday, May 3, 2016 at 9:17:06 AM UTC-5, Edward K. Ream wrote:
> >
> > Does anyone use the static abbrev-* commands? I can see no use for
> > them.
> >
> > The abbreviations in `@data <https://github.com/data>
> > abbreviations` nodes, and especially '@outline-data
> > tree-abbreviations' seem much more useful. I would like to moot
> > #236 <https://github.com/leo-editor/leo-editor/issues/236> by
> > eliminating these commands.
>
> I haven't heard any howls of protest, so rev 1b2536c2 provisionally
> removes them. From the checkin log:

Sorry to be slow in responding.

Unless I'm getting them confused with other commands, I think
some of these are useful.

Or to put it another way, I think there should at least be a command to
add an abbreviation at run time, one that works by having you select
the text to be abbreviated and then, when the command's run, prompt for
an abbreviation for it.

Use case is writing prose with repetitions of
annoyingly long words (looking at you,
pneumonoultramicroscopicsilicovolcanoconiosis) or expressions.

It would be nice to be able to make the abbreviations added "manually"
in the current session permanent, although maybe that's secondary, if
you're using something a lot just edit
~/.leo/myLeoSettings.leo#@settings-->@data abbreviations, but losing
the ability to add an abbreviation on the fly seems like a regrettable
loss.

Cheers -Terry

> Removed seldom (never?) used emacs-style abbreviation commands:
> > abbrev-add-global, abbrev-inverse-add-global, abbrev-read,
> > abbrev-write.
> >
> > These are still in the code base, disabled with:
> >
> > if 0:
> > @others
>
> We'll see whether anyone is affected. In the meantime, I am going to
> close #236 <https://github.com/leo-editor/leo-editor/issues/236>,

john lunzer

unread,
May 4, 2016, 7:22:40 PM5/4/16
to leo-editor
I didn't even know we could add abbreviations on the fly!

Edward K. Ream

unread,
May 5, 2016, 5:14:44 AM5/5/16
to leo-editor
On Wed, May 4, 2016 at 4:41 PM, 'Terry Brown' via leo-editor <leo-e...@googlegroups.com> wrote:
On Wed, 4 May 2016 13:39:26 -0700 (PDT)
"Edward K. Ream" <edre...@gmail.com> wrote:

Unless I'm getting them confused with other commands, I think
some of these are useful.

​The question is, have you ever actually used them.​
 

Or to put it another way, I think there should at least be a command to
add an abbreviation at run time, one that works by having you select
the text to be abbreviated and then, when the command's run, prompt for
an abbreviation for it.

​A separate, and reasonable question.

Imo, this would best work by altering @data nodes, not some separate, almost-never-used external file.  In other words, I want *one* way to handle abbreviations.  I don't want to make the almost-never-used abbreviation scheme compatible with the excellent scheme you created. I want to kill the inferior scheme and its attendant inferior commands :-)

Edward

Terry Brown

unread,
May 5, 2016, 10:26:51 AM5/5/16
to leo-e...@googlegroups.com
On Thu, 5 May 2016 04:14:42 -0500
"Edward K. Ream" <edre...@gmail.com> wrote:

> On Wed, May 4, 2016 at 4:41 PM, 'Terry Brown' via leo-editor <
> leo-e...@googlegroups.com> wrote:
>
> > On Wed, 4 May 2016 13:39:26 -0700 (PDT)
> > "Edward K. Ream" <edre...@gmail.com> wrote:
>
> Unless I'm getting them confused with other commands, I think
> > some of these are useful.
>
> ​The question is, have you ever actually used them.​

Well, I think I've used abbreviation-add-global...

> Or to put it another way, I think there should at least be a command
> to
> > add an abbreviation at run time, one that works by having you select
> > the text to be abbreviated and then, when the command's run, prompt
> > for an abbreviation for it.
>
> ​A separate, and reasonable question.

...because I've certainly added abbreviations this way on the fly.

> Imo, this would best work by altering @data nodes, not some separate,
> almost-never-used external file. In other words, I want *one* way to
> handle abbreviations. I don't want to make the almost-never-used

Agree 100%, wasn't aware there was some bifurcation in the
implementation there. Like I say, I've used (I assume)
abbreviation-add-global to create a temporary abbreviation (like the
joke says, why is abbreviation such a long word?) but none of the
read/write machinery to make it permanent, don't know how that works
vs. additions to @data nodes.

Cheers -Terry

Edward K. Ream

unread,
May 6, 2016, 7:39:06 AM5/6/16
to leo-editor
On Thu, May 5, 2016 at 9:26 AM, 'Terry Brown' via leo-editor <leo-e...@googlegroups.com> wrote:
 
> Imo, this would best work by altering @data nodes, not some separate,
> almost-never-used external file.  In other words, I want *one* way to
> handle abbreviations.  I don't want to make the almost-never-used

Agree 100%, wasn't aware there was some bifurcation in the
implementation there. 

​Good.  Feel free to experiment with adding abbreviations (good joke) dynamically, with perhaps a new command to update/save the appropriate settings file.

BTW, there is a documentation Easter Egg in leoConfig.py: the '# unusual' comment highlights four kinds of settings that are handled differently
@buttons, @commands, @enabled-plugins and recent files stuff.

I mention this because I didn't remember whether the @data *abbrev* stuff was 'unusual'.  Apparently it is not.

In short, fire away if you like.  There seems to be no need to reopen #236.

EKR
Reply all
Reply to author
Forward
0 new messages