all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#19667: 25.0.50; python-completion-at-point complete broken
@ 2015-01-23 17:18 Carlos Pita
  2015-01-23 17:28 ` bug#19667: Carlos Pita
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Carlos Pita @ 2015-01-23 17:18 UTC (permalink / raw)
  To: 19667; +Cc: Fabian Ezequiel Gallina

It's calling (python-shell-completion-at-point process) but current
buffer is the python-mode one, so comint-last-prompt (and whatnot) is
undefined.

I think this got messed up in commit
http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/progmodes/python.el?id=2cb7592275bce47e44916134223b994a75e4b861





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#19667:
  2015-01-23 17:18 bug#19667: 25.0.50; python-completion-at-point complete broken Carlos Pita
@ 2015-01-23 17:28 ` Carlos Pita
  2015-01-23 18:30 ` bug#19667: Carlos Pita
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Carlos Pita @ 2015-01-23 17:28 UTC (permalink / raw)
  To: 19667

Sorry, the bug is much older, introduced in this merge from emacs 24:

http://git.savannah.gnu.org/cgit/emacs.git/commit/lisp/progmodes/python.el?id=9075fcc1937a211bc91e8bc49c332bc55ac99e24





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#19667:
  2015-01-23 17:18 bug#19667: 25.0.50; python-completion-at-point complete broken Carlos Pita
  2015-01-23 17:28 ` bug#19667: Carlos Pita
@ 2015-01-23 18:30 ` Carlos Pita
  2015-02-02 19:30 ` bug#19667: Carlos Pita
  2015-02-08  4:32 ` bug#19667: python-completion-at-point completely broken Fabián Ezequiel Gallina
  3 siblings, 0 replies; 6+ messages in thread
From: Carlos Pita @ 2015-01-23 18:30 UTC (permalink / raw)
  To: 19667

Something along these lines could be dirty but gets the job done:

diff --git a/.emacs.d/lisp/python.el b/.emacs.d/lisp/python.el
index 238c9b5..6bd9f5d 100644
--- a/.emacs.d/lisp/python.el
+++ b/.emacs.d/lisp/python.el
@@ -4469,7 +4469,9 @@ This is for compatibility with Emacs < 24.4."
                (overlay-end comint-last-prompt-overlay)))
         ((bound-and-true-p comint-last-prompt)
          comint-last-prompt)
-        (t nil)))
+        (t (save-excursion
+             (beginning-of-line 1)
+             (cons (point) (point))))))

This fakes a last prompt that starts and ends at the beginning of the
current line when the current buffer doesn't bind comint-last-prompt.





^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#19667:
  2015-01-23 17:18 bug#19667: 25.0.50; python-completion-at-point complete broken Carlos Pita
  2015-01-23 17:28 ` bug#19667: Carlos Pita
  2015-01-23 18:30 ` bug#19667: Carlos Pita
@ 2015-02-02 19:30 ` Carlos Pita
  2015-02-08  4:32 ` bug#19667: python-completion-at-point completely broken Fabián Ezequiel Gallina
  3 siblings, 0 replies; 6+ messages in thread
From: Carlos Pita @ 2015-02-02 19:30 UTC (permalink / raw)
  To: 19667; +Cc: Fabian Ezequiel Gallina

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

Patch updated against current master (954ca0f017f62f52ee679f2aa68effb20c917278).

[-- Attachment #2: comp-at-point.patch --]
[-- Type: text/x-patch, Size: 926 bytes --]

From 97da823811eba5fc3911210eb20b07665ca891ea Mon Sep 17 00:00:00 2001
From: memeplex <carlosjosepita@gmail.com>
Date: Fri, 23 Jan 2015 17:56:34 -0300
Subject: [PATCH] python.el: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19667

---
 .emacs.d/lisp/python.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/.emacs.d/lisp/python.el b/.emacs.d/lisp/python.el
index 2963706..30b62f5 100644
--- a/.emacs.d/lisp/python.el
+++ b/.emacs.d/lisp/python.el
@@ -4489,7 +4489,9 @@ This is for compatibility with Emacs < 24.4."
                (overlay-end comint-last-prompt-overlay)))
         ((bound-and-true-p comint-last-prompt)
          comint-last-prompt)
-        (t nil)))
+        (t (save-excursion
+             (beginning-of-line 1)
+             (cons (point) (point))))))
 
 (defun python-util-forward-comment (&optional direction)
   "Python mode specific version of `forward-comment'.
-- 
2.2.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* bug#19667: python-completion-at-point completely broken
  2015-01-23 17:18 bug#19667: 25.0.50; python-completion-at-point complete broken Carlos Pita
                   ` (2 preceding siblings ...)
  2015-02-02 19:30 ` bug#19667: Carlos Pita
@ 2015-02-08  4:32 ` Fabián Ezequiel Gallina
  2015-02-08  4:33   ` Fabián Ezequiel Gallina
  3 siblings, 1 reply; 6+ messages in thread
From: Fabián Ezequiel Gallina @ 2015-02-08  4:32 UTC (permalink / raw)
  To: 19667-done


Fixed at revno dcec731 in the emacs-24 branch.


Cheers,
Fabián.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* bug#19667: python-completion-at-point completely broken
  2015-02-08  4:32 ` bug#19667: python-completion-at-point completely broken Fabián Ezequiel Gallina
@ 2015-02-08  4:33   ` Fabián Ezequiel Gallina
  0 siblings, 0 replies; 6+ messages in thread
From: Fabián Ezequiel Gallina @ 2015-02-08  4:33 UTC (permalink / raw)
  To: 19667-done

fgallina@gnu.org (Fabián Ezequiel Gallina) writes:

> Fixed at revno dcec731 in the emacs-24 branch.
>

I meant master.





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-02-08  4:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-23 17:18 bug#19667: 25.0.50; python-completion-at-point complete broken Carlos Pita
2015-01-23 17:28 ` bug#19667: Carlos Pita
2015-01-23 18:30 ` bug#19667: Carlos Pita
2015-02-02 19:30 ` bug#19667: Carlos Pita
2015-02-08  4:32 ` bug#19667: python-completion-at-point completely broken Fabián Ezequiel Gallina
2015-02-08  4:33   ` 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.