Invalid Regexp: Trailing backslash

Bug #978735 reported by Conny Kühne
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
High
Andreas Roehler

Bug Description

I get the following error when trying to execute a buffer

Debugger entered--Lisp error: (invalid-regexp "Trailing backslash")
  string-match("\\" "ipython")
  (if (string-match sepchar name) (progn (setq prefix "ND")))
  (when (string-match sepchar name) (setq prefix "ND"))
  (let ((sepchar (or sepchar (py-separator-char))) prefix erg suffix) (when (string-match sepchar name) (setq prefix "ND")) (setq erg (cond ((string-match "ipython" name) (replace-regexp-in-string "ipython" "IPython" name)) ((string-match "jython" name) (replace-regexp-in-string "jython" "Jython" name)) ((string-match "python" name) (replace-regexp-in-string "python" "Python" name)) (t name))) (when dedicated (setq erg (make-temp-name (concat erg "-")))) (cond ((and prefix (string-match "^*" erg)) (setq erg (replace-regexp-in-string "^*" (concat "*" prefix " ") erg))) (prefix (setq erg (concat "*" prefix " " erg "*"))) (t (setq erg (concat "*" erg "*")))) erg)
  py-buffer-name-prepare("ipython" "\\")
...

I am on Mac OS X 10.6.8 using emacs 24.0.95.1. py-shell-name is set to "ipython".

Changed in python-mode:
importance: Undecided → High
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.1.0
Revision history for this message
Richard Stanton (a-stanton) wrote :

What version are you using? With r930 I get rather similar behavior on my Mac when I visit a buffer, but it goes away if I put the line

(setq py-separator-char 47)

in my init.el.

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 978735] Re: Invalid Regexp: Trailing backslash

Am 11.04.2012 20:48, schrieb Richard Stanton:
> What version are you using? With r930 I get rather similar behavior on
> my Mac when I visit a buffer, but it goes away if I put the line
>
> (setq py-separator-char 47)
>
> in my init.el.
>

thanks,

that meets it here:

running into trouble with tests from batch,
same tests pass when started interactively...

I'll push some changes - not solved yet

Revision history for this message
Conny Kühne (conny-kuehne) wrote :

Forgot to report back. (setq py-separator-char 47) works indeed. I think it should be documented somewhere though.

Revision history for this message
Richard Stanton (a-stanton) wrote :

Even easier would be to make this the default setting inside python-mode.

Revision history for this message
Andreas Roehler (a-roehler) wrote :

please re-open if not done

Changed in python-mode:
status: New → Fix Committed
Revision history for this message
Conny Kühne (conny-kuehne) wrote :

Works for me. Thanks.

Changed in python-mode:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.