syohex / emacs-counsel-gtags

GNU Global with ivy completion
62 stars 20 forks source link

Make counsel-gtags--generate-tags a public function #26

Closed mhcerri closed 4 years ago

mhcerri commented 6 years ago

Hi,

Do you think it's possible to make counsel-gtags--generate-tags public? Something like counsel-gtags-generate-tags?

Currently, I`m redefining it in my config to make possible to generate the tags in background:

  (defun counsel-gtags--generate-tags ()
    "Generate tags in background."
    (if (not (yes-or-no-p "File GTAGS not found. Run 'gtags'? "))
    (error "Abort generating tag files")
      (let* ((root (read-directory-name "Root Directory: "))
             (label (counsel-gtags--select-gtags-label))
             (bpr-process-directory root)
         (bpr-show-progress nil)
         (bpr-close-after-success t))
    (bpr-spawn (concat "gtags -q --gtagslabel=" label))
    (error "Gtags is generating tags"))))
FelipeLema commented 6 years ago

By looking at leoliu/ggtags#170, and if I'm understanding correctly, you want something like a counsel-gtags-generate-tags-function that points to a certain function that can either return a non-nil on generation or else otherwise (whether you will start to generate the tags in the background is up to you).

Is this so?

mhcerri commented 6 years ago

Hi. I basically want a way to start the tags generation if they don't exit without blocking.

syohex commented 4 years ago

This package is no longer maintained. If you have an issue, please send it to https://github.com/FelipeLema/emacs-counsel-gtags