GNU bug report logs - #34489
25.2; pdb fails if directory contains '++'

Previous Next

Package: emacs;

Reported by: a.soroa <at> ehu.eus (a.soroa)

Date: Fri, 15 Feb 2019 16:02:01 UTC

Severity: normal

Tags: patch

Found in version 25.2

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 34489 in the body.
You can then email your comments to 34489 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Fri, 15 Feb 2019 16:02:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to a.soroa <at> ehu.eus (a.soroa):
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Fri, 15 Feb 2019 16:02:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: a.soroa <at> ehu.eus (a.soroa)
To: bug-gnu-emacs <at> gnu.org
Subject: 25.2; pdb fails if directory contains '++'
Date: Fri, 15 Feb 2019 09:32:01 +0100
'pdb' command does not work if the directory where the python script is
contains the characters '++'. Here is a receipt

$ mkdir /tmp/foo++
$ cd /tmp/foo++
$ echo "print(10)" > pp.py
$ emacs -Q
M-x pdb
Run pdb (like this): python3 -m pdb pp.py




In GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
 of 2017-09-22, modified by Debian built on lgw01-amd64-050
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description:	Ubuntu 18.04.2 LTS

Configured using:
 'configure --build x86_64-linux-gnu --prefix=/usr
 --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --build x86_64-linux-gnu
 --prefix=/usr --sharedstatedir=/var/lib --libexecdir=/usr/lib
 --localstatedir=/var/lib --infodir=/usr/share/info
 --mandir=/usr/share/man --with-pop=yes
 --enable-locallisppath=/etc/emacs25:/etc/emacs:/usr/local/share/emacs/25.2/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/25.2/site-lisp:/usr/share/emacs/site-lisp
 --with-sound=alsa --without-gconf --with-x=yes --with-x-toolkit=gtk3
 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
 -fdebug-prefix-map=/build/emacs25-jYekUr/emacs25-25.2+1=. -fstack-protector-strong
 -Wformat -Werror=format-security -Wall' 'CPPFLAGS=-Wdate-time
 -D_FORTIFY_SOURCE=2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11

Important settings:
  value of $LC_MONETARY: en_IE.UTF-8
  value of $LC_NUMERIC: en_IE.UTF-8
  value of $LC_TIME: en_IE.UTF-8
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Shell

Minor modes in effect:
  shell-dirtrack-mode: t
  global-flycheck-mode: t
  diff-auto-refine-mode: t
  global-company-mode: t
  company-mode: t
  projectile-mode: t
  ido-vertical-mode: t
  save-place-mode: t
  override-global-mode: t
  tooltip-mode: t
  global-eldoc-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
libreoffice 2019-1-9-DK-Sailak-IIG-Bilera-\(Pepe\).odt: finished.
~ 
/tmp 
/tmp/k++ 
(New file)
Can’t guess python-indent-offset, using defaults: 4
Trailing newlines [trailing-newlines]
next-line: End of buffer
Saving file /tmp/k++/pp.py...
Wrote /tmp/k++/pp.py
Quit

Load-path shadows:
/usr/share/emacs/25.2/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs/site-lisp/rst hides /usr/share/emacs/25.2/lisp/textmodes/rst
/home/ccpsoeta/.emacs.d/elpa/let-alist-1.0.5/let-alist hides /usr/share/emacs/25.2/lisp/emacs-lisp/let-alist

