dash-docs-el / helm-dash

Browse Dash docsets inside emacs
510 stars 59 forks source link

helm-dash does not complete (seems does not connect to docsets correctly) #54

Closed stardiviner closed 10 years ago

stardiviner commented 10 years ago

I install helm-dash through el-get. And configure it with:

(require 'helm-dash)

(setq helm-dash-docsets-path (expand-file-name "~/.docsets")
      helm-dash-min-length 3
      ;; helm-dash-completing-read-func 'completing-read ; 'completing-read, 'ido-completing-read
      helm-dash-browser-func 'browse-url ; 'browse-url, 'eww
      ;; helm-dash-connections
      helm-dash-common-docsets '("Ruby" "Ruby on Rails"
                                 "HTML" "CSS" "JavaScript" "CoffeeScript"
                                 "Common_Lisp" "Clojure"
                                 "C" "Go"
                                 "SQLite" "MySQL" "Redis" "MongoDB"
                                 "Qt"
                                 "Vagrant" "Nginx"
                                 )
      ;; helm-dash-docsets
      )
(define-key help-document-map (kbd "C-d") 'helm-dash-at-point)

After download docsets with helm-dash-install-docsets. And when I execute [M-x helm-dash]. It only show Ruby nil or Ruby on Rails nil. I also tried command helm-dash-active-docsets. None of them can work correctly.

kidd commented 10 years ago

when XYZ nil usually means that you have XYZ in common-docsets but there's no dir named XYZ.docset in the helm-dash-docsets-path. can you doublecheck there's a directory called 'Ruby on Rails.docset' inside? Also, that the directory has the documentation (I'm thinking of corrupted downloads or something....). Mine weights 43M ~/.docsets

❯ du -sh Ruby\ on\ Rails.docset 
43M     Ruby on Rails.docset
stardiviner commented 10 years ago

@kidd I downloaded the docsets, and sure it has 43M. The directory structure:

Ruby on Rails.docset/
        Contents/
            - Info.plist
            - Resources/
              .....
stardiviner commented 10 years ago

@kidd I'm not sure which meaning are you saying, if you mean have XYZ.docset folder in variable helm-dash-docsets-path, then no, it's a string "/home/stardiviner/.docsets". Is this correct? I think depend on my config init setting, (setq helm-dash-docsets-path (expand-file-name "~/.docsets")), this should be correct. And I checked out that helm-dash use expand-file-name too.

kidd commented 10 years ago

helm-dash-docsets-path should be "/home/stardiviner/.docsets". this is fine.

Just to make sure you have the dependencies, you have sqlite3 installed and in the path, right? helm-dash just shells a sqlite3 process.

stardiviner commented 10 years ago

@kidd Yes, I have sqlite3 install on Ubuntu Linux, and is in the path available. How to debug this?

stardiviner commented 10 years ago

I found .sqliterc config file has a line .mode column cause this problem. Now solved.

kidd commented 10 years ago

Great you found a fix.

setting '.mode list' makes it work.

amitp commented 9 years ago

May I suggest that helm-dash-sql use sqlite3 -list? That way it no longer matters what format the user prefers in .sqliterc. It'd be nice if the user's choice for command line usage does not interfere with the operation of helm-dash.

stardiviner commented 9 years ago

Maybe helm-dash should extract helm-dash-sql's call-process out a variable called like helm-dash-sql-parameters. So that user can specify like --list.

kidd commented 9 years ago

For now I'll add '-list' to the hardcoded commandline... I don't foresee many more configs needed... We'll do it when really needed

kidd commented 9 years ago

that should do it, right?

stardiviner commented 9 years ago

@kidd It's fine.