dash-docs-el / helm-dash

Browse Dash docsets inside emacs
510 stars 59 forks source link

Fix issue #67 (no results in first call to helm-dash) #129

Closed davidshepherd7 closed 8 years ago

davidshepherd7 commented 8 years ago

Details in the commit message.

Also removed an option from the call to helm-build-sync-source because it's deprecated and the latest version of helm opens an error window every time you run helm-dash telling you about it. I don't really understand what the :delayed is/was supposed to do, but helm-dash still "works-on-my-machine"...

kidd commented 8 years ago

yay, thanks! I don't use the local docsets feature so I totally forgot about this.

Question: From time to time I think about remove the whole local-buffer-docset feature in favour of setq-local variables. It would reduce the code in helm-dash, and make use of a standard emacs procedure of extension. Do you think it's feasible? Makes sense? migrating confs would be easy?

davidshepherd7 commented 8 years ago

Which variable(s) would you change to use local variables? I could see it being potentially useful for helm-dash-connections I guess. Do you know you can already use helm-dash-docsets as a local variable?

As an aside: you could probably get rid of the entire helm-dash-buffer-local-docsets function if you add (defcustom helm-dash-buffer-local-docsets '()) since all that function does now is check if helm-dash-docsests is bound and return '() if it isn't.

kidd commented 8 years ago

Yup, the idea would be to remove all the buffer-local, common or helm-dash-docsets, and use one of them (helm-dash-docsets, is the best name probably), which has the contents of the common ones, and ppl should edit it (making it buffer-local) on mode-hook. This way everything should be simpler I think.

Problems that this can bring:

davidshepherd7 commented 8 years ago

I think you should keep both of the variables, at least for backwards compatibility (breaking user configs is really bad). But to clean up the code: you could just write a tiny wrapper function like:

(defun get-docsets ()
    (append local-docsets global-docsets))

and only access the lists via it.

If you want to simplify the interface you could mark the global-docsets variable as deprecated and avoid mentioning it in the docs.

On Sun, 10 Apr 2016, 19:12 Raimon Grau (rgrau), notifications@github.com wrote:

Yup, the idea would be to remove all the buffer-local, common or helm-dash-docsets, and use one of them (helm-dash-docsets, is the best name probably), which has the contents of the common ones, and ppl should edit it (making it buffer-local) on mode-hook. This way everything should be simpler I think.

Problems that this can bring:

  • Installing new docsets wouldn't add them to the buffer-localized variables. :(

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/areina/helm-dash/pull/129#issuecomment-208034575