Features:
(shadow sort mail-extr emacsbug gud pcmpl-unix conf-mode network-stream
nsm starttls url-cache url-http tls gnutls url-gw url-auth warnings
vc-git company-jedi jedi-core python-environment epc ctable concurrent
python tramp-sh misearch multi-isearch cal-move parse-time mm-archive
shr-color color shr dom browse-url notmuch hl-line notmuch-message
notmuch-hello notmuch-tree notmuch-show notmuch-print notmuch-crypto
notmuch-mua notmuch-draft notmuch-maildir-fcc notmuch-address
notmuch-company notmuch-parser notmuch-wash coolj notmuch-query
goto-addr icalendar diary-lib diary-loaddefs notmuch-tag crm notmuch-lib
notmuch-compat cl mm-view mml-smime smime dig org-agenda flyspell rect
tramp-cache tramp tramp-compat tramp-loaddefs trampver ucs-normalize
shell org-element org-rmail org-mhe org-irc org-info org-gnus
org-docview doc-view jka-compr image-mode org-bibtex bibtex org-bbdb
org-w3m org org-macro org-footnote org-pcomplete pcomplete org-list
org-faces org-entities noutline outline org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
ob-core ob-eval org-compat org-macs org-loaddefs cal-menu calendar
cal-loaddefs windmove dired-aux message sendmail format-spec rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev gmm-utils mailheader ispell flycheck find-func
company-ycmd f ycmd diff-mode diff request-deferred request mail-utils
url url-proxy url-privacy url-expand url-methods url-history url-cookie
url-domsuf url-util url-parse auth-source gnus-util mm-util help-fns
mail-prsvr password-cache url-vars mailcap json map hmac-def deferred s
dash cus-edit wid-edit company-oddmuse company-keywords company-etags
etags xref project eieio eieio-core company-gtags company-dabbrev-code
company-dabbrev company-files company-capf company-cmake company-xcode
company-clang company-semantic company-eclim company-template
company-css company-nxml company-bbdb company projectile subr-x grep
compile comint ansi-color ring ibuf-ext ibuffer thingatpt flx-ido advice
flx ido-vertical-mode ido cus-start cus-load dired-x dired printing
ps-print ps-def lpr server pinentry epa derived epg saveplace cl-macs
cl-seq use-package use-package-ensure use-package-delight
use-package-diminish use-package-bind-key bind-key easy-mmode
use-package-core edmacro kmacro finder-inf tex-site rx info package
epg-config seq byte-opt gv bytecomp byte-compile cl-extra help-mode
easymenu cconv cl-loaddefs pcase cl-lib time-date mule-util tooltip
eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel x-win
term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe
tabulated-list newcomment elisp-mode lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cl-generic cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms
cp51932 hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese charscript case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer cl-preloaded nadvice loaddefs button faces
cus-face macroexp files text-properties overlay sha1 md5 base64 format
env code-pages mule custom widget hashtable-print-readable backquote
dbusbind inotify dynamic-setting system-font-setting font-render-setting
move-toolbar gtk x-toolkit x multi-tty make-network-process emacs)

Memory information:
((conses 16 684834 57692)
 (symbols 48 49680 0)
 (miscs 40 2836 1964)
 (strings 32 162971 25757)
 (string-bytes 1 4632525)
 (vectors 16 77915)
 (vector-slots 8 1988582 65164)
 (floats 8 910 634)
 (intervals 56 11276 252)
 (buffers 976 73))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Sun, 30 Jun 2019 16:14:02 GMT) Full text and rfc822 format available.

Message #8 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: a.soroa <at> ehu.eus
Cc: 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Sun, 30 Jun 2019 18:13:19 +0200
a.soroa <at> ehu.eus (a.soroa) writes:

> 'pdb' command does not work if the directory where the python script is
> contains the characters '++'. Here is a receipt
>
> $ mkdir /tmp/foo++
> $ cd /tmp/foo++
> $ echo "print(10)" > pp.py
> $ emacs -Q
> M-x pdb
> Run pdb (like this): python3 -m pdb pp.py

I am able to reproduce this on current master.

The expected behaviour is to see TWO buffers in separate windows,
first "*gud-pp.py" with the following content:

    Current directory is /tmp/foo++/
    > /tmp/foo++/pp.py(1)<module>()
    -> print(10)
    (Pdb)

And the second a buffer visiting "pp.py".

The symptom is that you only see ONE buffer "*gud-pp.py*" with the
following content:

    Current directory is /tmp/foo++/

The bug (half) goes away as soon as I try to debug `gud-common-init'
using M-x edebug-defun, but only when stepping through manually using
"n" (and not when hitting "c").  Without this instrumentation, I get
the bug as above.  With it, I see the expected output in the
"*gud-pp.py*" buffer (but *not* the expected "pp.py" buffer).

I tried adding strategic calls to sit-for in gud-common-init and could
get the same result as with M-x edebug-defun.

Does anyone have any ideas what could cause this?

Thanks,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Sun, 30 Jun 2019 16:34:02 GMT) Full text and rfc822 format available.

Message #11 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Sun, 30 Jun 2019 19:33:46 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Sun, 30 Jun 2019 18:13:19 +0200
> Cc: 34489 <at> debbugs.gnu.org
> 
> The expected behaviour is to see TWO buffers in separate windows,
> first "*gud-pp.py" with the following content:
> 
>     Current directory is /tmp/foo++/
>     > /tmp/foo++/pp.py(1)<module>()
>     -> print(10)
>     (Pdb)
> 
> And the second a buffer visiting "pp.py".
> 
> The symptom is that you only see ONE buffer "*gud-pp.py*" with the
> following content:
> 
>     Current directory is /tmp/foo++/
> 
> The bug (half) goes away as soon as I try to debug `gud-common-init'
> using M-x edebug-defun, but only when stepping through manually using
> "n" (and not when hitting "c").  Without this instrumentation, I get
> the bug as above.  With it, I see the expected output in the
> "*gud-pp.py*" buffer (but *not* the expected "pp.py" buffer).
> 
> I tried adding strategic calls to sit-for in gud-common-init and could
> get the same result as with M-x edebug-defun.
> 
> Does anyone have any ideas what could cause this?

