From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Philip Kaludercic Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New package: dape Date: Sat, 14 Oct 2023 14:54:32 +0000 Message-ID: <87lec58dav.fsf@posteo.net> References: <875y3ag16c.fsf@posteo.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35655"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Daniel Pettersson Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Oct 14 16:55:45 2023 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 1qrg3N-00093P-4z for ged-emacs-devel@m.gmane-mx.org; Sat, 14 Oct 2023 16:55:45 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrg2L-00028f-50; Sat, 14 Oct 2023 10:54:41 -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 1qrg2I-00028M-JG for emacs-devel@gnu.org; Sat, 14 Oct 2023 10:54:39 -0400 Original-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 1qrg2F-00072U-S5 for emacs-devel@gnu.org; Sat, 14 Oct 2023 10:54:38 -0400 Original-Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 7006424002B for ; Sat, 14 Oct 2023 16:54:33 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697295273; bh=n6Wnq/UTXLzN9mIuBZR05/BdHYVt2zqYRQB4Nog7l0Y=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=OSqaEjxcXjKS16JR9Fsh46LPXfT4PPcEEA6DsbTETmMoeACeYO5BoPCuzRKBXNtjL 3VW/n0lhuy40QmlM8NlpfaHgONFrcAqHTiosfNdegQjkso++lAAGkZCmp24xsMjL9s 6HITzLXWFG1gxYTJ2VH9d9aw39Fze30ORq/VquRG4pUbD5R+bBnSBAgOLY5Cvmu0KH 5WNd50TDRA8LUCP07d8rQPtYD6SH7iolZSbgginUlVRQM8UfRm0/HcewVXe5u8YMFl jumhrkvz3p8myinO5q2+Ehcfzac8CoBLKargLa7w3NtivMY0i2WGpGPj6DcZG2baz6 4NY3TrmcgC4jQ== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S75xh6tYXz6tmv; Sat, 14 Oct 2023 16:54:32 +0200 (CEST) In-Reply-To: (Daniel Pettersson's message of "Sat, 14 Oct 2023 14:28:03 +0200") Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM 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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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:311448 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Daniel Pettersson writes: > On Fri, Oct 13, 2023 at 2:24=E2=80=AFPM Philip Kaludercic wrote: >> Very interesting! > Thank you for your interest :) I have tried to try it out right now, but because I've never used DAP before, I am not sure how to get it running properly. Nevertheless, I think it would be useful to have something along these lines: --=-=-= Content-Type: text/plain Content-Disposition: inline diff --git a/dape.el b/dape.el index 3b27104..e24b0ea 100644 --- a/dape.el +++ b/dape.el @@ -2320,22 +2320,24 @@ If SKIP-FUNCTIONS function values are not called during evaluation." (defun dape--read-config () "Read config name and options." - (let ((candidate - (completing-read "Dape config: " - (append - (mapcan - (lambda (name-config) - (let* ((config (cdr name-config)) - (modes (plist-get config 'modes))) - (when (apply 'provided-mode-derived-p major-mode modes) - (list (car name-config))))) - dape-configs) - dape--config-history) - nil nil nil 'dape-history))) - (if-let ((config - (alist-get (intern candidate) dape-configs))) - (list (intern candidate) config) - (dape--config-from-string candidate)))) + (if (null dape-configs) + (customize-variable 'dape-configs) + (let ((candidate + (completing-read "Dape config: " + (append + (mapcan + (lambda (name-config) + (let* ((config (cdr name-config)) + (modes (plist-get config 'modes))) + (when (apply 'provided-mode-derived-p major-mode modes) + (list (car name-config))))) + dape-configs) + dape--config-history) + nil nil nil 'dape-history))) + (if-let ((config + (alist-get (intern candidate) dape-configs))) + (list (intern candidate) config) + (dape--config-from-string candidate))))) ;;; Hover --=-=-= Content-Type: text/plain Another interesting idea to pursue might be to have modular UIs. Instead of splitting up the current Emacs frame, I think a minimalist, more edebug-like interface would be nice, where variable values could be displayed using overlays instead of having a separate buffer. >> Here are a few comments and suggestions I found from a brief skim over >> the code: > I made some updates based on your suggestions and added a todo for > Compat. Note that you don't need to add Compat just for `defvar-keymap', as you could also just use the traditional method of defining a keymap instead: --8<---------------cut here---------------start------------->8--- (defvar dape-global-map (let ((map (make-sparse-keymap))) (define-key map "d" #'dape) ;; ... map)) --8<---------------cut here---------------end--------------->8--- > Couldn't bring myself to fix all of the checkdoc stuff, but made > some improvments. It is not urgent or in any way blocking inclusion to GNU ELPA, it is just something I think one should keep in mind in the long-term to make maintaining and contributing to the package easier. >> Also, sorry for bringing this up, but how married are you to the name? > I'm not overly attached to it. What are your objections? And do you have > any suggestions? I find it quite difficult to name things like this. It just doesn't say that much, and I don't know if it is intended, but the usual way I would read/pronounce it (rhyming with cape) wouldn't immediately signal any relation to DAP. Note that you can use (elisp) Shorthands to avoid writing out a longer name inside the file, in case a longer name like debuger-adapter. It seems there is no package by the name of "dbg"? If we are not interested in a self-descriptive and memorable name, and would want to create a parallel to Eglot (IIRC Emacs polyGLOT), perhaps something like based on "Emacs Debugger" (Egger? Ebugger? Edebugger?) might be possible as well. --=-=-=--