0

During my search I keep having an error as follows:

Search failed with status 1: find: ‘/home/user/folder/flycheck_Driver.py’: No such file or directory

[Q] Is there any way to ignore files as following regex: flycheck_*.py?


My setup:

(defun my-find-orgfiles ()
  (interactive)
  (setq toggle-case-fold-search 0)  ; Turn Off Smart Case Sensitivity
  (find-name-dired "~/folder" "*py"))

(global-set-key (kbd "M-m") 'my-find-orgfiles)

(add-hook 'python-mode-hook
          (lambda ()
            (setq flycheck-python-pylint-executable "~/venv/bin/pylint")
            (setq flycheck-pylintrc "~/.pylintrc")))

Than, t to toggle marked/unmarked files (thus marking them all, since none were marked). Then I use Q to use query-replace on the marked files. And enter .value to replace with value.

=> Better solution could be to let emacs create flycheck_ files in another folder?

=> Should I use dired-omit-files as from the following answer.

2
  • Is the question about query-replace, as the title says? If not, please correct the title. – Drew Jun 24 '20 at 15:56
  • @Drew I updated the title. I think when I toggle all files flycheck_*.py also included as well, which leads query replacement to fail, since flycheck files are remove right away. – alper Jun 24 '20 at 16:24
0

I have solved my problem as follows, with following:

find-dired "~/eBlocBroker" "-name \\*.py ! -name flycheck_\\*.py)


(defun my-find-orgfiles ()
  (interactive)
  (find-dired "~/folder" "-name \\*.py ! -name flycheck_\\*.py ! -name __init__.py"))
(global-set-key (kbd "M-m") 'my-find-orgfiles)

Please note that comments on this answer in How to get Dired to ignore files with specific extensions helped me to solve it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.