> Revision 1608 contains a new nodeActions plugin, modeled after the old
> FileActions plugin, designed to invoke a script when a node is double
> clicked based on a pattern match to the node's headline.
Have you check act-on-node? Seems like this is a special case of the
very same thing (which mostly proves that it's a good idea ;-).
--
Ville M. Vainio
http://tinyurl.com/vainio
> Concerning the overlap between these two plugins, I think you may be
> the best one to evaluate that. Review the documentation on the
> nodeActions plugin and let me know what you think.
I think nodeActions should be implemented as act-on-node hander. That
is, loading the nodeActions plugin should register one function to
check whether the active node matches one of the sought-after patterns
and dispatch the wanted node.
I can do the work on nodeActions for this. It will serve as a nice example :-)
The whole point of act-on-node is making plugins co-operate on
"default action", so nodeActions can still play nice even if another
active plugin is interested in icon doubleclick activity.
> > Concerning the overlap between these two plugins, I think you may be
> > the best one to evaluate that. Review the documentation on the
> > nodeActions plugin and let me know what you think.
>
> I think nodeActions should be implemented as act-on-node hander. That
> is, loading the nodeActions plugin should register one function to
> check whether the active node matches one of the sought-after patterns
> and dispatch the wanted node.
>
> I can do the work on nodeActions for this. It will serve as a nice
> example :-)
>
> The whole point of act-on-node is making plugins co-operate on
> "default action", so nodeActions can still play nice even if another
> active plugin is interested in icon doubleclick activity.
TL has been talking to me off list about mods to active_path, and if I
understand correctly he'd would like to see active_path support a
@setting to stop it gobbling double-clicks on *file* nodes, so that
open_with still works.
This is exactly the kind of conflict (between plugins :-) we've been
discussing, and I still don't see how act-on-node would help. How is
active_path supposed to know the user wants active_path to step aside
in favor of open_with?
If active_path and open_with both published commands to do what they
do, TL could bind them to whatever he wanted, open_with on double-click
and active_path on alt-click or ctrl-space, or whatever.
This also sidesteps the problem that TL wants increased granularity in
active_path's view of nodes it understands. I.e. a "do what you do to
this node, *unless* it's a file node" action, as well as it's existing
"do what you do to this node" action.
You can of course get 5 and even 7 button mice...
Cheers -Terry
> This is exactly the kind of conflict (between plugins :-) we've been
> discussing, and I still don't see how act-on-node would help. How is
> active_path supposed to know the user wants active_path to step aside
> in favor of open_with?
Well, it never should IMO. A context-sensitive action (active_path)
should always take precedence over a plugin applicable to all nodes
(open_with).
> If active_path and open_with both published commands to do what they
> do, TL could bind them to whatever he wanted, open_with on double-click
> and active_path on alt-click or ctrl-space, or whatever.
Nothing is preveting from still doing it. act-on-node won't prevent
anything (unless that's the sole interface a plugin provides).
> This also sidesteps the problem that TL wants increased granularity in
> active_path's view of nodes it understands. I.e. a "do what you do to
> this node, *unless* it's a file node" action, as well as it's existing
> "do what you do to this node" action.
Providing this kind of granularity is what act-on-node easily
provides. I do think act-on-node is a very bad fit for open-with
plugin, event though I still disagree about active_path ;-)
> A context-sensitive action (active_path)
> should always take precedence over a plugin applicable to all nodes
> (open_with).
But very often active_path's context will be essentially the whole
file. You're working in directory X, you have @path X at the root of
the tree, active_path thinks it has something to offer for every node
in the tree. And TL wants to use open_with specifically withing an
active_path context.
> > If active_path and open_with both published commands to do what they
> > do, TL could bind them to whatever he wanted, open_with on
> > double-click and active_path on alt-click or ctrl-space, or
> > whatever.
>
> Nothing is preveting from still doing it. act-on-node won't prevent
> anything (unless that's the sole interface a plugin provides).
True, of course.
> > This also sidesteps the problem that TL wants increased granularity
> > in active_path's view of nodes it understands. I.e. a "do what you
> > do to this node, *unless* it's a file node" action, as well as it's
> > existing "do what you do to this node" action.
>
> Providing this kind of granularity is what act-on-node easily
> provides. I do think act-on-node is a very bad fit for open-with
> plugin, event though I still disagree about active_path ;-)
I don't see how act-on-node helps with the granularity. Normal use of
active_path is to act on both directory and file nodes. TL wants to
target directories only. If active_path published a command to do what
it does that could be easily bound at will to whatever the user found
convenient, the granularity comes for free based on which binding the
user activates. I can't see how act-on-node would deal with this, or
with the open_with / active_path conflict in general.
Cheers -Terry