From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id YCdeFQuqE2b/xgAAqHPOHw:P1 (envelope-from ) for ; Mon, 08 Apr 2024 10:25:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YCdeFQuqE2b/xgAAqHPOHw (envelope-from ) for ; Mon, 08 Apr 2024 10:25:47 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PYTQBJsi; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712564747; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature: openpgp:openpgp; bh=bFPD6/KPLMXTdcL4sj8DGWg2pL71khVxcA3h+DxUvok=; b=amw3gY029SA1/+NFNbzoLWhymK2IggdrRznl1I09/K+h2G5yspnxUzZWp6ivGpUC12Zg2L /08x1q8kuoHhTil5udujL8gNSVWSmtvfRDP2rimWObtPNXsQ4dUDr4+p2m8+g8QhgS6nzO Rw4jgm5wauZ6Q6RtOxOxLdlkt9n0mpVJJl3Mdu18mpb25X9tZ8M+yJXJc+4laMTrlOEliF gwT47HrFBMhImiaRTm5cjuym1vbcohWGFiSkW+4QhYJbCVufXYRHUXwMXBMUHSe5KZmuM+ aqt2UHLme9XVAvkX+ovmxbo33v8ob2btov/V5J6FM0Zk0VyG+aE9weyFJxA2ZQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712564747; a=rsa-sha256; cv=none; b=WZe5awnhZlowYPqH1y0XhhxseXHF/34SCsNYwhZB9DWURPlZlvNuLC31yTBLGgdSDMbWhd s6W5wzIT7ZuBSLIdCrV/JoIemD19M99tN0GyxUWDLYXK6amNreJdcqyrZM/wLPuHlaDvio 4yi69HV1Zx59M9Sw4+aKop0DY6QB/ZHTuU9/OAONI6iGYBHrYxBkDM9rRQ1tn0mfhAtg3S zcmiPZJcEXFLowwX3wVsxcRuZs71QVbalreOLexcTkS/0cN0h1druwxZNWQZtzV+gkiRss 27SepZg60s8CuC2s5nocmMixVKUmYs6vu79w3mPPaae7tcSLr7NhJ/ki/DvmbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=PYTQBJsi; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C3BEE25487 for ; Mon, 8 Apr 2024 10:25:45 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtkIp-00022Q-6Z; Mon, 08 Apr 2024 04:24:31 -0400 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 1rtkIn-000220-Ur for emacs-orgmode@gnu.org; Mon, 08 Apr 2024 04:24:29 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtkIj-00016k-HF for emacs-orgmode@gnu.org; Mon, 08 Apr 2024 04:24:29 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id CD892240028 for ; Mon, 8 Apr 2024 10:24:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1712564662; bh=dtk+TOkNhLCEyQOKvvU3SRmoo1KhEWGkzKRVQIHHBIM=; h=From:To:Cc:Subject:OpenPGP:Date:Message-ID:MIME-Version: Content-Type:Content-Transfer-Encoding:From; b=PYTQBJsiuKDHbd64l7UyaDsWHmHiCSmyTd2tmnhvMJTemnSa+1WmO/yD4jMETTFYr u/KbGgcpdkdiKcpwvI8PpGmCd4ji87tzioITBgJqGf1Y2kU2oqLOlHnrIM33mzRkb0 a7HCh29j+AB9lh9/JPZWlfmJu9AhGLFjQYzYUAFuzdWx62a2sIcVSZ07ApCoX64DwV zLheUcVgCn0IHNWC6dwnlXFTlsmZphl8OF6kJQFWFsWSMZudckyQYeYp22+VPuXb1b iURhqXjBA4xCB0gA/7tQHWJQq9Tsno9lZuZgWY38SZZoX8JYlxiTZhCAdYMSYn+jnX 1pkFB97jXGrLQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4VChvn1cQ2z9rxg; Mon, 8 Apr 2024 10:24:21 +0200 (CEST) From: Philip Kaludercic To: =?utf-8?Q?S=C5=82awomir?= Grochowski Cc: Eli Zaretskii , yantar92@posteo.net, emacs-orgmode@gnu.org, emacs-devel@gnu.org, stefankangas@gmail.com, larsi@gnus.org, hmelman@gmail.com, info@protesilaos.com Subject: Re: [DISCUSSION] "quick-help" popup for org-columns (column view) In-Reply-To: <87frvwl2wv.fsf@gmail.com> (=?utf-8?Q?=22S=C5=82awomir?= Grochowski"'s message of "Mon, 08 Apr 2024 09:38:40 +0200") References: <87a5oayblv.fsf@gmail.com> <87jzlxro68.fsf@localhost> <87zfu6b4w3.fsf@gmail.com> <86jzl91zrd.fsf@gnu.org> <87frvwl2wv.fsf@gmail.com> OpenPGP: id=7126E1DE2F0CE35C770BED01F2C3CC513DB89F66; url="https://keys.openpgp.org/vks/v1/by-fingerprint/7126E1DE2F0CE35C770BED01F2C3CC513DB89F66"; preference=signencrypt Date: Mon, 08 Apr 2024 08:24:20 +0000 Message-ID: <87plv02rez.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -8.57 X-Spam-Score: -8.57 X-Migadu-Queue-Id: C3BEE25487 X-Migadu-Scanner: mx12.migadu.com X-TUID: Aw7YlPLtyhS9 S=C5=82awomir Grochowski writes: > chad writes: > >> If you don't mind me asking: > > Thank you for sharing your views.=20 > >> What are your high-level goals and immediate needs for changing >> help-quick? > > I want to reuse quick-help for functionality in org-mode - column view > package. See first email in this thread - there is even a screenshot. > >> It looks like you may be trying to have multiple >> simultaneous quick-help buffers active at once? > > Philip Kaludercic writes: > >> Is there a reason not to re-use the same buffer? I am not sure if we >> need multiple quick-help buffer to co-exist at the same time. > > Yes you are right. There is no need to create multiple quick-help > buffers.=20 > >> The idea here was that some other function could rebind >> `help-quick-sections' dynamically. That way you avoid the redundant >> arguments (which would all have to be documented). > > Is this really a good practice? It certainly is practice. > Relying on global variables instead of passing variables as a parameters? A lot of Emacs Lisp code uses dynamic scope. Examples include `default-directory' or a lot of search functionality. > I tried like this: > > +(defun org-columns-help-quick-toggle () > + (interactive) > + (let ((help-quick-sections org-columns-help-quick-sections)) > + (help-quick-toggle))) > > So passing a 'sections' data works. > But it doesn't read keymaps from `org-columns-map'. > Because as I understand it read keymaps available only in the created buf= fer > "*Quick Help*" not from the buffer with org-colview. > > This is the line from function: `help-quick' where it happens: > + (let* ((bind (where-is-internal (car ent) nil t)) > Signature: > (where-is-internal DEFINITION &optional KEYMAP FIRSTONLY NOINDIRECT NO-RE= MAP) > > So previously I was passing a keymap `org-columns-map' to function 'where= -is-internal'. > > Eli Zaretskii writes: >> In any case, we cannot change the signature of help-quick, since it's a >> public function. > > If I can't modify the function `help-quick' how can I make it work? 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 attaching the whole patch: > > From dcc5172c87f9f7acfc9ab3a72f7de8b363a05447 Mon Sep 17 00:00:00 2001 > From: Slawomir Grochowski > Date: Sun, 7 Apr 2024 01:13:27 +0200 > Subject: [PATCH] lisp/org-colview.el: add help-quick sections for org-col= view > > --- > lisp/org-colview.el | 41 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 41 insertions(+) > > diff --git a/lisp/org-colview.el b/lisp/org-colview.el > index d71c84a76..547f50df8 100644 > --- a/lisp/org-colview.el > +++ b/lisp/org-colview.el > @@ -169,6 +169,7 @@ See `org-columns-summary-types' for details.") > (org-cycle-overview) > (org-cycle-content)) >=20=20 > +(org-defkey org-columns-map "?" #'org-columns-help-quick-toggle) > (org-defkey org-columns-map "c" #'org-columns-content) > (org-defkey org-columns-map "o" #'org-overview) > (org-defkey org-columns-map "e" #'org-columns-edit-value) > @@ -231,6 +232,46 @@ See `org-columns-summary-types' for details.") > "--" > ["Quit" org-columns-quit t])) >=20=20 > +(defvar org-columns-help-quick-sections > + '(("Move" > + (org-columns-move-up . "up") > + (org-columns-move-down . "down") > + (org-columns-move-cursor-left . "left") > + (org-columns-move-cursor-right . "right")) > + ("Move column & row" > + (org-columns-move-row-up . "move row up") > + (org-columns-move-row-down . "move row down") > + (org-columns-move-left . "move column left") > + (org-columns-move-right . "move column right")) > + ("Add & delete column" > + (org-columns-new . "add column") > + (org-columns-delete . "delete column")) > + ("Edit column" > + (org-columns-narrow . "narrow") > + (org-columns-widen . "widen") > + (org-columns-edit-attributes . "attributes")) > + ("Edit values" > + (org-columns-edit-value . "edit value") > + (org-columns-edit-allowed . "edit allowed value") > + (org-columns-next-allowed-value . "next allowed value") > + (org-columns-previous-allowed-value . "previous allowed value") > + (org-columns-toggle-or-columns-quit . "toggle checkbox or quit") > + (org-columns-todo . "change TODO state")) > + ("View" > + (org-columns-content . "show content") > + (org-overview . "show overview") > + (org-columns-show-value . "show value")) > + ("Misc." > + (org-columns-open-link . "open link") > + (org-columns-redo . "redo") > + (org-columns-help-quick-toggle . "toggle this help") > + (org-columns-quit . "quit")))) > + > +(defun org-columns-help-quick-toggle () > + (interactive) > + (let ((help-quick-sections org-columns-help-quick-sections)) > + (help-quick-toggle))) > + > (defun org-columns--displayed-value (spec value &optional no-star) > "Return displayed value for specification SPEC in current entry. >=20=20 > --=20 > 2.30.2 > > > Regards, --=20 Philip Kaludercic on peregrine