ENB: Ahas re finding definitions

22 views
Skip to first unread message

Edward K. Ream

unread,
May 26, 2024, 7:02:37 AMMay 26
to leo-editor
Issue #3871 has been languishing for months. This Engineering Notebook post explains three Ahas that show the way forward.

The conundrum

Control-clicking on a name searched for the definition of the name. To do this, the original code modified our search settings. I imagined this behavior to be essential because we want to be able to continue searching using F2 and F3. But there is no easy way to restore the search settings! This disruption of our preferences is an annoying hangnail.

The Ahas

Aha 1: Use bespoke search code that doesn't use Leo's search settings. This code will be straightforward. Unlike general searches, finding definitions will search only  body text.

Aha 2: Allow the searches to return multiple results. There is no need for follow-on searches!

Leo will work as before if there is only one result. If there are multiple results, control-clicking can show those results either:

- As cloned nodes, as in the clone-find command.
- As a single summary node (with clickable links) as in the find-all command.

A new user setting will specify the default. A new toggle command will toggle the current value of the setting.

Aha 3: Let the top-level results node (of either type) tell the user about the new setting and the command to change it.

Summary

These Ahas constitute a new design pattern for searches. Control-clicks on a symbol will show the user all the search results.

#3871 will be part of Leo 6.8.0 beta 1.

Edward

Edward K. Ream

unread,
May 26, 2024, 7:10:16 AMMay 26
to leo-editor
On Sunday, May 26, 2024 at 6:02:37 AM UTC-5 Edward K. Ream wrote:

> Aha 3: Let the top-level results node (of either type) tell the user about the new setting and the command to change it.

On second thought, delivering multiple results as cloned nodes (as in the the clone-find command) should suffice. The find-all command delivers results in a less permanent and less pleasant format.

Using a single results format eliminates the need for new settings or commands. If somebody thinks differently, they can always create a PR :-)

Edward

Thomas Passin

unread,
May 26, 2024, 8:39:19 AMMay 26
to leo-editor
I don't like returning the results as cloned nodes.  That changes the outline, and a search should not do that.  The search will change the focus to the new cloned results, which is distracting and unexpected. And later the user has to remember to find and delete those clones without accidentally deleting something that should remain.

The format used by the Nav tab is ideal (and highly readable, better than cloning nodes) and that's what I would greatly prefer.  No need for a new setting and setting-toggle command, no need to step from one instance to the next or back, no need to insert any new nodes.   Perfect.

Edward K. Ream

unread,
May 26, 2024, 1:42:11 PMMay 26
to leo-e...@googlegroups.com
On Sun, May 26, 2024 at 7:39 AM Thomas Passin <tbp1...@gmail.com> wrote:
I don't like returning the results as cloned nodes.  That changes the outline, and a search should not do that.  The search will change the focus to the new cloned results, which is distracting and unexpected. And later the user has to remember to find and delete those clones without accidentally deleting something that should remain.

The format used by the Nav tab is ideal (and highly readable, better than cloning nodes) and that's what I would greatly prefer.  No need for a new setting and setting-toggle command, no need to step from one instance to the next or back, no need to insert any new nodes. 

Thanks for your comments. Let me think about this.

Edward

Edward K. Ream

unread,
May 26, 2024, 1:51:56 PMMay 26
to leo-editor
On Sunday, May 26, 2024 at 12:42:11 PM UTC-5 Edward K. Ream wrote:

> I don't like returning the results as cloned nodes...The Nav tab is better.

I'm going to do the following:

- Use the Nav tab If the quicksearch plugin is active.
- Otherwise use clones.

That should make most people happy without the need for more settings or commands.

Edward

Thomas Passin

unread,
May 26, 2024, 3:01:01 PMMay 26
to leo-editor
D'accord.
Reply all
Reply to author
Forward
0 new messages