Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search in tomboy-ng #211

Closed
monperrus opened this issue Dec 4, 2020 · 18 comments
Closed

Search in tomboy-ng #211

monperrus opened this issue Dec 4, 2020 · 18 comments

Comments

@monperrus
Copy link
Contributor

I'm gradually using tomboy-ng, esp because of a blocker bug in tomboy related to search

A key feature of tomboy is to be able to open the search window. This is typically done with Alt-F12 configured in the window manager.

What's the command to open the search window of an already running tomboy-ng instance?

Thanks!

@davidbannon
Copy link
Member

Now, you don't mean search within the open note ? Thats right click for a popup menu or Ctrl-F.

I think you mean searching through all notes ? There is no keyboard shortcut for that at present, you click the Menu button that exists on the main tomboy-ng windows and Search is one of the menu options. Or you click the Tray Icon, get the same menu.

I guess it could be added as a keyboard shortcut, I am a bit nervious of adding 'global' shortcuts like that because of the risk of them going to the wrong application - you prefer the keyboard approach rather than mouse and menu ?

Davo

@monperrus
Copy link
Contributor Author

Thanks for your answer.

you prefer the keyboard approach rather than mouse and menu ?

exactly

for the window manager, we need a command line like tomboy --search --instance

  • --search to tell tomboy-ng to open the search UI
  • --instance to tell tomboy-ng to not open a new process but to reuse the existing one (inspired from thunderbird)

@davidbannon
Copy link
Member

If you already have an instance running, attempting to open another instance will always open a search window of the existing instance.

So, you could say that tomboy-ng [enter] is the same as tomboy --search --instance [enter] if you already have an instance running. And you can set tomboy-ng to open the search window at startup for the case where you don't already have an instance running.

;-)

Davo

Davo

@monperrus
Copy link
Contributor Author

I confirm that configuring my window manager to simply call tomboy-ng does what's expected.

Closing.

Thanks a lot Davo

@monperrus
Copy link
Contributor Author

It seems that the input field is not selected by default, and thus a mouse-only workflow is not completely smooth.

Would it be possible to always select the input text field when calling tomboy-ng?

Thanks Davo!

@davidbannon
Copy link
Member

Which input field is that monperrus ?

The search term in the search form ? In my case that has focus when its first opened ?

How about outlining your work flow for me so I can try it here ?

Davo

@monperrus
Copy link
Contributor Author

The desired workflow is simple: Alt-F12 -> start typing my search expression

With tomboy-ng 0.30, it is Alt-F12 -> click on text field -> start typing my search expression or Alt-F12 -> tab -> start typing my search expression (which is already quite good)

@davidbannon
Copy link
Member

OK, I am unsure about the Alt-12, I don't think that does anything in -ng, have you mapped Alt-12 to start a tomboy-ng instance ?

Anyway, it does not matter, I do know what the problem is. The search form, when it first opens, moves focus to the search field. But not when its just a re-show event. The Search Form is never 'closed', just hidden. So, when you re-show, it leaves focus where ever you last had it.

Easily fixed, I now move focus to the search field every time its re-shown. Pretty sure thats what you want.

New version out very soon, will be there !

Davo

@monperrus
Copy link
Contributor Author

monperrus commented Dec 10, 2020 via email

@monperrus monperrus changed the title Alt-F12 for search in tomboy-ng? Search in tomboy-ng Dec 11, 2020
@monperrus
Copy link
Contributor Author

Hi Davo,

Still about search, a very useful of tomboy is as as follows: when you search for a term and click on a result, it opens the note at the line number of the first occurrence of {term} and highlights it.

AFAIU, in tomboy-ng, one needs to search twice (first in the global search box, then at the note level)

WDYT?

Thanks!

@monperrus monperrus reopened this Dec 11, 2020
@davidbannon
Copy link
Member

Well, if I recall correctly, when you click on a note after a global search, the note opens with the cursor on the first found item in that note. Is that not what you see ?
Maybe the issue is it does not do that 'local first search' if the note was already opened ? And it certainly does not 'prime' the local search engine so you can immediately find the second and subsquent incidence of the search term in the note.

I do have a few other things that need be improved in the search tool. The 'local search', within a note, relies on some Lazarus library tools, it does not do search and replace and the search direction tools are quite erratic. So, some further work is needed there. So, lets pin down exactly what you are experiencing so I can get a good spec in mind before I start.

And would a more modern approach to searching help ? Like when you do a web search, you get a handful of words around each search term found so you ensure you go to the one you actually want ?

Davo

@monperrus
Copy link
Contributor Author

I confirm that the behavior is different whether the note is already opened or not.

When the note is not opened, search works as expected (cursor set and search term highlighted).

However, when the note is already opened, the limitation is there: the cursor is not moved and the search term is not highlighted.

@davidbannon
Copy link
Member

Yeah, that makes sense. Should be quite fixable.
Davo

@davidbannon
Copy link
Member

OK, it now jumps to first valid seach term in the note whether the note is open or not.

(Incidentally, Alt-F will now continue the search at this stage too now, you don't need to open the local search box.)

@monperrus
Copy link
Contributor Author

monperrus commented Jan 22, 2021 via email

@davidbannon
Copy link
Member

Pre-release version now available that addressed this issue. Please see https://github.com/tomboy-notes/tomboy-ng/releases/tag/v0.31
If you do use it, please watch for anything unexpected and please report what you find, good or bad.

@monperrus
Copy link
Contributor Author

monperrus commented Jan 29, 2021 via email

@davidbannon
Copy link
Member

OK, as noted, 0.32 has a much nicer Find model.
Thanks for reporting.

Davo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants