From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms1.migadu.com with LMTPS id YJ64G0CfE2a3PQEAqHPOHw:P1 (envelope-from ) for ; Mon, 08 Apr 2024 09:39:44 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id YJ64G0CfE2a3PQEAqHPOHw (envelope-from ) for ; Mon, 08 Apr 2024 09:39:44 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="fAmuljl/"; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1712561984; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=GU/jF2Rn1+fnkOk1MihJQE888B3P58K0asA+2E5ABGk=; b=ijWDbHQ9MgBOmO9+swDl5vcvJRsiQGA1gNpCGDpWzdnOl93LsFSUCgGxr+UE67kfhJyEeQ 7KRzqqLpkrkoAxeSbbAsHYhXIspNRl0Lzwf2Fk1TEg+A2nWMO7HQwO5E8uED5348z6pyhV zdlsMMAxUD86f6HF5cibm6NI+3sQ/77in5tvismSe5QkmOzq5YMqRyfUOm7u+dPP/EWyS+ 6ciz70IuJ98egccqhwuJr0M6n4nfT71Ax9HbqHdGzpDA4v4KEg+/91IurBQfhmTDG5IiXS tB3PwvIPOEJt36KcZkI5vOAYBRe4TvWikOi1QnMfRHAynGR71Nwizf388BFpXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b="fAmuljl/"; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1712561984; a=rsa-sha256; cv=none; b=VoNMMRMzJ8DV6v1sAc//3J0UEYzIgMrMIlWR8XYiB0KKhZem0womXuwygTR4NYEmxMDnBQ jnffDbpWlbZ5h1lDfqyAmwb2yPy0kUPPlKJkKWA5z/fSdJyLDtAbdBLHAE4JKMbJUZp52S /MZIP2n+jPjjjPA2mYQCWG45EfHwmA+v2CPiexKf88dfiBt2fNI5X73ASweu/55jLw4rlI gM0kERLqMt7bFT19mH7Guw+8O9zs69F45EqTSebXyWpbRY15toXUzhS3zRSpGFomFVkCv9 v/7TOVHxeaifeqbIEvhXbNLVIyAwLQlEPN2peoyjght7kt/IacYDEf/cAvwPdw== 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 D42B27022D for ; Mon, 08 Apr 2024 09:39:43 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rtjah-0006nG-Q6; Mon, 08 Apr 2024 03:38:55 -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 1rtjag-0006ma-D6; Mon, 08 Apr 2024 03:38:54 -0400 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtjab-0002Kh-4s; Mon, 08 Apr 2024 03:38:54 -0400 Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-516d47ce662so4323172e87.1; Mon, 08 Apr 2024 00:38:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712561926; x=1713166726; darn=gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=GU/jF2Rn1+fnkOk1MihJQE888B3P58K0asA+2E5ABGk=; b=fAmuljl/bgYWYt4M2JTQ7A2niSOd7SbqBCOgdB2m6gdSS9tfUiRcrhfR2bpGUYgL9n M3z9GRGgGAUj6AQmF3BB6vzwgAtirFpOHMaOFr4V6yxBXrCtUcNVGwQxfPLgE3HzvD31 2RUL/PfDvmxR/RTG9lW0Eobcmc4+vT9N06bjB0Xt0OGdvOG+/0a8ulsU2sgfefe/lumQ IEOsG6eqIe9seHFaTz/MafG6CW3H+AOUSpQzxk4Y50KaAN9qzP3lvglTRZqev3NyaJbY ALjN4LGjWhCwu79m/AeqH4XPmv0GJxaBCp9lVItkTeovkR9+ofNnF2UM8PUpmKzW2l8T kjZw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712561926; x=1713166726; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=GU/jF2Rn1+fnkOk1MihJQE888B3P58K0asA+2E5ABGk=; b=rYHy42tF2ZhJVQxvl/4T0LPLkhISfoBMlk0S43hEEWwLvfJ90SEGLMEUcDHxPcQm28 j0kqGTH/CQnO7Jgl+VGxn7/KFBY+S0Mh3LJ6W8P7yN0yRLOWivK4WidngDjD+mw8HGQK sdJlmKFduvUY4ZcV/MwodMdIEdE0/u0N1q0YYH80Eh8Gz7goaZhZiIrtwSXWbP3vJM8e c+2vUq07yRhE/PfrPQpyM8UppY0B59PxMVKn0R3P3mWUcu1wzImHHTREJTGMdMAH4axN DQKKHXeRCKpqyZLQJNyTxDheN5q2hC0hDEEm45P8WrFnDnLlR2Ab27AoCE/vOjZqCAbf oXOw== X-Forwarded-Encrypted: i=1; AJvYcCVTbeffjMJV8+9iVQD7Qfr929v4MfuxcHxZtvWylZZN5cnvEmfq1Sx2MrVtM3+aFHmUIHGhkSQeLikMUqWEN/tEkGznNvWl14SmX0Vf/UpLvPNvNl4SbAqseaE= X-Gm-Message-State: AOJu0YwA18qqQzgipc202Em2iT5gpLbDVUQbph56Taxghi/VGbTYoMXB Ql94oLtNpgYFjQM3m7VTPK99lRydtTaZs+P0rQ1xG64Z/iJpBmyX X-Google-Smtp-Source: AGHT+IHYT8xo20swSIG+Ex2cds4Y/E966CYI2BJJLOLf06dmsLsq+mw3CWwaYMY7gP2eZEmX6GFDyg== X-Received: by 2002:a05:6512:3e17:b0:516:d250:91a7 with SMTP id i23-20020a0565123e1700b00516d25091a7mr9323378lfv.12.1712561925697; Mon, 08 Apr 2024 00:38:45 -0700 (PDT) Received: from windows (83.6.111.246.ipv4.supernova.orange.pl. [83.6.111.246]) by smtp.gmail.com with ESMTPSA id jg29-20020a170907971d00b00a518bcb41c1sm4042323ejc.126.2024.04.08.00.38.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Apr 2024 00:38:45 -0700 (PDT) From: =?utf-8?Q?S=C5=82awomir?= Grochowski To: Eli Zaretskii Cc: yantar92@posteo.net, emacs-orgmode@gnu.org, emacs-devel@gnu.org, philipk@posteo.net, 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: <86jzl91zrd.fsf@gnu.org> References: <87a5oayblv.fsf@gmail.com> <87jzlxro68.fsf@localhost> <87zfu6b4w3.fsf@gmail.com> <86jzl91zrd.fsf@gnu.org> Date: Mon, 08 Apr 2024 09:38:40 +0200 Message-ID: <87frvwl2wv.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=slawomir.grochowski@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SPF_TEMPERROR=0.01 autolearn=ham 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: -9.66 X-Migadu-Scanner: mx11.migadu.com X-Spam-Score: -9.66 X-Migadu-Queue-Id: D42B27022D X-TUID: 7njpepuxDuUR --=-=-= Content-Type: text/plain chad writes: > If you don't mind me asking: Thank you for sharing your views. > 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. > 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? Relying on global variables instead of passing variables as a parameters? 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 buffer "*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-REMAP) 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? I'm attaching the whole patch: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-lisp-org-colview.el-add-help-quick-sections-for-org-.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-colview --- 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)) +(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])) +(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. -- 2.30.2 --=-=-= Content-Type: text/plain Regards, -- Slawomir Grochowski --=-=-=--