A stab in the dark: gud-pdb-marker-regexp?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Sun, 30 Jun 2019 17:26:02 GMT) Full text and rfc822 format available.

Message #14 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Sun, 30 Jun 2019 19:24:56 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> > Does anyone have any ideas what could cause this?
>
> A stab in the dark: gud-pdb-marker-regexp?

Indeed, that was the culprit.  I've attached a fix.

Thanks,
Stefan Kangas
[0001-Fix-pdb-when-absolute-file-name-contains.patch (application/x-patch, attachment)]

Added tag(s) patch. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Sun, 30 Jun 2019 18:33:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Tue, 02 Jul 2019 16:37:01 GMT) Full text and rfc822 format available.

Message #19 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Tue, 02 Jul 2019 19:35:51 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Sun, 30 Jun 2019 19:24:56 +0200
> Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
> 
> > A stab in the dark: gud-pdb-marker-regexp?
> 
> Indeed, that was the culprit.  I've attached a fix.

Hmm... I wonder why the code bothers specifying the allowed characters
explicitly, and in particular why it only allows ASCII characters.
Does the code work if the directory has non-ASCII characters instead
of "++"?

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Tue, 02 Jul 2019 19:43:02 GMT) Full text and rfc822 format available.

Message #22 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Tue, 2 Jul 2019 21:42:31 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:

> Hmm... I wonder why the code bothers specifying the allowed characters
> explicitly, and in particular why it only allows ASCII characters.
>
> Does the code work if the directory has non-ASCII characters instead
> of "++"?

No, it breaks.  For now, I've attached a patch to use "[:alnum:]",
which fixes that use case for me.

Regarding your first question, I'm not exactly sure why.  Maybe we
could go as far as just doing "[[:print:]]*" for that part - or
simply ".*".  What do you think?

Thanks,
Stefan Kangas
[0001-Make-M-x-pdb-handle-more-valid-file-names.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Wed, 03 Jul 2019 05:40:01 GMT) Full text and rfc822 format available.

Message #25 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Wed, 03 Jul 2019 08:39:19 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Tue, 2 Jul 2019 21:42:31 +0200
> Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
> 
> 
> [1:text/plain Hide]
> 
> Eli Zaretskii <eliz <at> gnu.org> writes:
> 
> > Hmm... I wonder why the code bothers specifying the allowed characters
> > explicitly, and in particular why it only allows ASCII characters.
> >
> > Does the code work if the directory has non-ASCII characters instead
> > of "++"?
> 
> No, it breaks.  For now, I've attached a patch to use "[:alnum:]",
> which fixes that use case for me.
> 
> Regarding your first question, I'm not exactly sure why.  Maybe we
> could go as far as just doing "[[:print:]]*" for that part - or
> simply ".*".  What do you think?

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.

Thanks.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#34489; Package emacs. (Fri, 05 Jul 2019 15:52:01 GMT) Full text and rfc822 format available.

Message #28 received at 34489 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Fri, 5 Jul 2019 17:51:00 +0200
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> 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
[0001-Make-M-x-pdb-use-graph-to-match-file-names.patch (text/x-patch, attachment)]

Reply sent to Eli Zaretskii <eliz <at> gnu.org>:
You have taken responsibility. (Sat, 06 Jul 2019 09:11:02 GMT) Full text and rfc822 format available.

Notification sent to a.soroa <at> ehu.eus (a.soroa):
bug acknowledged by developer. (Sat, 06 Jul 2019 09:11:03 GMT) Full text and rfc822 format available.

Message #33 received at 34489-done <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: a.soroa <at> ehu.eus, 34489-done <at> debbugs.gnu.org
Subject: Re: bug#34489: 25.2; pdb fails if directory contains '++'
Date: Sat, 06 Jul 2019 12:10:17 +0300
> From: Stefan Kangas <stefan <at> marxist.se>
> Date: Fri, 5 Jul 2019 17:51:00 +0200
> Cc: a.soroa <at> ehu.eus, 34489 <at> debbugs.gnu.org
> 
> > 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, pushed to the master branch.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 03 Aug 2019 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 239 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.