From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: [DISCUSSION] "quick-help" popup for org-columns (column view) Date: Wed, 10 Apr 2024 08:26:08 +0000 Message-ID: <87o7ahmxnj.fsf@posteo.net> References: <87a5oayblv.fsf@gmail.com> <87jzlxro68.fsf@localhost> <87zfu6b4w3.fsf@gmail.com> <86jzl91zrd.fsf@gnu.org> <87frvwl2wv.fsf@gmail.com> <87plv02rez.fsf@posteo.net> <87cyqzllbx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5487"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , yantar92@posteo.net, emacs-orgmode@gnu.org, emacs-devel@gnu.org To: =?utf-8?Q?S=C5=82awomir?= Grochowski Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Wed Apr 10 10:26:53 2024 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ruTIC-0001Fo-Eh for geo-emacs-orgmode@m.gmane-mx.org; Wed, 10 Apr 2024 10:26:52 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ruTHb-00058d-RK; Wed, 10 Apr 2024 04:26:15 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruTHb-00058N-5H for emacs-orgmode@gnu.org; Wed, 10 Apr 2024 04:26:15 -0400 Original-Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ruTHZ-0006bO-14 for emacs-orgmode@gnu.org; Wed, 10 Apr 2024 04:26:14 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 8AAE9240106 for ; Wed, 10 Apr 2024 10:26:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712737569; bh=FRxjA75Tj8KoZIIEsOeoCQx8lBKCb2+FPFawuMUGf7s=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:From; b=ol/p8V6BzZ9jSKYT1WSKFxzhdGhZuC5+RsEnAONmVXNDUPDVVYWKKpB38RC0GR2PB SsCkukbCkUN7EVwXzfR20D9l1RzK1iAOoT+dQQDnVCvB0vdNafcUZHF0X/gP/Ir8FX fPqZBKLgyWIg7v3qW4bzsQuULLM1yRWwEMRB2pzch+PsdmfdZu6TWHWOTmvA5DTtfM WCJ89EuwpecnFgxechR87koY3ZbQUdraQn/BlzNq5kiHDIQ6jbdbdE9X0yu8Z6Q+hA rM0EnOJSdA693yhnUh7IppsUXEwCm6dRVKV+dmTok7f7ONbJXlL/QYr7k0Ue2wSnhW 8MERc3oVQTtAA== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VDwrw6CKsz9rxQ; Wed, 10 Apr 2024 10:26:08 +0200 (CEST) In-Reply-To: <87cyqzllbx.fsf@gmail.com> (=?utf-8?Q?=22S=C5=82awomir?= Grochowski"'s message of "Mon, 08 Apr 2024 21:13:06 +0200") OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Received-SPF: pass client-ip=185.67.36.66; envelope-from=philipk@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Original-Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.orgmode:160957 gmane.emacs.devel:317651 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable S=C5=82awomir Grochowski writes: > Philip Kaludercic writes: > >> We could add a `help-quick-use-map' variable and bind it to `global-map' >> by default. You can then re-bind it in your command. > > I'm sorry, but I don't quite understand it.=20 Just this here: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/lisp/help.el b/lisp/help.el index 1ef46e394f3..5700f10fdc8 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -175,6 +175,9 @@ help-quick-sections COMMAND is the symbol of a command and DESCRIPTION is its short description, 10 to 15 char5acters at most.") +(defvar help-quick-use-map global-map + "Keymap that `help-quick' should use to lookup bindings.") + (declare-function prop-match-value "text-property-search" (match)) ;; Inspired by a mg fork (https://github.com/troglobit/mg) @@ -193,7 +196,7 @@ help-quick (let ((max-key-len 0) (max-cmd-len 0) keys) (dolist (ent (reverse (cdr section))) (catch 'skip - (let* ((bind (where-is-internal (car ent) nil t)) + (let* ((bind (where-is-internal (car ent) help-quick-use-map t)) (key (if bind (propertize (key-description bind) --=-=-= Content-Type: text/plain You would then only have to rebind `help-quick-use-map' in your custom command. > It seems to me that the simplest way is to add a parameter to the > function, like this: > > (defun help-quick (&optional keymap) > > Because it will not change the behavior for previous calls to this > function. And it will allow to pass specific keymap, not need to pass > and search in whole global-map. > > What do you think? Eli said that we shouldn't change the signature of public functions, so I don't think that this is an option. -- Philip Kaludercic on peregrine --=-=-=--