emacs bash tab-completion doesn't work for commands with complete scripts in /usr/share/bash-completion/completions/

Bug #1370449 reported by GeorgeDunlap
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
emacs24 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I'm using emacs with the following two lines in my ~/.emacsrc:

(require 'bash-completion)
(bash-completion-setup)

In an emacs shell window, I noticed that the git tab-complete wasn't working; but the stg tab-complete was. In a normal terminal window, both worked just fine.

After doing some investigation, I discovered that there are two places where completion scripts are kept: /usr/share/bash-completion/completions/ and /etc/bash_completion.d/.

All commands with their completion scripts in /etc/bash_completion.d/ work with tab-complete in an emacs window; this includes stg, grub, &c. All commands with their completion scripts in /usr/share/bash-completion/completions/ don't work with tab-complete in emacs; this includes git, gzip, &c.

Steps to reproduce:
* Add the above two lines to ~/.emacrc
* Start emacs
* Open a shell (M-x shell)
* Type "git check" and then hit tab.

Expected behavior: emacs completes it to "git checkout"

Actual behavior: emacs says "No completions".

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: emacs 45.0ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-35.62-generic 3.13.11.6
Uname: Linux 3.13.0-35-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Sep 17 11:32:34 2014
InstallationDate: Installed on 2012-03-26 (904 days ago)
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
PackageArchitecture: all
SourcePackage: emacs-defaults
UpgradeStatus: Upgraded to trusty on 2014-09-04 (12 days ago)

Revision history for this message
GeorgeDunlap (dunlapg) wrote :
GeorgeDunlap (dunlapg)
affects: emacs-defaults (Ubuntu) → emacs23 (Ubuntu)
affects: emacs23 (Ubuntu) → emacs24 (Ubuntu)
Revision history for this message
era (era) wrote :

bash-completion is not a feature which ships with emacs24. Where did you obtain this package? You should probably report this bug to them instead.

If you can suggest something to fix in emacs24 as shipped by Ubuntu, please update your bug report and change its Status back to New. Thanks.

Changed in emacs24 (Ubuntu):
status: New → Incomplete
Revision history for this message
era (era) wrote :
Revision history for this message
GeorgeDunlap (dunlapg) wrote :

Ah, thanks -- yep, that looks like just the issue.

Ubuntu does seem to ship bash-completion (in a package named bash-completion), looks like inherited directly from Debian. Let me know if you need me to try to duplicate this and report this upstream.

affects: emacs24 (Ubuntu) → bash-completion (Ubuntu)
Revision history for this message
GeorgeDunlap (dunlapg) wrote :

Sorry -- got confused there for a second... Yes, I apparently forgot that I had installed bash-completion.el manually. This is probably not a bug in Ubuntu then; let me leave this in "incomplete" temporarily and I'll close it if it's confirmed.

affects: bash-completion (Ubuntu) → emacs24 (Ubuntu)
Revision history for this message
GeorgeDunlap (dunlapg) wrote :

Ok, I pulled from the branch mentioned in that error report, and things seem fixed now. Thanks for finding that bug for me -- my google-fu completely failed me.

Changed in emacs24 (Ubuntu):
status: Incomplete → Invalid
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.