On Mon, 27 Apr 2015 18:58:08 -0500
"Edward K. Ream" <[email protected]> wrote:

> On Mon, Apr 27, 2015 at 2:48 PM, john lunzer <[email protected]> wrote:
> 
> > Terry, this is obvious but I've found one letter abbreviations to
> > be a nuisance. For example Edwards recent example of e;; is not
> > compatible with date;;
> >
> 
> ​This is a bug which I'll fix asap.  The abbreviation matcher should
> prefer the longest match.  It's probably one or two lines of code.

a) what's with this thing where I keep getting replies before seeing
the original - in this case Edward's reply before any sign of John's
response.

b) yes, that would be worth fixing

c) the real content in this email ;-) once you define @data
abbreviations and / or @data abbreviations-subst-env in
myLeoSettings.leo, you're isolated, for better or worse, from updates
to these nodes in LeoSettings.leo.  With single node @settings like
@int and @string the answer has always been only define the minimum in
myLeoSettings.leo, so you'll still benefit from updates in
LeoSettings.leo.

But that doesn't help with @data nodes which essentially contain lots
of settings.  @data qt-gui-user-style-sheet is a work around for @data
qt-gui-plugin-style-sheet, the former just being appended to the latter.

Also we now have @data nodes built from all their children, although I
don't see any direct application for that.

So what I'm wondering, is how to allow personal extensions to
multi-setting @data settings.

i) just define a @data qt-gui-plugin-style-sheet + @data
qt-gui-user-style-sheet kind of pair in every case, simple but seems a
bit clumsy.

ii) Have an @inherit directive which pulls in the content of
LeoSettings.leo @data abbreviations at the beginning of
myLeoSettings.leo @data abbreviations.  Not sure how hard that would be
implement.

iii) Have something even more flexible, like `@include UNL` to pull the
content of any node in any file into a @data node.

I guess the first question is how many cases are there where this is an
issue.

@data qt-gui-plugin-style-sheet - covered already
@data abbreviations
@data abbreviations-subst-env

for nd in p.self_and_subtree():
    if nd.h.startswith('@data ') and len(nd.b) > 200:
        g.es(nd.get_UNL(with_index=False).split('@settings')[1])

...that finds about 10 nodes, including the three already discussed, but
only about four more that would be candidates:

-->Abbreviations-->@data global-abbreviations
-->Menus-->Qt context menu-->@data contextmenu_commands
-->Plugins-->active_path plugin-->@data active_path_ignore
-->Plugins-->wikiview plugin-->@data wikiview-link-patterns

...so maybe (i) is sufficient.  Which would mean adding 
@data abbreviations-user and
@data abbreviations-subst-env-user

Comments?  Appetite for (ii) or (iii)?

Cheers -Terry





-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to