From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Christopher Dimech Newsgroups: gmane.emacs.help Subject: Re: Generality of defvar Date: Thu, 28 Jul 2022 09:34:40 +0200 Message-ID: References: <87r127h40s.fsf@posteo.net-N7wjq17--3-2> <87pmhqbuoo.fsf@dataswamp.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22293"; mail-complaints-to="usenet@ciao.gmane.io" Cc: carlmarcos@tutanota.com, Emanuel Berg , help-gnu-emacs To: thibaut.verron@gmail.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jul 28 09:40:32 2022 Return-path: Envelope-to: geh-help-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 1oGy8F-0005a5-QR for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 09:40:31 +0200 Original-Received: from localhost ([::1]:40196 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oGy8D-0002Xp-Vt for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 28 Jul 2022 03:40:30 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39602) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGy2l-0000os-6n for help-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:34:51 -0400 Original-Received: from mout.gmx.net ([212.227.15.19]:50405) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oGy2f-0005gS-Mm for help-gnu-emacs@gnu.org; Thu, 28 Jul 2022 03:34:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1658993680; bh=YqovbppWfH8jV+th9s0L0SARgGUhXwthl7dkFRsTgyg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Tr90OtlePMOQtAKDSP96WNPVp8KcxC5DPMoBETtjpyOyo0zv9WH7qCbFYOwDDZxg1 hTKU6zZnOj9jBrRkKuCMuLarlvUV/BLPIcNX1rRM8blCebZCgDdTLrkYpAuACYWP64 djyjVyi5jqAHGkkS/UGG6mcxeLLjdeK1bJ8oovcI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from [92.251.127.164] ([92.251.127.164]) by web-mail.gmx.net (3c-app-mailcom-bs15.server.lan [172.19.170.183]) (via HTTP); Thu, 28 Jul 2022 09:34:40 +0200 Importance: normal Sensitivity: Normal In-Reply-To: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:FK1qWC8VnOiyt/OiJ5Hl8UU4Kg9O660qOEMTBhyFMavKBNu1fXQfYBmBybZRBzsZpWGqp icV5P0W/pJseCCQPnTwQcNfF2d+hicwAsZ29/08hXdHpe6tv7fHIGc45ryRhzjjQ8ziyY2DirzAQ tv854ISqYcovNAMnftkoW56wTOYZaLblXYKVmUzwd7az2q4wYCU1mqtbotNAHgXHx0V5inFugu20 dW/aJ/D4WI8sFH+Mi8SercW093BjR0A0i/fgrFhKC1cRdXeXV+hESdvFDiMI3M67fMPyGT2Ro9Zu Dc= X-UI-Out-Filterresults: notjunk:1;V03:K0:pDKwGKEFiqU=:Ug5Ln1ZWRMFLOvp7gieEXe KNtuD90SQ/LC5pX8esjbTdcPP6SmAfJAKINVagSbqTqmP3lMN9tsJ6gL9oP4IP+70uyWs+uVS enp50s4jx9HkHUg7IE86nAENFS4+8Xp9xJzqpmKLqwQzwr/AfiAgEpc6l4aZoSjXozhMRZwec Qq1JVJtZx9kHh5ORTBaDK3BUJJoi8u7FAibRa8Xksp8AiYIZ5Rt2kFgAqsCSZxSwFniiLJGhj oBKK7ziUA9MyWSbTWhUFpsxGJrI7DJ8jlmFW0BNOBKnavYV7pJsMlSDRtnZeepA7JEfo6XQDE qUUz455+Z+wigsAopmpIVIq+jGajpQ5G4WIR6l/VA2l5T/sNYUTOR3qiwf20mO9HDE6GUIQq5 sQpN7KO0rKvVTDU6LgWZS+wCuMo1wOsbnboXqSTYTsx7c2T640IpVOIqbrIDHssCHixuCq7z4 zFaPljtvpboZ02FvrMxHpLyxox0eRzdh0cfA+HSio5+3ztiQ2MVj7FJEsqkiVAD3BkV07gPdS NdD6G3/Tbrxc9Ko8n4BiFhbEPFoKOQGXIfiOs8LPqMFo6ZfF7r7p3rUc1reI63c9WDDS/fGhi 1MXpKdlymfHbPcrz3KkQzgXeBtCZZFUQ1uzPo/Z6XImzb/rTOc2fBy64WH6o68gYIoLXYhDyL MHyLY0R7d0Myyc4WryY4tY9lrL0YzpmJsffLBLrwB0DpehV8HUBBvLI8iZFifq9k4IBZhoQG8 1Ad71X38prQXo00uh8Yslc2ie9cL11Jiv87PDjCCDZBgXY6lQE3lSj5q5b4GxU/5KOfalfT3 Received-SPF: pass client-ip=212.227.15.19; envelope-from=dimech@gmx.com; helo=mout.gmx.net X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FROM=0.001, FREEMAIL_REPLY=1, HTML_MESSAGE=0.001, MIME_HTML_ONLY=0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138654 Archived-At: Sent: Thursday, July 28, 2022 at 7:06 PM From: "Thibaut Verron" To: "Christopher Dimech" Cc: carlmarcos@tutanota.com, "Emanuel Berg" , "help-gnu-emacs" Subject: Re: Generality of defvar Le jeu. 28 juil. 2022 à 08:42, Christopher Dimech <[1]dimech@gmx.com> a écrit : Sent: Thursday, July 28, 2022 at 4:39 AM From: "Thibaut Verron" <[2]thibaut.verron@gmail.com> To: "Christopher Dimech" <[3]dimech@gmx.com> Cc: [4]carlmarcos@tutanota.com, "Emanuel Berg" <[5]incal@dataswamp.org>, "help-gnu-emacs" <[6]help-gnu-emacs@gnu.org> Subject: Re: Generality of defvar Le mer. 27 juil. 2022 à 18:29, Christopher Dimech <[7]dimech@gmx.com> a écrit : > Sent: Thursday, July 28, 2022 at 1:47 AM > From: "Thibaut Verron" <[8]thibaut.verron@gmail.com> > To: [9]carlmarcos@tutanota.com > Cc: "Emanuel Berg" <[10]incal@dataswamp.org>, "help-gnu-emacs" <[11]help-gnu-emacs@gnu.org> > Subject: Re: Generality of defvar > > Le mer. 27 juil. 2022 à 15:24, <[12]carlmarcos@tutanota.com> a écrit : > > > > > Jul 27, 2022, 13:21 by [13]thibaut.verron@gmail.com: > > > > > Le mer. 27 juil. 2022 à 14:52, carlmarcos--- via Users list for the GNU > > Emacs text editor <> [14]help-gnu-emacs@gnu.org> > a écrit : > > > > > >> > > >> > > >> Jul 27, 2022, 12:34 by >> [15]incal@dataswamp.org>> : > > >> > > >> > carlmarcos--- via Users list for the GNU Emacs text editor wrote: > > >> > > > >> >> (defun enable-error-diagnostics () > > >> >> "Enable error diagnostics with backtrace buffer. > > >> >> One can exit the debugger with the q command." > > >> >> > > >> > > > >> > You can refer to keys in docstrings like this: > > >> > > > >> > \\[forward-word] > > >> > > > >> > That way, it isn't hardcoded so if later changed/configured > > >> > it'll still show the right key. > > >> > > > >> How can I figure out what key to use in the docstring for exiting the > > backtrace buffer? > > >> > > > > > > The function bound to 'q' is quit-window. But since this function > > doesn't have a global binding, you need to tell the docstring to use the > > appropriate keymap to look the binding up. > > > > > > Something like > > > > > > "Enable error diagnostics with backtrace buffer. > > > > > > \\ (note: this is the part telling emacs where to > > look for the key) > > > One can exit the debugger with the `quit-window' command (bound to > > \\[quit-window])." > > > > > > > > Although quit-window is bound to q, the command \\[quit-window] just > > inserts > > M-x quit-window, rather than q. > > > > Yes, that's precisely because quit-window doesn't have a global binding. > You need to add \\ somewhere in the docstring to tell > emacs to show bindings for the backtrace buffers, rather than global > bindings. > > Best wishes, > Thibaut Sounds good advice, but the result could be Uses keymap ‘backtrace-mode-map’, which is not currently defined. My bad, it should have been debugger-mode-map. Not quite right yet. I guess one should also put (require 'debug) at some point along with the function definition? Seems more bother than it solves. Cannot see how users would be able to figure all this complication out. References 1. mailto:dimech@gmx.com 2. mailto:thibaut.verron@gmail.com 3. mailto:dimech@gmx.com 4. mailto:carlmarcos@tutanota.com 5. mailto:incal@dataswamp.org 6. mailto:help-gnu-emacs@gnu.org 7. mailto:dimech@gmx.com 8. mailto:thibaut.verron@gmail.com 9. mailto:carlmarcos@tutanota.com 10. mailto:incal@dataswamp.org 11. mailto:help-gnu-emacs@gnu.org 12. mailto:carlmarcos@tutanota.com 13. mailto:thibaut.verron@gmail.com 14. mailto:help-gnu-emacs@gnu.org 15. mailto:incal@dataswamp.org