From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Florian Lindner Newsgroups: gmane.emacs.help Subject: hydra: Have hint shown immediately Date: Wed, 29 Apr 2015 10:02:33 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: ger.gmane.org 1430294711 21391 80.91.229.3 (29 Apr 2015 08:05:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Apr 2015 08:05:11 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Apr 29 10:05:02 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YnMzH-0008Nk-OG for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 10:04:55 +0200 Original-Received: from localhost ([::1]:37573 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnMzC-0006Ag-23 for geh-help-gnu-emacs@m.gmane.org; Wed, 29 Apr 2015 04:04:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51049) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnMxI-0003WM-Ol for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:02:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YnMxD-0005WD-8E for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:02:52 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:46545) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YnMxD-0005W7-1s for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 04:02:47 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1YnMxA-0006sM-QL for help-gnu-emacs@gnu.org; Wed, 29 Apr 2015 10:02:44 +0200 Original-Received: from lapsgs09.informatik.uni-stuttgart.de ([129.69.213.139]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Apr 2015 10:02:44 +0200 Original-Received: from mailinglists by lapsgs09.informatik.uni-stuttgart.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 29 Apr 2015 10:02:44 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 46 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: lapsgs09.informatik.uni-stuttgart.de User-Agent: KNode/4.14.7 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:104065 Archived-At: Hello, I wonder if anyone is familiar with the hydra package: https://github.com/abo-abo/hydra I have an hydra to call search engines: (defhydra hydra-google (global-map "C-c /" :color blue) "Search Engines" ("c" (lambda () (interactive) (flo/start-search "http://en.cppreference.com/mwiki/index.php?title=Special:Search&search=%s")) "C++ Reference") ("g" (lambda () (interactive) (flo/start-search "https://google.de/#q=%s")) "Google") ) flo/start-search looks like that: (defun flo/start-search (url) (interactive) (browse-url (replace-regexp-in-string (regexp-quote "%s") (if (region-active-p) (buffer-substring (region-beginning) (region-end)) (read-string "Search for: " (thing-at-point 'symbol) "searches" nil t) ) url) ) ) interactive is just for testing, it will vanish probably. Since this is my first elisp "program" please criticise! My question: How can I make the hydra menu to be shown as soon as I press C- c /? Becaue I exit the hydra after pressing the key I'll never see the menu and forget option when more search engines are aded. Thanks, Florian