From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: JD Smith Newsgroups: gmane.emacs.bugs Subject: bug#68236: [PATCH] help.el: allow help-quick to use local commands/quick-sections Date: Thu, 4 Jan 2024 20:28:27 -0500 Message-ID: <4CB34A88-87DE-4347-A886-4BF8D4998E67@gmail.com> References: <1B0F351A-C393-4C1B-B883-814F2C33E802@gmail.com> <83a5ply2ca.fsf@gnu.org> <721ABC11-E691-43F9-9034-F375240C2E20@gmail.com> <83sf3dw699.fsf@gnu.org> Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.300.61.1.2\)) 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="36647"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68236@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 05 02:29:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1rLZ1Y-0009M8-3r for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Jan 2024 02:29:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rLZ19-0002tl-1e; Thu, 04 Jan 2024 20:28:59 -0500 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 1rLZ18-0002tP-0V for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 20:28:58 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rLZ17-0006zW-LM for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 20:28:57 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rLZ1B-0006Cy-Jx for bug-gnu-emacs@gnu.org; Thu, 04 Jan 2024 20:29:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: JD Smith Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Jan 2024 01:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68236 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 68236-submit@debbugs.gnu.org id=B68236.170441813523852 (code B ref 68236); Fri, 05 Jan 2024 01:29:01 +0000 Original-Received: (at 68236) by debbugs.gnu.org; 5 Jan 2024 01:28:55 +0000 Original-Received: from localhost ([127.0.0.1]:56045 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLZ13-0006Cc-JZ for submit@debbugs.gnu.org; Thu, 04 Jan 2024 20:28:55 -0500 Original-Received: from mail-qv1-xf2a.google.com ([2607:f8b0:4864:20::f2a]:46542) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rLZ0y-0006CM-7M for 68236@debbugs.gnu.org; Thu, 04 Jan 2024 20:28:52 -0500 Original-Received: by mail-qv1-xf2a.google.com with SMTP id 6a1803df08f44-6808c3938afso5151436d6.1 for <68236@debbugs.gnu.org>; Thu, 04 Jan 2024 17:28:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1704418118; x=1705022918; darn=debbugs.gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bkYDG3UIjmTCr0s5PUHH24rcLg71xCAClnYfTOnqwmw=; b=WaRlFo45IVStk2bfCP3fbumZRXq0IFrwehOLhUYXv5cN3i8Q4ZcPLu4JPOKdX2xR5+ HRQcFlIXLbDCg4+9bXvbJryEVD1DxSXhoWvLTMp8ZBY0oco9S0uj79tp4GqIHPzW6bXZ zr3pCvTu32Pn8umuGjyho20mYQ1cFLOPZGMfouc7pbXeDuUDqUnWX/29d2AQhr9EbYSg f9uIN28uWNb5kC3YEdAxG+HCvTk4v43bARL55j9LXw4fOSwTiqL8JZ7NsJ6q6tYA3Qy/ /g3ixoqGsFjiJ8GsGzllqNJF3sza14HIxrxEvKpjCi2rkbET2nQJSO3CVvAYUK1XbdZz kxUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704418118; x=1705022918; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bkYDG3UIjmTCr0s5PUHH24rcLg71xCAClnYfTOnqwmw=; b=ShY9DemO3de3ghOskKNLN1jzsdT95PvIEYrBGeR+OrlpfKiQJzpDdNZWfm2bu90HHY ZK66u+AT+806gJNNsb2tuAsvQg3K7T/wAqcIDC+q6afxgIhN1PWiL6uCiyUKNhCiCLse go8kzWAta4xZjVj77+2ECDB0Sl2Gi8Ud99lu4UtOMyVT8fYIFTt2sLHD8FbUOnj5TkfQ 52ZvboPV9bR/DHk0ot3e16nJkGCo8SwAn8Bf7wVizFMiRp0xMB2vT+ltmsJRiH/ps1SP kzYDuZ1R6D+DH/L0VawK92v4qTEjaCuZZDPaSYWeZbFRa2zT71UUDQyWamZ9NJw1HO9B q2hg== X-Gm-Message-State: AOJu0YxHD5EvDXFK3mz04fRRI4wEwGvroTsDbM0M/NrJtEIHqFbh7Jqu 4vZbUR7/8tYQoaASFebgA+p+KAYTo/z+sg== X-Google-Smtp-Source: AGHT+IF1ispmZqOTmhkx9HoBLWowM6n3Zzum7ogiGJWWp+8AMtgEn+wpvd9pXfbtmG57JRqN/jzWYQ== X-Received: by 2002:a05:6214:2388:b0:680:bf47:632d with SMTP id fw8-20020a056214238800b00680bf47632dmr1332714qvb.59.1704418118526; Thu, 04 Jan 2024 17:28:38 -0800 (PST) Original-Received: from smtpclient.apple (cm-24-53-187-34.buckeyecom.net. [24.53.187.34]) by smtp.gmail.com with ESMTPSA id mz6-20020a0562142d0600b0067f8953f78fsm234309qvb.41.2024.01.04.17.28.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Jan 2024 17:28:37 -0800 (PST) In-Reply-To: <83sf3dw699.fsf@gnu.org> X-Mailer: Apple Mail (2.3774.300.61.1.2) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:277352 Archived-At: > On Jan 4, 2024, at 8:57=E2=80=AFAM, Eli Zaretskii = wrote: >=20 >> From: JD Smith >> Date: Thu, 4 Jan 2024 08:45:50 -0500 >> Cc: 68236@debbugs.gnu.org >>=20 >> On Jan 4, 2024, at 2:39=E2=80=AFAM, Eli Zaretskii = wrote: >>=20 >> Please describe in more detail how would people use this for their >> personal "quick help", because I don't think I understand well enough >> what you have in mind. >>=20 >> For example, an org user may >>=20 >> (add-to-list 'help-quick-sections >> '("Org" >> (org-ctrl-c-star . "Compute table/change heading ") >> (org-ctrl-c-ret . "Table hline/insert heading"))) >>=20 >> so that from org-buffers, C-h C-q adds a new section: >>=20 >> Org =20 >> C-c * Compute table/change heading=20 >> C-c RET Table hline/insert heading =20 >>=20 >> Most likely users willing to customize `help-quick-sections=E2=80=99 = would remove existing sections with >> commands they know well. =20 >>=20 >> In any case, such a change will need suitable changes for >> documentation. >>=20 >> Do you mean documentation for the `help-quick-sections' variable? = How about turning this into a >> defcustom? This would allow more advanced users to fully customize = what =E2=80=9Cquick help=E2=80=9D they want. >=20 > If we are going to expose help-quick-sections as a defcustom, then I > don't understand why we need to change the code at all. Is the idea > that sections will depend on the current buffer? If so, then we just > need to add an element to the list members which will store the > major-mode for which the member is relevant. >=20 > Or what am I missing? Right now the code does (with-current-buffer (get-buffer-create "*Quick Help*") right away, then checks `where-is-internal' for each listed command in = `help-quick-sections'. So only global bindings (and bindings available = in help-mode) are accessible for display. My patch simply delays = switching to *Quick Help* buffer, so that binding information can be = gathered from the local buffer from which quick help was summoned. Note = that help-quick omits any bindings that are nil, as well as any empty = sections. So adding sections to the defcustom that do not apply (=3Dhave = no bindings) in some buffer is not a problem. =20=