Home Download Buy Blog Forum Support

Get the Content of the Search Panel

Get the Content of the Search Panel

Postby grundprinzip on Wed Apr 10, 2013 8:18 am

Hi,

I'm currently trying to extend my Sublemacs - https://github.com/grundprinzip/sublemacspro - Plugin with more features and was asked if I could use Emacs' possibility to perform completions as well in the search box. While it is easy to trigger a command as long as the search panel was opened via the show_panel command it seems there is no way of getting or setting the content of this specific kind of input panel or even launching the show_panel command with specific hooks.

Since I don't want to rewrite the already existing search functionality, building an own search box is not my desired solution (especially since you don't get all the nice buttons).

Does anybody have an idea how to solve this issue?

Thanks
Martin
grundprinzip
 
Posts: 8
Joined: Wed Feb 20, 2013 7:47 pm

Re: Get the Content of the Search Panel

Postby DavidLGoldberg on Fri Apr 12, 2013 1:34 pm

I've had limited success with the input panel myself. Basically in the on_change below you want to make the panel do stuff like add more text right? I wanted to make it disappear, wasn't sure how to do that..
show_input_panel(caption, initial_text, on_done, on_change, on_cancel)

Another way to get around this might be to have a "mode" the way the Vintage plugin does (you can write to the status bar maybe?) You can literally bind the alphabet to the mode, I'm doing that for the plugin I'm working on.
DavidLGoldberg
 
Posts: 11
Joined: Sat Mar 16, 2013 2:57 pm


Return to Plugin Development

Who is online

Users browsing this forum: No registered users and 5 guests

cron