* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
@ 2014-08-11 6:43 Thierry Volpiatto
2014-08-11 7:16 ` Glenn Morris
2015-07-06 5:36 ` Fabián Ezequiel Gallina
0 siblings, 2 replies; 12+ messages in thread
From: Thierry Volpiatto @ 2014-08-11 6:43 UTC (permalink / raw)
To: 18244
1) Open some python files.
2) (semantic-mode 1)
Debugger entered--Lisp error: (file-error "Searching for program" "aucun fichier ou dossier de ce type" "nil")
start-process("Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" #<buffer *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*> "nil" "-i" "--autoindent")
apply(start-process "Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" #<buffer *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*> "nil" ("-i" "--autoindent"))
start-file-process("Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" #<buffer *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*> "nil" "-i" "--autoindent")
apply(start-file-process "Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" #<buffer *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*> "nil" ("-i" "--autoindent"))
comint-exec-1("Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" #<buffer *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*> "nil" ("-i" "--autoindent"))
comint-exec(#<buffer *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*> "Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" "nil" nil ("-i" "--autoindent"))
make-comint-in-buffer("Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" " *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*" "nil" nil "-i" "--autoindent")
apply(make-comint-in-buffer "Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" " *Python Internal [fab30fe3f846223fdafbc4e25eb683fd]*" "nil" nil ("-i" "--autoindent"))
python-shell-make-comint("nil -i --autoindent" "Python Internal [fab30fe3f846223fdafbc4e25eb683fd]" nil t)
run-python-internal()
python-shell-internal-get-or-create-process()
python-shell-internal-send-string("import sys;print ('\\n'.join(sys.path))")
semantic-python-get-system-include-path()
(progn (semantic-python-get-system-include-path))
(if (and (featurep (quote python)) (not noninteractive)) (progn (semantic-python-get-system-include-path)))
(when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path))
eval((when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)))
byte-code("\303\b\304N\211.\203.\0 @\202.\0\n)!\207" [symbol sv exp eval saved-value] 4)
custom-initialize-reset(semantic-python-dependency-system-include-path (when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)))
custom-declare-variable(semantic-python-dependency-system-include-path (when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)) "The system include path used by Python language." :group python :group semantic :type (repeat (directory :tag "Directory")) :set #[(sym val) "\303\b \"\210 .\304\305\nBC\306\307#\210\310\311\307\"\210\n\210)\312\313!\205\".\310\313\307\"\207" [sym val tmp0 set-default mode-local-bind semantic-dependency-system-include-path (mode-variable-flag t) python-mode mode-local-map-mode-buffers #[nil "\302\301!\210\b\211.\207" [tmp0 semantic-dependency-system-include-path make-local-variable] 2] fboundp semantic-decoration-unparsed-include-do-reset] 4])
byte-code("\306\300\307\310\311\312\311\313\314\315\316\317&\v\210\b.\320\321 BC\322\323#\210\324\325\323\"\210 \210)\326\321\323.^[\327\v!\330.\x1d\n\204F.\x0e\x1f\211.\204F.\x0e .\x0e.\205E.\331.\x0e.\".\n\203p.\f\204p.\n\332N\203_.\331.\n\332N\"\211.\204F.\n\211.\333N\206j.\n\334N)\211.\204J.\f,\335\336#\210\326\321\323\300#\207" [semantic-python-dependency-system-include-path tmp0 mode symbol bind name custom-declare-variable (when (and (featurep (quote python)) (not noninteractive)) (semantic-python-get-system-include-path)) "The system include path used by Python language." :group python semantic :type (repeat (directory :tag "Directory")) :set #[(sym val) "\303\b \"\210 .\304\305\nBC\306\307#\210\310\311\307\"\210\n\210)\312\313!\205\".\310\313\307\"\207" [sym val tmp0 set-default mode-local-bind semantic-dependency-system-include-path (mode-variable-flag t) python-mode mode-local-map-mode-buffers #[nil "\302\301!\210\b\211.\207" [tmp0 semantic-dependency-system-include-path make-local-variable] 2] fboundp semantic-decoration-unparsed-include-do-reset] 4] mode-local-bind semantic-dependency-system-include-path (mode-variable-flag t) python-mode mode-local-map-mode-buffers #[nil "\302\301!\210\b\211.\207" [tmp0 semantic-dependency-system-include-path make-local-variable] 2] put symbol-name nil intern-soft mode-local-symbol-table mode-local-parent derived-mode-parent variable-documentation "System path to search for include files." mode-local-active-mode major-mode] 12)
wisent-python-default-setup()
semantic-new-buffer-fcn()
semantic-mode(1)
eval((semantic-mode 1) nil)
eval-last-sexp-1(nil)
eval-last-sexp(nil)
call-interactively(eval-last-sexp)
tv-eval-last-sexp-at-eol()
call-interactively(tv-eval-last-sexp-at-eol nil nil)
command-execute(tv-eval-last-sexp-at-eol)
In GNU Emacs 24.3.92.1 (x86_64-unknown-linux-gnu, X toolkit)
of 2014-08-09 on dell-14z
Windowing system distributor `The X.Org Foundation', version 11.0.11501000
System Description: Ubuntu 14.04.1 LTS
Configured using:
`configure --with-x-toolkit=lucid --without-toolkit-scroll-bars
--without-gconf --without-gsettings'
Important settings:
value of $LANG: fr_FR.UTF-8
locale-coding-system: utf-8-unix
Major mode: Emacs-Lisp
Minor modes in effect:
git-gutter-mode: t
psession-mode: t
golden-ratio-mode: t
winner-mode: t
global-undo-tree-mode: t
undo-tree-mode: t
auto-image-file-mode: t
eldoc-in-minibuffer-mode: t
show-paren-mode: t
display-time-mode: t
recentf-mode: t
savehist-mode: t
eldoc-mode: t
minibuffer-depth-indicate-mode: t
helm-mode: t
helm-descbinds-mode: t
shell-dirtrack-mode: t
helm-adaptive-mode: t
helm-match-plugin-mode: t
helm-occur-match-plugin-mode: t
tooltip-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
column-number-mode: t
line-number-mode: t
transient-mark-mode: t
Recent input:
<down> <down> <down> <f8> q M-x <down> <down> <return>
M-p M-p M-p M-p M-p M-p M-p M-p M-p <return> 1 ) SPC
O p e n SPC s o m e SPC p y t h o n SPC f i l e s .
<return> 2 ) SPC M-( s e m a n t i c - m o d e SPC
1 <right> <return> <return> M-y M-y M-y M-y <return>
C-c C-c d n <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up>
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> M-<
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> C-c C-c ? r <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> <down> <down>
<down> <down> <down> <down> <down> <down> C-c C-c <down>
C-c C-k y C-< q C-< C-x C-² M-x <return>
Recent messages:
report-emacs-bug-hook: M-x report-emacs-bug was canceled, please read *Bug Help* buffer
Mark set [2 times]
NUL characters found, which may cause problems. Continue sending? (d, r, s, e, ?): [2 times]
Mark set
Sending...
message-send: No methods specified to send by
Mark set
Sending...
message-send: No methods specified to send by
Message modified; kill anyway? (y or n) y
Load-path shadows:
~/elisp/auctex/lpath hides ~/elisp/emacs-wget/lpath
/usr/local/share/emacs/24.3.92/lisp/emacs-lisp/tq hides ~/elisp/emms/lisp/tq
Features:
(help-mode mail-extr helm-ring cl-indent shadow epa-mail mule-util
emacsbug helm-command vc-rcs sh-script smie executable vc-git
naquadah-theme em-unix em-script em-prompt em-ls em-hist em-pred em-glob
em-dirs em-cmpl em-basic em-banner em-alias align-let git-gutter server
psession golden-ratio winner undo-tree diff slime-xref-browser
slime-banner slime-tramp slime-asdf slime-fancy slime-trace-dialog
slime-fontifying-fu slime-package-fu slime-references
slime-compiler-notes-tree slime-scratch slime-presentations bridge
slime-fuzzy slime-fancy-trace slime-fancy-inspector slime-c-p-c
slime-editing-commands slime-autodoc slime-repl elp slime-parse slime
gud apropos etags arc-mode archive-mode image-file xdvi-search
preview-latex tex-site auto-loads pcomplete-extension pcmpl-unix
pcmpl-gnu em-term term disp-table ehelp helm-ipython helm-elisp
helm-eval python json eldoc-eval warnings whitespace paren time recentf
tree-widget savehist mu4e-config org-mu4e helm-mu mu4e-contrib mu4e
mu4e-speedbar speedbar sb-image ezimage dframe mu4e-main mu4e-view
mu4e-headers mu4e-compose mu4e-draft mu4e-actions ido rfc2368 mu4e-mark
mu4e-message html2text mu4e-proc mu4e-utils mu4e-lists mu4e-about
mu4e-vars mu4e-meta gnus-dired nnir gnus-sum gnus-group gnus-undo nnmail
mail-source gnus-start gnus-spec gnus-int gnus-range gnus-win nnoo
config-w3m w3m-search w3m doc-view jka-compr image-mode timezone
w3m-hist w3m-fb bookmark-w3m w3m-ems w3m-ccl ccl w3m-favicon w3m-image
w3m-proc w3m-util w3m-load smtpmail-async smtpmail sendmail dired-async
iterator lacarte iedit-rect iedit iedit-lib smallurl mm-url gnus
gnus-ems nnheader wid-edit rectangle-utils rect ledger-config ledger
esh-var esh-io esh-cmd esh-opt esh-ext esh-proc eldoc esh-groups eshell
esh-module esh-mode esh-arg esh-util tv-utils async pcvs vc-cvs
pcvs-parse pcvs-info pcvs-defs pcvs-util ewoc mb-depth cl-info hyperspec
slime-autoloads esh-toggle flymake no-word htmlize cl dired-extension
emms-mpd-config emms-playlist-limit emms-volume emms-volume-amixer
emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-cue emms-mode-line-icon
emms-browser sort emms-playlist-sort emms-last-played emms-player-xine
emms-player-mpd tq emms-playing-time emms-lyrics emms-url hl-line
emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-ogginfo
emms-info-mp3info emms-playlist-mode emms-player-vlc emms-player-mplayer
emms-info emms-streams later-do emms-source-playlist emms-source-file
emms-player-simple emms-setup emms emms-compat org-config-thierry ob-sh
org-crypt cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew
holidays hol-loaddefs appt diary-lib diary-loaddefs
org-annotation-helper addressbook-bookmark message rfc822 mml mml-sec
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader firefox-protocol
bookmark-firefox-handler bookmark-extensions org org-macro org-footnote
org-pcomplete org-list org-faces org-entities noutline outline
easy-mmode org-version ob-emacs-lisp ob ob-tangle org-src ob-ref ob-lob
ob-table ob-keys ob-exp ob-comint ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs init-helm-thierry
helm-mode helm-dictionary helm-ls-git helm-descbinds helm-ls-hg
helm-files image-dired tramp tramp-compat tramp-loaddefs trampver shell
pcomplete format-spec dired-x dired-aux ffap thingatpt helm-buffers
helm-elscreen helm-tags helm-bookmark helm-adaptive helm-info helm-net
browse-url xml url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util url-parse url-vars mailcap
helm-plugin bookmark pp helm-help helm-match-plugin helm-grep wgrep-helm
wgrep helm-regexp grep helm-external helm-utils dired compile comint
ansi-color ring helm-locate helm cl-macs gv vc vc-dispatcher helm-config
helm-aliases epa-file epa derived epg epg-config auth-source eieio
byte-opt bytecomp byte-compile cconv eieio-core gnus-util mm-util
mail-prsvr password-cache package time-date avoid cus-start cus-load
w3m-wget info easymenu edmacro kmacro advice help-fns net-utils
cl-loaddefs cl-lib tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment lisp-mode prog-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process dbusbind
gfilenotify dynamic-setting font-render-setting x-toolkit x multi-tty
emacs)
Memory information:
((conses 16 482044 40685)
(symbols 48 54894 4)
(miscs 40 386 1000)
(strings 32 130267 14038)
(string-bytes 1 3821416)
(vectors 16 46164)
(vector-slots 8 791234 24790)
(floats 8 2153 314)
(intervals 56 3232 0)
(buffers 960 88)
(heap 1024 34545 2356))
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-11 6:43 bug#18244: 24.3.92; Error with semantic-mode when python buffers are present Thierry Volpiatto
@ 2014-08-11 7:16 ` Glenn Morris
2014-08-11 13:14 ` Thierry Volpiatto
2015-07-06 5:36 ` Fabián Ezequiel Gallina
1 sibling, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2014-08-11 7:16 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: 18244
Seems like you don't have "python" in your PATH.
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-11 7:16 ` Glenn Morris
@ 2014-08-11 13:14 ` Thierry Volpiatto
2014-08-11 15:37 ` Glenn Morris
0 siblings, 1 reply; 12+ messages in thread
From: Thierry Volpiatto @ 2014-08-11 13:14 UTC (permalink / raw)
To: Glenn Morris; +Cc: 18244
Glenn Morris <rgm@gnu.org> writes:
> Seems like you don't have "python" in your PATH.
I use ipython in my config, and indeed ipython is
not yet installed in my new OS. Now it is done, sorry for the noise,
maybe this should fail more gracefully ? Sending a useful error message
?
Thanks.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-11 13:14 ` Thierry Volpiatto
@ 2014-08-11 15:37 ` Glenn Morris
2014-08-12 5:27 ` Thierry Volpiatto
0 siblings, 1 reply; 12+ messages in thread
From: Glenn Morris @ 2014-08-11 15:37 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: 18244
Thierry Volpiatto wrote:
> I use ipython in my config, and indeed ipython is
> not yet installed in my new OS. Now it is done, sorry for the noise,
> maybe this should fail more gracefully ? Sending a useful error message
> ?
Yes, seems like an issue with both semantic and python.el
(which maybe does not need to call executable-find, and maybe does not
need its own special value for exec-path?).
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-11 15:37 ` Glenn Morris
@ 2014-08-12 5:27 ` Thierry Volpiatto
2014-08-18 16:20 ` Stefan Monnier
0 siblings, 1 reply; 12+ messages in thread
From: Thierry Volpiatto @ 2014-08-12 5:27 UTC (permalink / raw)
To: Glenn Morris; +Cc: 18244
Glenn Morris <rgm@gnu.org> writes:
> Thierry Volpiatto wrote:
>
>> I use ipython in my config, and indeed ipython is
>> not yet installed in my new OS. Now it is done, sorry for the noise,
>> maybe this should fail more gracefully ? Sending a useful error message
>> ?
>
> Yes, seems like an issue with both semantic and python.el
> (which maybe does not need to call executable-find, and maybe does not
> need its own special value for exec-path?).
Also the (annoying) warning message about setting local vars while
let-bound can be easily avoided:
,----[ python.el, inferior-python-mode ]
| (let ((interpreter python-shell-interpreter)
| (args python-shell-interpreter-args))
| (when python-shell--parent-buffer
| (python-util-clone-local-variables python-shell--parent-buffer))
| ;; Users can override default values for these vars when calling
| ;; `run-python'. This ensures new values let-bound in
| ;; `python-shell-make-comint' are locally set.
| (set (make-local-variable 'python-shell-interpreter) interpreter)
| (set (make-local-variable 'python-shell-interpreter-args) args))
| [...]
`----
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-12 5:27 ` Thierry Volpiatto
@ 2014-08-18 16:20 ` Stefan Monnier
2014-08-18 16:24 ` Thierry Volpiatto
0 siblings, 1 reply; 12+ messages in thread
From: Stefan Monnier @ 2014-08-18 16:20 UTC (permalink / raw)
To: Fabián E. Gallina; +Cc: 18244, Thierry Volpiatto
Glenn said:
>> Yes, seems like an issue with both semantic and python.el
>> (which maybe does not need to call executable-find,
Haven't looked at the Semantic code, but I removed the executable-find
call in python.el since it was redundant anyway and hence ended up just
hiding the name of the program we're looking for.
I also added some FIXME comments in other code using executable-find
where several things look fishy.
Fabián, can you take a look at those FIXMEs?
>> and maybe does not need its own special value for exec-path?).
It does, in order to support Python's virtualenv.
BTW, Fabián, could you also rename python-shell-virtualenv-path to
something else (e.g python-shell-virtualenv-root or
python-shell-virtualenv-directory or python-shell-virtualenv-filename or
just python-shell-virtualenv?) since the GNU convention is to use "path"
only to mean "a list of directories in which we search", as in $PATH,
$MANPATH, load-path, ...
Thierry said:
> Also the (annoying) warning message about setting local vars while
> let-bound can be easily avoided:
I know the kind of message you're talking about, but I don't know when
it occurs. Do you have a recipe?
> ,----[ python.el, inferior-python-mode ]
> | (let ((interpreter python-shell-interpreter)
> | (args python-shell-interpreter-args))
> | (when python-shell--parent-buffer
> | (python-util-clone-local-variables python-shell--parent-buffer))
> | ;; Users can override default values for these vars when calling
> | ;; `run-python'. This ensures new values let-bound in
> | ;; `python-shell-make-comint' are locally set.
> | (set (make-local-variable 'python-shell-interpreter) interpreter)
> | (set (make-local-variable 'python-shell-interpreter-args) args))
> | [...]
> `----
Not sure if someone installed your code already or what, but the above
looks identical to the current code. Am I missing something?
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-18 16:20 ` Stefan Monnier
@ 2014-08-18 16:24 ` Thierry Volpiatto
2014-08-18 18:27 ` Stefan Monnier
0 siblings, 1 reply; 12+ messages in thread
From: Thierry Volpiatto @ 2014-08-18 16:24 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Fabián E. Gallina, 18244
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
> Thierry said:
>> Also the (annoying) warning message about setting local vars while
>> let-bound can be easily avoided:
>
> I know the kind of message you're talking about, but I don't know when
> it occurs. Do you have a recipe?
It occur in the following code at beginning of `inferior-python-mode'
>
>
>> ,----[ python.el, inferior-python-mode ]
>> | (let ((interpreter python-shell-interpreter)
>> | (args python-shell-interpreter-args))
>> | (when python-shell--parent-buffer
>> | (python-util-clone-local-variables python-shell--parent-buffer))
>> | ;; Users can override default values for these vars when calling
>> | ;; `run-python'. This ensures new values let-bound in
>> | ;; `python-shell-make-comint' are locally set.
>> | (set (make-local-variable 'python-shell-interpreter) interpreter)
>> | (set (make-local-variable 'python-shell-interpreter-args) args))
>> | [...]
>> `----
>
> Not sure if someone installed your code already or what, but the above
> looks identical to the current code. Am I missing something?
Yes :-) it is not my code but the current code where the change have to
occur.
IMO what you need is:
Remove the let-binding completely and use only:
(set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
(set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
But maybe I am wrong, I am not familiar with python.el.
@@ -2369,9 +2369,7 @@ variable.
- (let ((interpreter python-shell-interpreter)
- (args python-shell-interpreter-args))
- (when python-shell--parent-buffer
- (python-util-clone-local-variables python-shell--parent-buffer))
- ;; Users can override default values for these vars when calling
- ;; `run-python'. This ensures new values let-bound in
- ;; `python-shell-make-comint' are locally set.
- (set (make-local-variable 'python-shell-interpreter) interpreter)
- (set (make-local-variable 'python-shell-interpreter-args) args))
+ (set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
+ (set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
+ (when python-shell--parent-buffer
+ (python-util-clone-local-variables python-shell--parent-buffer))
+ ;; Users can override default values for these vars when calling
+ ;; `run-python'. This ensures new values let-bound in
+ ;; `python-shell-make-comint' are locally set.
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-18 16:24 ` Thierry Volpiatto
@ 2014-08-18 18:27 ` Stefan Monnier
2014-08-19 5:44 ` Thierry Volpiatto
2014-08-19 14:26 ` Andreas Röhler
0 siblings, 2 replies; 12+ messages in thread
From: Stefan Monnier @ 2014-08-18 18:27 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: Fabián E. Gallina, 18244
> Remove the let-binding completely and use only:
> (set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
> (set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
I can't see why that would help. This removes let-bindings of `args'
and `interpreter' but these vars are never made buffer-local
(hopefully), so the warning can't be about these vars being made
buffer-local while they're let-bound.
Stefan
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-18 18:27 ` Stefan Monnier
@ 2014-08-19 5:44 ` Thierry Volpiatto
2015-05-18 4:31 ` Thierry Volpiatto
2014-08-19 14:26 ` Andreas Röhler
1 sibling, 1 reply; 12+ messages in thread
From: Thierry Volpiatto @ 2014-08-19 5:44 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Fabián E. Gallina, 18244
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> Remove the let-binding completely and use only:
>
>> (set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
>> (set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
>
> I can't see why that would help. This removes let-bindings of `args'
> and `interpreter' but these vars are never made buffer-local
> (hopefully), so the warning can't be about these vars being made
> buffer-local while they're let-bound.
Indeed yes, I will have another look (more carefully this time).
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-18 18:27 ` Stefan Monnier
2014-08-19 5:44 ` Thierry Volpiatto
@ 2014-08-19 14:26 ` Andreas Röhler
1 sibling, 0 replies; 12+ messages in thread
From: Andreas Röhler @ 2014-08-19 14:26 UTC (permalink / raw)
To: 18244
On 18.08.2014 20:27, Stefan Monnier wrote:
>> Remove the let-binding completely and use only:
>
>> (set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
>> (set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
>
> I can't see why that would help. This removes let-bindings of `args'
> and `interpreter' but these vars are never made buffer-local
> (hopefully), so the warning can't be about these vars being made
> buffer-local while they're let-bound.
>
>
> Stefan
>
>
>
>
Here some messages from M-x run-python RET
Get the first and second with latest pretest 24.3.93.1, but not before:
Making python-shell-interpreter local to *Python* while let-bound!
Making python-shell-interpreter-args local to *Python* while let-bound!
Sent python-shell-completion-setup-code
Sent python-ffap-setup-code
Sent python-eldoc-setup-code
You can run the command `run-python' with C-c C-p
Sent python-eldoc-setup-code
Mark set
Maybe of interest here?,
Andreas
^ permalink raw reply [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-19 5:44 ` Thierry Volpiatto
@ 2015-05-18 4:31 ` Thierry Volpiatto
0 siblings, 0 replies; 12+ messages in thread
From: Thierry Volpiatto @ 2015-05-18 4:31 UTC (permalink / raw)
To: Stefan Monnier; +Cc: Fabián E. Gallina, 18244
Thierry Volpiatto <thierry.volpiatto@gmail.com> writes:
> Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>
>>> Remove the let-binding completely and use only:
>>
>>> (set (make-local-variable 'python-shell-interpreter) python-shell-interpreter)
>>> (set (make-local-variable 'python-shell-interpreter-args) python-shell-interpreter-args)
>>
>> I can't see why that would help. This removes let-bindings of `args'
>> and `interpreter' but these vars are never made buffer-local
>> (hopefully), so the warning can't be about these vars being made
>> buffer-local while they're let-bound.
>
> Indeed yes, I will have another look (more carefully this time).
I see this have not been fixed, still have warnings about
python-shell-interpreter and python-shell-interpreter-args
made local while let-bound when opening a python file.
Using the following patch fix the problem, but as I am not familiar with
pyhon.el, please review.
Changes from HEAD to working tree
1 file changed, 6 insertions(+), 18 deletions(-)
lisp/progmodes/python.el | 24 ++++++------------------
Modified lisp/progmodes/python.el
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 4b0a028..1b4cf2f 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -2496,15 +2496,8 @@ initialization of the interpreter via `python-shell-setup-codes'
variable.
\(Type \\[describe-mode] in the process buffer for a list of commands.)"
- (let ((interpreter python-shell-interpreter)
- (args python-shell-interpreter-args))
- (when python-shell--parent-buffer
- (python-util-clone-local-variables python-shell--parent-buffer))
- ;; Users can override default values for these vars when calling
- ;; `run-python'. This ensures new values let-bound in
- ;; `python-shell-make-comint' are locally set.
- (set (make-local-variable 'python-shell-interpreter) interpreter)
- (set (make-local-variable 'python-shell-interpreter-args) args))
+ (when python-shell--parent-buffer
+ (python-util-clone-local-variables python-shell--parent-buffer))
(set (make-local-variable 'python-shell--prompt-calculated-input-regexp) nil)
(set (make-local-variable 'python-shell--prompt-calculated-output-regexp) nil)
(python-shell-prompt-set-calculated-regexps)
@@ -2553,16 +2546,11 @@ killed."
(buffer (apply #'make-comint-in-buffer proc-name proc-buffer-name
interpreter nil args))
(python-shell--parent-buffer (current-buffer))
- (process (get-buffer-process buffer))
- ;; As the user may have overridden default values for
- ;; these vars on `run-python', let-binding them allows
- ;; to have the new right values in all setup code
- ;; that's is done in `inferior-python-mode', which is
- ;; important, especially for prompt detection.
- (python-shell-interpreter interpreter)
- (python-shell-interpreter-args
- (mapconcat #'identity args " ")))
+ (process (get-buffer-process buffer)))
(with-current-buffer buffer
+ (set (make-local-variable 'python-shell-interpreter) interpreter)
+ (set (make-local-variable 'python-shell-interpreter-args)
+ (mapconcat #'identity args " "))
(inferior-python-mode))
(when show (display-buffer buffer))
(and internal (set-process-query-on-exit-flag process nil))))
--
Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply related [flat|nested] 12+ messages in thread
* bug#18244: 24.3.92; Error with semantic-mode when python buffers are present.
2014-08-11 6:43 bug#18244: 24.3.92; Error with semantic-mode when python buffers are present Thierry Volpiatto
2014-08-11 7:16 ` Glenn Morris
@ 2015-07-06 5:36 ` Fabián Ezequiel Gallina
1 sibling, 0 replies; 12+ messages in thread
From: Fabián Ezequiel Gallina @ 2015-07-06 5:36 UTC (permalink / raw)
To: 18244-done
Fixed at f3400f4 in the master branch.
--
Thanks,
Fabián.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2015-07-06 5:36 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-11 6:43 bug#18244: 24.3.92; Error with semantic-mode when python buffers are present Thierry Volpiatto
2014-08-11 7:16 ` Glenn Morris
2014-08-11 13:14 ` Thierry Volpiatto
2014-08-11 15:37 ` Glenn Morris
2014-08-12 5:27 ` Thierry Volpiatto
2014-08-18 16:20 ` Stefan Monnier
2014-08-18 16:24 ` Thierry Volpiatto
2014-08-18 18:27 ` Stefan Monnier
2014-08-19 5:44 ` Thierry Volpiatto
2015-05-18 4:31 ` Thierry Volpiatto
2014-08-19 14:26 ` Andreas Röhler
2015-07-06 5:36 ` Fabián Ezequiel Gallina
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.