From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: Exposing Isearch toggleable options Date: Fri, 30 Oct 2015 10:48:00 +0100 Message-ID: <87io5owuun.fsf@gmail.com> References: <87611q7c3f.fsf@mail.linkov.net> <877fm5tefl.fsf@mail.linkov.net> <87bnbh12o0.fsf@fastmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1446198485 6629 80.91.229.3 (30 Oct 2015 09:48:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Oct 2015 09:48:05 +0000 (UTC) Cc: emacs-devel@gnu.org To: Random832 Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 30 10:48:01 2015 Return-path: Envelope-to: ged-emacs-devel@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 1Zs6Hr-0001T1-Oo for ged-emacs-devel@m.gmane.org; Fri, 30 Oct 2015 10:47:55 +0100 Original-Received: from localhost ([::1]:49355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs6Hr-00035S-6H for ged-emacs-devel@m.gmane.org; Fri, 30 Oct 2015 05:47:55 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs6Ha-0002hq-1P for emacs-devel@gnu.org; Fri, 30 Oct 2015 05:47:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zs6HW-0004Tq-QR for emacs-devel@gnu.org; Fri, 30 Oct 2015 05:47:37 -0400 Original-Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]:38236) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zs6HW-0004Tj-Kh for emacs-devel@gnu.org; Fri, 30 Oct 2015 05:47:34 -0400 Original-Received: by wmeg8 with SMTP id g8so7538217wme.1 for ; Fri, 30 Oct 2015 02:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=dlDfl7Mfln42XvXmi3viaMAZj0eDSNEpF8lXPLgMS3A=; b=SFRsEw2f4zS5aCTULS5ZVS6Qb4VmYexBtA7hyoI7GDvgzrf0nrZ4jE5ymyJNlB/YvQ LD5PC7eKAqWpzqv5lbcSjitdccnNnvhSwv3ZICwBnue54vb/djUDuiZer5NzozM7MpV0 i8IStzyWlQl0pz884kQrtFDdltzCbSTreb8dRhdA2MGPCo5mUVXuekLEnSvz5G+EshUR YNoStIb618QiLCTexf5R57rrFbr27nHmclnIEMDDleGzf9ZzRJ+a5cbm56Q02Ef/1nUv Fg7pQ1rXFCnXzk21lKYQc6CuAHRexnFKx322tbdv70u+q+vuPXcIOi8E62ObpvpnLbnI oYog== X-Received: by 10.28.137.211 with SMTP id l202mr2325149wmd.90.1446198453769; Fri, 30 Oct 2015 02:47:33 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by smtp.gmail.com with ESMTPSA id e189sm2028232wma.4.2015.10.30.02.47.32 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 30 Oct 2015 02:47:32 -0700 (PDT) In-Reply-To: <87bnbh12o0.fsf@fastmail.com> (Random's message of "Thu, 29 Oct 2015 23:00:15 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c09::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192954 Archived-At: Random832 writes: > Juri Linkov writes: >>>> What key is used to toggle toggles? >>> >>> M-s plus some other key. They're each listed in the prompt. >> >> But what key could be used to toggle the display of that additional line >> containing a list of toggles? > > Well, how about M-s? A general way to supply a "prompt" string to be > printed in the echo area after typing a prefix key (either immediately > or when the echo-keystrokes delay triggers) might be nice. I could very well be "M-s". And what you described above is exactly what `defhydra` does: both bind the functions and wrap helpers around them. It's like `define-key', but with the automatic doc popup right after you press the prefix. Currently, we have "M-s" do a dumb prompt for more keys, with the only help available on "M-s C-h", which incidentally quits the minibuffer, so you have to start over. The `defhydra` approach embeds "C-h" right into "M-s", without quitting the minibuffer, and automatically closes the hint once an option is chosen.