On Wednesday, January 4, 2012 11:05:47 PM UTC+7, Terry wrote:
>
>
> Hmm, for a given node type, you want all the actions that make sense
> for that node type in a user ordered list, and then some action (double
> click?) causes the one highest on the list to occur?
>
> Yes, with some minor clarifications:
For a given node type, all actions for any node in a - to start with system
default - ordered list - just one list.
- note that the ordering idea is just one way to indicate priority -
perhaps a syntax-driven numeric weighting scheme would be easier to
implement
- this list also provides the mechanism for controlling the right-click
syntax options
A syntax-specified "filter" for each action indicates for which node types
it makes sense, perhaps allowing for an "all except these" syntax also.
A double-click on a given node - assuming Leo continues to not distinguish
between them?
triggers the highest-priority action that is applicable to that node.
> I don't think we'll get there any time soon,
>
I'm simply trying to help map out a way forward, having an agreed
conceptual target to aim for would be a good first step.
> most commands / plug-ins which provide commands rely on the user to say
> "this command is relevant to this node", by explicitly running the command
> on the node.
>
Only those plugins that aspire to mouse-click-triggered actions need apply.
So there's no general method for having plugins identify whether the
> commands they provide are relevant.
>
A specification for such a method would need to be part of this process.
> act-on-node sort of addresses this, but it's not widely used, and many
> plugins provide multiple actions, so the user would still have to pick.
>
My understanding is that act-on-node's method attempts a "best-guess"
scenario that relies on developer-set priorities rather than enabling user
control?
> - it would be easy enough to provide a setting which adds command
> bindings as context menu entries, if that helps
>
Did you mean something more than this in myLeoSettings.leo?
@data contextmenu_commands
# stickynote Create a sticky note
# read-at-file-nodes Read file node
delete-node Simple Delete
Improvements on this would include the ability to override or delete the
ones currently "baked in".
I've since learned (accurately?) that @command nodes will allow
user-defined scripts to be included in the list.
- having Leo "do something sensible" with *url* nodes is a different
> issue, basically Leo will / should just tell the OS to "do something
> sensible" with the URL.
>
Is my understanding correct that @URL works like this now? Assuming you
have your default browser's MIME/filetype associations set up correctly. . .
Currently my only added plugin is active_path, which I'm very happy with.
Planning to check out the various "file launching" capabilities next,
including
- experimenting with @URL for this, comparing with @MIME - would you say
the below is still accurate?
- use @url for opening URLs
- use @mime nodes for opening files on the local file system.
- if necessary, trying to figure out node-actions and file-actions
- if necessary, adapting something like this
<https://groups.google.com/d/msg/leo-editor/rq7LlNc6QNI/quM9Un9BNwEJ>to
trigger batch files
- but looks like I'll need to figure out some Python to pass the
filename from the
@file<http://webpages.charter.net/edreamleo/scripting.html#working-with-directives-and-paths>spec
I also plan to try the Vim integration - I believe Leo doesn't handle block
selection (ie column-mode)?
>From a Leo-usability POV, I'll be curious to see how my context menu and
click events evolve over that process.
But I also plan to stick to keyboard-based triggers as much as possible,
seems most consistent and productive. . .
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/leo-editor/-/eGs8BQhB6isJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.