Tweaked the search.kmm for searching AND finding - beta testers needed!
Posted by: SoerenB
Date: February 27, 2010 03:40AM

Hi,

maybe I only did not find a matching config setting, but I found it increasingly annoying to have to initialize, manually, a "find in page" after having searched the web and opened the first page found.

So I added the following lines to my ->macros ->search.kmm, right after the header, to
    [1] open the FindBar
    [2] insert the search term & find

(added lines formatted medium bold italics)



# Consult default engine (default engine is also used when macros are disabled)
Search{
macroinfo=_("Consult the default search engine");
id(ID_EDIT_FIND);
id(ID_EDIT_PASTE);

$_Search_EngineURL==""?$_ ...

Search_PasteAndSearch{
macroinfo=_("Search the Web for Clipboard contents");
id(ID_EDIT_FIND);
id(ID_EDIT_PASTE);

$URLBAR=getclipboard(); &Search;
id(ID_OPEN_LINK_IN_NEW_TAB);
}

# Lock/unlock curr ...



This is on K-M 1.53. My config is set to opening almost anything in new background pages - if yours are not, the last added line may be too much.

Any feedback welcome.

Cheers
SoerenB

KM 1.74b4u1 in Wine 1.6 on Linux Mint 17 (XFCE)
- and still being surprised every day
how easily all of this works ...

Re: Tweaked the search.kmm for searching AND finding - beta testers needed!
Posted by: jsnj
Date: February 27, 2010 04:56AM

You can also use the Highlight function in the Search+ extension smiling smiley It won't work if your searches are set to open in the background though.



Edited 1 time(s). Last edit at 02/27/2010 05:10AM by jsnj.

Re: Tweaked the search.kmm for searching AND finding - beta testers needed!
Posted by: SoerenB
Date: February 27, 2010 07:06AM

Hi, jsnj,

Thanks for that quick reply.
I did not want to install Search+, because I do not need and want more bars and buttons (no search bar here, it is all in the SearchButtons Context menu)

All I wanted was auto-pasting of search terms to the FindBar. That is what my tweak does, and it would harmonize with your new Find in Page Plus, as I explained there. And it works for backgrounded searches,too.

Cheers
SoerenB

KM 1.74b4u1 in Wine 1.6 on Linux Mint 17 (XFCE)
- and still being surprised every day
how easily all of this works ...

Re: Tweaked the search.kmm for searching AND finding - beta testers needed!
Posted by: slayer
Date: February 27, 2010 07:55AM

I don't understand quite well what your changes do, can you please explain a little bit more about your code?
Thanks.

Re: Tweaked the search.kmm for searching AND finding - beta testers needed!
Posted by: jsnj
Date: February 27, 2010 10:24AM

Quote
SoerenB
Hi, jsnj,

Thanks for that quick reply.
I did not want to install Search+, because I do not need and want more bars and buttons (no search bar here, it is all in the SearchButtons Context menu)
You don't need to use the Search+ button or the default Search Button to get use its other features. It's features and options are integrated into the search function and can be toggled on or off from the Search Options submenu in Web Search once installed. smiling smiley
Quote
SoerenB
All I wanted was auto-pasting of search terms to the FindBar. That is what my tweak does, and it would harmonize with your new Find in Page Plus, as I explained there. And it works for backgrounded searches,too.
The Find in Page Plus is Matt's, not mine smiling smiley Your tweak works well with Paste & Search and in the background with Paste & Search if you don't mind the Findbar also popping up on the foreground page smiling smiley ..Doesn't quite work properly with searching from the URL bar, selected text or search prompt though.

Re: Tweaked the search.kmm for searching AND finding - beta testers needed!
Posted by: SoerenB
Date: February 27, 2010 06:41PM

Hi, jsns,

ooops...("The Find in Page Plus is Matt's, not mine") ...sorry, matt!

thanks a lot, jsns - you convinced me. I've installed search+, it does what I need, and it is EASILY configurable.

Have a nice weekend.

Cheers
SoerenB

KM 1.74b4u1 in Wine 1.6 on Linux Mint 17 (XFCE)
- and still being surprised every day
how easily all of this works ...

K-Meleon forum is powered by Phorum.