Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No hl-todo keywords error in process sentinel #2

Open
Peter-Chou opened this issue Sep 12, 2023 · 4 comments
Open

No hl-todo keywords error in process sentinel #2

Peter-Chou opened this issue Sep 12, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@Peter-Chou
Copy link

我在项目里调用 consult-todo-project 有以下报错:

error in process sentinel: consult-todo--format: No hl-todo keywords
error in process sentinel: No hl-todo keywords

我使用 magit-todos-list 可以正确返回相关的关键字对应的内容

@xueshumeng
Copy link

xueshumeng commented Sep 19, 2023

find -H . -type d \( -path \*/SCCS -o -path \*/RCS -o -path \*/CVS -o -path \*/MCVS -o -path \*/.src -o -path \*/.svn -o -path \*/.git -o -path \*/.hg -o -path \*/.bzr -o -path \*/_MTN -o -path \*/_darcs -o -path \*/\{arch\} \) -prune -o \! -type d \( -name .\#\* -o -name \*.beam -o -name \*.vee -o -name \*.jam -o -name \*.o -o -name \*\~ -o -name \*.bin -o -name \*.lbin -o -name \*.so -o -name \*.a -o -name \*.ln -o -name \*.blg -o -name \*.bbl -o -name \*.elc -o -name \*.lof -o -name \*.glo -o -name \*.idx -o -name \*.lot -o -name \*.fmt -o -name \*.tfm -o -name \*.class -o -name \*.fas -o -name \*.lib -o -name \*.mem -o -name \*.x86f -o -name \*.sparcf -o -name \*.dfsl -o -name \*.pfsl -o -name \*.d64fsl -o -name \*.p64fsl -o -name \*.lx64fsl -o -name \*.lx32fsl -o -name \*.dx64fsl -o -name \*.dx32fsl -o -name \*.fx64fsl -o -name \*.fx32fsl -o -name \*.sx64fsl -o -name \*.sx32fsl -o -name \*.wx64fsl -o -name \*.wx32fsl -o -name \*.fasl -o -name \*.ufsl -o -name \*.fsl -o -name \*.dxl -o -name \*.lo -o -name \*.la -o -name \*.gmo -o -name \*.mo -o -name \*.toc -o -name \*.aux -o -name \*.cp -o -name \*.fn -o -name \*.ky -o -name \*.pg -o -name \*.tp -o -name \*.vr -o -name \*.cps -o -name \*.fns -o -name \*.kys -o -name \*.pgs -o -name \*.tps -o -name \*.vrs -o -name \*.pyc -o -name \*.pyo \) -prune -o  -type f \( -name \* -o -name .\* \) -exec grep --color=auto -n --null -e \\\(\\\<\\\(HOLD\\\|TODO\\\|NEXT\\\|THEM\\\|PROG\\\|OKAY\\\|DONT\\\|FAIL\\\|DONE\\\|NOTE\\\|KLUDGE\\\|HACK\\\|TEMP\\\|FIXME\\\|XXXX\*\\\)\\\>\\\) /dev/null \{\} +

@Peter-Chou 在你的项目里执行这个命令是什么结果?

@Peter-Chou
Copy link
Author

Peter-Chou commented Sep 20, 2023

@xueshumeng
image
我在magit-todos里显示是正常的

image

@liuyinz liuyinz added the bug Something isn't working label Oct 3, 2023
@MarcRohrer
Copy link

Hi,

very nice package!

consult-todo works fine for a single buffer. consult-todo-all also works, however
I also get the error

error in process sentinel: consult-todo--format: No hl-todo keywords
error in process sentinel: No hl-todo keywords

when I run either consult-todo-dir or consult-todo-project.

Marc

@50ways2sayhard
Copy link

I've replaced consult-todo-dir with codes blow and consult-todo-project works.

(grep-apply-setting 'grep-find-template "find <D> <X> -type f <F> -exec rg <C> --no-heading -H  <R> /dev/null {} +")
;;  Or speed up with `ripgrep`
;; (grep-apply-setting 'grep-template "rg --no-heading -H <R> <D>")


(defun consult-todo-dir (&optional directory files)
      "Jump to hl-todo keywords in FILES in DIRECTORY.
If optinal arg FILES is nil, search in all files.
If optional arg DIRECTORY is nil, rgrep in default directory."
      (interactive)
      (let* ((files (or files "* .*"))
             (directory (or directory default-directory)))
        (add-hook 'compilation-finish-functions #'consult-todo--candidates-rgrep)
        (cl-letf ((compilation-buffer-name-function
                   (lambda (&rest _) (format "*consult-todo-%s*" directory))))
          (save-window-excursion
            ;;  HACK: use `lgrep' instead `find'
            (lgrep (concat  "\\b" (replace-regexp-in-string "\\\\[<>]*" "" (hl-todo--regexp)) "\\b") files directory)
            ))))
    )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants