GNU bug report logs - #10546
completion-at-point bug

Previous Next

Package: emacs;

Reported by: Andreas Röhler <andreas.roehler <at> online.de>

Date: Wed, 18 Jan 2012 18:53:02 UTC

Severity: normal

Tags: notabug

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

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 10546 in the body.
You can then email your comments to 10546 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#10546; Package emacs. (Wed, 18 Jan 2012 18:53:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andreas Röhler <andreas.roehler <at> online.de>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 18 Jan 2012 18:53:02 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> online.de>
To: bug-gnu-emacs <at> gnu.org
Subject: completion-at-point bug
Date: Wed, 18 Jan 2012 19:50:56 +0100
[Message part 1 (text/plain, inline)]
Hi,

get wrong error messages like

let*: Wrong type argument: listp, 16

from `completion-at-point' in cases `tab-to-tab-stop'
sends back a number - the column reached.

;;;;;;;;;
bug pertains to Emacs-23 and 24
patch attached

thanks all,

Andreas
[completion-at-point.patch (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10546; Package emacs. (Wed, 18 Jan 2012 21:24:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andreas Röhler <andreas.roehler <at> online.de>
Cc: 10546 <at> debbugs.gnu.org
Subject: Re: bug#10546: completion-at-point bug
Date: Wed, 18 Jan 2012 16:22:21 -0500
> get wrong error messages like

> let*: Wrong type argument: listp, 16

> from `completion-at-point' in cases `tab-to-tab-stop'
> sends back a number - the column reached.

Can you give us the context: what did you do in order for
completion-at-point to call tab-to-tab-stop?


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10546; Package emacs. (Sun, 22 Jan 2012 14:11:01 GMT) Full text and rfc822 format available.

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

From: Andreas Röhler <andreas.roehler <at> online.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 10546 <at> debbugs.gnu.org
Subject: Re: bug#10546: completion-at-point bug
Date: Sun, 22 Jan 2012 15:10:18 +0100
Am 18.01.2012 22:22, schrieb Stefan Monnier:
>> get wrong error messages like
>
>> let*: Wrong type argument: listp, 16
>
>> from `completion-at-point' in cases `tab-to-tab-stop'
>> sends back a number - the column reached.
>
> Can you give us the context: what did you do in order for
> completion-at-point to call tab-to-tab-stop?
>
>
>          Stefan
>

Hi Stefan,

bug seen from forms in python-mode.el
http://launchpad.net/python-mode

when `py-completion-at-point' doesn't see a completion,
the feature is to insert a TAB then.

In result a number is returned by `tab-to-tab-stop',
which seems to confuse `completion-at-point', sending
the wrong error message.

(defun py-completion-at-point ()
  (interactive "*")
  (let* ((start (when (skip-chars-backward "[[:alnum:]_]")(point)))
         (end (progn (skip-chars-forward "[[:alnum:]_]")(point)))
         (completion (when start
                       (python-symbol-completions 
(buffer-substring-no-properties start end)))))
    (if completion
        (progn
          (delete-region start end)
          (insert (car completion)))
      (tab-to-tab-stop))))

;;;;;;;;;

`py-completion-at-point' is called by a var `py-complete-function', 
whilst `python-mode' runs

  (add-hook 'completion-at-point-functions
            py-complete-function nil 'local)

So far,

thanks developing our tool-of-pleasure :)

Andreas

--
http://launchpad.net/python-mode
http://launchpad.net/s-x-emacs-werkstatt/





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10546; Package emacs. (Sun, 22 Jan 2012 21:23:01 GMT) Full text and rfc822 format available.

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

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Andreas Röhler <andreas.roehler <at> online.de>
Cc: 10546 <at> debbugs.gnu.org
Subject: Re: bug#10546: completion-at-point bug
Date: Sun, 22 Jan 2012 16:22:14 -0500
> bug seen from forms in python-mode.el
> http://launchpad.net/python-mode

> when `py-completion-at-point' doesn't see a completion,
> the feature is to insert a TAB then.

That's because python-mode.AL has a bug:

  (add-hook 'completion-at-point-functions
            py-complete-function nil 'local)

The doc of completion-at-point-functions says:

  Each function on this hook is called in turn without any argument and should
  return either nil to mean that it is not applicable at point,
  or a function of no argument to perform completion (discouraged),
  or a list of the form (START END COLLECTION &rest PROPS) where
   START and END delimit the entity to complete and should include point,
   COLLECTION is the completion table to use to complete it, and
   PROPS is a property list for additional information.
            

-- Stefan




Added tag(s) notabug. Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Sun, 22 Jan 2012 21:24:01 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 10546 <at> debbugs.gnu.org and Andreas Röhler <andreas.roehler <at> online.de> Request was from Stefan Monnier <monnier <at> iro.umontreal.ca> to control <at> debbugs.gnu.org. (Sun, 22 Jan 2012 21:24:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 20 Feb 2012 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 184 days ago.

Previous Next


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