From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?S=C5=82awomir?= Grochowski Newsgroups: gmane.emacs.devel,gmane.emacs.orgmode Subject: Re: [DISCUSSION] "quick-help" popup for org-columns (column view) Date: Thu, 18 Apr 2024 22:55:47 +0200 Message-ID: <87mspqe6gc.fsf@gmail.com> 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> <87o7ahmxnj.fsf@posteo.net> <87msq12blu.fsf@gmail.com> <87cyqwmmkb.fsf@posteo.net> <87v84l3bfx.fsf@posteo.net> <87wmoy94wc.fsf@gmail.com> <87o7a9lqh1.fsf@posteo.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2381"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Eli Zaretskii , yantar92@posteo.net, emacs-orgmode@gnu.org, emacs-devel@gnu.org To: Philip Kaludercic Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Apr 18 22:56:31 2024 Return-path: Envelope-to: ged-emacs-devel@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 1rxYo2-0000Kq-Mo for ged-emacs-devel@m.gmane-mx.org; Thu, 18 Apr 2024 22:56:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rxYnY-0001Lk-Pa; Thu, 18 Apr 2024 16:56:00 -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 1rxYnX-0001L8-47; Thu, 18 Apr 2024 16:55:59 -0400 Original-Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rxYnV-00061c-HM; Thu, 18 Apr 2024 16:55:58 -0400 Original-Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-343f62d8124so997065f8f.2; Thu, 18 Apr 2024 13:55:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713473754; x=1714078554; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=QS6a9MomqonykeE5p//lTU4MudlDCqiCNAKNAjN2XmM=; b=jzO/3TLt6tpktItffK5OnNkc5BCZdm9fQLfO/hAFDgyIhnANtTduLdCOCuZhzTcQZ6 BlHASIk4tYTNjuSEfirTmGuySfWJjWXA5i6kSw+sJ/MI8Py4XQzNKtT21ltxsqJRyQW7 fDdemzMnx0eYXEmyKmiQNDXr0ByH444J1L80X+469AI/IrCB7Xr+zv8dTHsoYTcAl/Hd kxlvqpvRaGHWlKTGEJ/XFHAQOPW5o8Mj7rOoqn0OR4svSI0NAefC9Vo/vQas3XURgyir 3IIy/tHHUgyioSyvfFk/LdeXo7j3yW1S1z2yZe51qPNv6Epc+L7iE/ieor4/n0pMoJFO PopA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713473754; x=1714078554; h=content-transfer-encoding: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=QS6a9MomqonykeE5p//lTU4MudlDCqiCNAKNAjN2XmM=; b=vvGtsVkjHA9hqF2ikbs3wSzKkP+KoMTm31kitJme25GTsWoySnRjCHx2HWJxGZD0hg HNxBPqD3A1bqCBGEyOirG3WMAc5rAfdh1XsDMgWsAsVdh/N13LGYxwHKAstTwvzj5jmf 03vXVKeeyUWjK6VRklbDbfNGkiit8Od//MaVSkostrF+w3Wck6R2z33ZYDKM10zest7D 4duQ4uejvdXnyWu8+RbmFjbeittPzUzR16xH7nS+WuplHvKSf3JCOd0fNBTYQ+l4WEsp NrNC5KPPTpAA7MePQnGCd8px0Cc2zTHUhwY3n+Ksi1FqkjbeiLJp6tgZaPN/4r3F7Xll IDwA== X-Forwarded-Encrypted: i=1; AJvYcCX1cCWR2mV7BshG2M2eDCl0uQm/7YTSdksIGc0tEnX+iMabBXDBJPsymv+2uU0DGVyKLZzf2vM6TXyfArG2AMtmbzEFLa1Zc950etvwveJF6hJkmjoDf/wt1Hg= X-Gm-Message-State: AOJu0Yzf1FI9b8MUHqnNo1LYynCd3EwP7atGfCjqZMCIRnUpZV4bUAMd TBnhkb6dLHx+pEI2QerjCMwKVtK6tJqAooV7Ayj3tzQQq0hc5tPfHt0Lxg== X-Google-Smtp-Source: AGHT+IEC7g96vnIN59xoDmKT2sXoKzXlHBCbpx3SFch1CRJrYn0FSAz6FmOuaWcZqZPR8sqmr7yCKg== X-Received: by 2002:a5d:6388:0:b0:343:c35d:1403 with SMTP id p8-20020a5d6388000000b00343c35d1403mr44249wru.15.1713473753399; Thu, 18 Apr 2024 13:55:53 -0700 (PDT) Original-Received: from windows (83.6.121.27.ipv4.supernova.orange.pl. [83.6.121.27]) by smtp.gmail.com with ESMTPSA id j18-20020a1709062a1200b00a557616395csm1013372eje.85.2024.04.18.13.55.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 13:55:53 -0700 (PDT) In-Reply-To: <87o7a9lqh1.fsf@posteo.net> Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=slawomir.grochowski@gmail.com; helo=mail-wr1-x432.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, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:317827 gmane.emacs.orgmode:161124 Archived-At: Philip Kaludercic writes: > S=C5=82awomir Grochowski writes: > >> Philip Kaludercic writes: >>> I have pushed the changes to master. >> >> Thank you Philip for your help. It works. >> >> But there is one more small thing.=20 >> A message that is displayed in the minibuffer.=20 >> It contains two pieces of information: >> >> (1) command name >> Right now it's hardcoded.=20 >> We need to change the it from `help-quick-toggle' to >> `org-columns-help-quick-toggle'. >> How to do it?=20 >> Add another variable like `help-quick-use-map'? >> Maybe 'help-quick-command-name'? > > Instead of using substitute-command-keys, we could just use > this-command, but that assumes that help-quick can always be toggled by > the command that invokes it. That's great idea. I tried with this code: (message "Toggle display of quick-help buffer using %s." (propertize (key-description (this-command-keys)) 'face 'help-key-= binding 'font-lock-face 'help-key-binding)) And it works perfectly.=20 >> (2) keybinding to the command name >> Just to modify message string. Add '\\'. >> To use other keymap. >> Change is in the diff below.=20 > > I don't see how this would work in general, at the very least it breaks > the regular usage. > > Furthermore, I am not convinced we have to change anything here, since > C-h C-q (the default binding for `help-quick-toggle') should also hide > the buffer if one uses your command, or am I mistaken? But I would like 'help-quick' for org-columns to be bind to other keybinding: "?" not "C-h C-q". Because now it's like this: 1. invoke the command using "?" keybinding: (defun org-columns-help-quick-toggle () (interactive) (let ((help-quick-sections org-columns-help-quick-sections) (help-quick-use-map org-columns-map)) (help-quick-toggle))) (org-defkey org-columns-map "?" #'org-columns-help-quick-toggle) 2. 'help-quick' for org-columns buffer will appear with the message: "Toggle display of quick-help buffer using C-h C-q." So this is misleading. Because pressing 'C-h C-q' will close the buffer but pressing it again will show 'help-quick' buffer and not 'help-quick' for org-columns buffer. Therefore, I think that to use a different keybinding we need to modify the code. Or am I missing something? --=20 Slawomir Grochowski