pycomplete \w indent-for-tab-command)

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

Bug Description

I was hoping to implement pycomplete as the tab button but I want the case if no completions are found for it to do run (indent-for-tab-command) which is a normal tab where it will tab to the current level in the code hierarchy it detects or repeated tabs cycle through the tab hierarchy. This works if you set auto-complete.el to the tab key. It doesn't work right when setting pycomplete.el and not exactly sure how to change the code properly. I tried adding it in null completions below but that didn't seem to ever run the command. I can only figure out to put it at the end like below but this runs everytime even when a normal tab completion is run which isn't desired. Any help on this would be great.

(defun py-complete ()
  (interactive)
  (let* ((pymacs-forget-mutability t)
         (symbol (py-symbol-near-point))
         (completions
          (list (pycomplete-pycomplete symbol
                                       (py-find-global-imports)))))
    (cond ((null completions) ; no matching symbol
           (message "Can't find completion for \"%s\"" symbol)
           (ding))
          ((null (cdr completions)) ; sole completion
           (insert (car completions)))
          (t
           (message "Making completion list...")
           (with-output-to-temp-buffer "*PythonCompletions*"
             (display-completion-list completions))
           (message "Making completion list...%s" "done")))(indent-for-tab-command)))

Changed in python-mode:
assignee: nobody → Andreas Roehler (a-roehler)
importance: Undecided → Medium
status: New → Confirmed
Changed in python-mode:
status: Confirmed → Fix Committed
milestone: none → 6.0.5
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.