C-c C-h ('py-help-at-point') does not work because 'py-which-shell' is 'nil' in 'py-execute-string'.

Bug #911213 reported by gavenkoa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-mode.el
Fix Released
Medium
Andreas Roehler

Bug Description

For reference:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654398
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=311398

Package: python-mode
Version: 1:5.1.0-1
Severity: normal

-- System Information:
Debian Release: 6.0.3
  APT prefers stable
  APT policy: (990, 'stable'), (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages python-mode depends on:
ii emacs [emacsen] 23.2+1-7 The GNU Emacs editor (metapackage)
ii emacs21 [emacsen] 21.4a+1-5.6 The GNU Emacs editor
ii emacs22-gtk [emacsen] 22.2+2-5 The GNU Emacs editor (with GTK use
ii emacs23 [emacsen] 23.3+1-4 The GNU Emacs editor (with GTK+ us
ii pymacs 0.23-1.1 interface between Emacs Lisp and P
ii python 2.6.6-3+squeeze6 interactive high-level object-orie
ii python-central 0.6.16+nmu1 register and build utility for Pyt

Versions of packages python-mode recommends:
ii pychecker 0.8.18-7 tool to find common bugs in Python

Versions of packages python-mode suggests:
ii pylint 0.21.1-1 python code static checker and UML
ii python-ropemacs 0.6c2-4 Emacs mode for Python refactoring

-- no debconf information

To get help on symbol in .py buffer I run 'py-help-at-point' and result buffer
if empty.

I debug code and find that 'py-which-shell' is 'nil' in 'py-execute-string' so
this command do nothing:

      (let ((cmd (concat py-which-shell (if (string-equal py-which-bufname
                                                          "Jython")
                                            " -" ""))))
       ^^^^^^^^^^ 'cmd' is "" as 'py-which-shell' is 'nil') ^^^^^^^
        ;; otherwise either run it synchronously in a subprocess
        (save-excursion
          (set-buffer buf)
          (shell-command-on-region (point-min) (point-max)
                                   cmd py-output-buffer))
       ^^^^^^^^^^^^^^^^^^^^ 'cmd' is "" ^^^^^^^^^^^^

To temporary fix issue I write such code in my '.emacs':

  (eval-after-load 'python-mode
    (setq-default py-which-shell py-python-command)
    ;; (py-toggle-shells 'cpython)
    )

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
milestone: none → 6.0.5
importance: Undecided → Medium
Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 911213] [NEW] C-c C-h ('py-help-at-point') does not work because 'py-which-shell' is 'nil' in 'py-execute-string'.

Am 03.01.2012 13:54, schrieb gavenkoa:

Hi,

thanks for the detailed report. The bug should not exist in current
trunk and latest release(s)

attached a screenshot how py-help-at-point comes out here.

Andreas

Revision history for this message
gavenkoa (gavenkoa) wrote :

I grab latest sources:

  $ bzr log -r -1
------------------------------------------------------------
revno: 761
fixes bug(s): https://launchpad.net/bugs/910783
committer: Andreas Roehler <email address hidden>
branch nick: python-mode
timestamp: Tue 2012-01-03 10:09:06 +0100

And manually load:

  highlight-indentation.el
  python-mode.el

Bug go away.

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 911213] Re: C-c C-h ('py-help-at-point') does not work because 'py-which-shell' is 'nil' in 'py-execute-string'.

Am 03.01.2012 19:34, schrieb gavenkoa:
> I grab latest sources:
>
> $ bzr log -r -1
> ------------------------------------------------------------
> revno: 761
> fixes bug(s): https://launchpad.net/bugs/910783
> committer: Andreas Roehler<email address hidden>
> branch nick: python-mode
> timestamp: Tue 2012-01-03 10:09:06 +0100
>
> And manually load:
>
> highlight-indentation.el
> python-mode.el
>
> Bug go away.
>

great, will close it with "fix committed", as that happened some time ago :)

BTW have a look a delivered INSTALL file

Changed in python-mode:
status: New → 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.