From: Stefan Kangas <stefan@marxist.se>
To: Stefano Pacifico <github@pacifico.cc>
Cc: 21521@debbugs.gnu.org
Subject: bug#21521: 24.5; pdb default suggested command
Date: Thu, 11 Jul 2019 06:08:21 +0200 [thread overview]
Message-ID: <CADwFkmmPeQtjD3dqJdLjSkZCuoEHMuZOtoOd8iix0jofSbc-bg@mail.gmail.com> (raw)
In-Reply-To: <CCFB5968-BD65-4D8B-B46C-7574A670ED80@pacifico.cc>
[-- Attachment #1: Type: text/plain, Size: 818 bytes --]
tags 21521 + patch
thanks
Stefano Pacifico <github@pacifico.cc> writes:
> When executing `M-x pdb`, the default suggested command is `pdb`, but I couldn’t
> find any validation that standard Python distributions consistently install a
> symlink to`pdb.py` in any `bin` directory (as in the case of my system OS X
> 10.10.5).
>
> If the default command were `python -m pdb`, it would seemingly be compatible with more systems.
This makes sense, and "python -m pdb" is also the recommended usage on
most resources I've been able to find. On the system I'm on now, the
pdb command is missing.
But I think it's nice to user the shorter version when it's available,
so I suggest to use "python -m pdb" only as a fallback.
Please see the attached patch which does that.
Thanks,
Stefan Kangas
[-- Attachment #2: 0001-Use-python-m-pdb-when-pdb-is-missing-in-M-x-pdb.patch --]
[-- Type: application/octet-stream, Size: 913 bytes --]
From aedc63d2ac81c98dbc03c41435d0d2ac82a6a87d Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Thu, 11 Jul 2019 05:51:18 +0200
Subject: [PATCH] Use "python -m pdb" when "pdb" is missing in M-x pdb
* lisp/progmodes/gud.el (gud-pdb-command-name): Use "python -m pdb"
when the "pdb" command is missing. (Bug#21521)
---
lisp/progmodes/gud.el | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 6b152b7b90..a567508416 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1673,7 +1673,8 @@ gud-pdb-marker-filter
output))
-(defcustom gud-pdb-command-name "pdb"
+(defcustom gud-pdb-command-name
+ (if (executable-find "pdb") "pdb" "python -m pdb")
"File name for executing the Python debugger.
This should be an executable on your path, or an absolute file name."
:type 'string
--
2.21.0
next prev parent reply other threads:[~2019-07-11 4:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-20 1:41 bug#21521: 24.5; pdb default suggested command Stefano Pacifico
2015-09-22 2:16 ` Stefano Pacifico
2015-09-22 7:54 ` Eli Zaretskii
2015-09-22 19:20 ` Stefano Pacifico
2015-09-23 6:28 ` Eli Zaretskii
2015-09-24 18:24 ` Stefano Pacifico
2019-07-11 4:08 ` Stefan Kangas [this message]
2019-07-21 11:29 ` Noam Postavsky
2019-08-08 2:40 ` Stefan Kangas
2019-08-09 0:09 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CADwFkmmPeQtjD3dqJdLjSkZCuoEHMuZOtoOd8iix0jofSbc-bg@mail.gmail.com \
--to=stefan@marxist.se \
--cc=21521@debbugs.gnu.org \
--cc=github@pacifico.cc \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).