all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Kangas <stefan@marxist.se>
To: Eli Zaretskii <eliz@gnu.org>
Cc: a.soroa@ehu.eus, 34489@debbugs.gnu.org
Subject: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Fri, 5 Jul 2019 17:51:00 +0200	[thread overview]
Message-ID: <CADwFkm=j=N3rVAme221H0jn1oaqpbhUi_wLaZWmSmp6jeqyt6A@mail.gmail.com> (raw)
In-Reply-To: <83h883d6d4.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 424 bytes --]

Eli Zaretskii <eliz@gnu.org> writes:

> I think both [:print:] and .* would be too radical, as I'm not sure
> including control characters and arbitrary whitespace will not break
> something.  But maybe [:graph:] is better than [:alnum:].
>
> In any case, I think we want a comment there saying that this is to
> allow more characters in file names shown in the prompt.

How about the attached patch?

Thanks,
Stefan Kangas

[-- Attachment #2: 0001-Make-M-x-pdb-use-graph-to-match-file-names.patch --]
[-- Type: text/x-patch, Size: 1293 bytes --]

From 1e78d0abd4bc1d9475265c3b87718266fe5e9c92 Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 30 Jun 2019 19:17:52 +0200
Subject: [PATCH] Make "M-x pdb" use "[:graph:]" to match file names

* lisp/progmodes/gud.el (gud-pdb-marker-regexp): Use "[:graph:]" to
match file name in prompt.  (Bug#34489)
---
 lisp/progmodes/gud.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el
index 4306f5daa0..6b152b7b90 100644
--- a/lisp/progmodes/gud.el
+++ b/lisp/progmodes/gud.el
@@ -1605,8 +1605,12 @@ gud-pdb-history
 
 ;; Last group is for return value, e.g. "> test.py(2)foo()->None"
 ;; Either file or function name may be omitted: "> <string>(0)?()"
+;;
+;; We use [:graph:] to be very allowing with regards to which
+;; characters we match in the file name shown in the prompt.
+;; (Of course, this matches the "<string>" case too.)
 (defvar gud-pdb-marker-regexp
-  "^> \\([-a-zA-Z0-9_/.:@ \\]*\\|<string>\\)(\\([0-9]+\\))\\([a-zA-Z0-9_]*\\|\\?\\|<module>\\)()\\(->[^\n\r]*\\)?[\n\r]")
+  "^> \\([[:graph:] \\]*\\)(\\([0-9]+\\))\\([a-zA-Z0-9_]*\\|\\?\\|<module>\\)()\\(->[^\n\r]*\\)?[\n\r]")
 
 (defvar gud-pdb-marker-regexp-file-group 1)
 (defvar gud-pdb-marker-regexp-line-group 2)
-- 
2.11.0


  reply	other threads:[~2019-07-05 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15  8:32 bug#34489: 25.2; pdb fails if directory contains '++' a.soroa
2019-06-30 16:13 ` Stefan Kangas
2019-06-30 16:33   ` Eli Zaretskii
2019-06-30 17:24     ` Stefan Kangas
2019-07-02 16:35       ` Eli Zaretskii
2019-07-02 19:42         ` Stefan Kangas
2019-07-03  5:39           ` Eli Zaretskii
2019-07-05 15:51             ` Stefan Kangas [this message]
2019-07-06  9:10               ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADwFkm=j=N3rVAme221H0jn1oaqpbhUi_wLaZWmSmp6jeqyt6A@mail.gmail.com' \
    --to=stefan@marxist.se \
    --cc=34489@debbugs.gnu.org \
    --cc=a.soroa@ehu.eus \
    --cc=eliz@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.