On 11/02/2024 04:10, Morgan Willcock wrote:
The shell expansion should work if the asterisk is outside of the quotes. I've attached an (untested) patch to explain what I mean.
Never try to quote arbitrary strings by double or single quotes in shell. There are enough fancy characters that may be interpreted in a special way. The safest approach is to use `process-file' instead of `shell-command', but in the case of a remote file shell is unavoidable and would require additional round trip for `file-expand-wildcards'.
The committed change is anyway incomplete.
+++ b/lisp/org-ctags.el @@ -484,11 +484,11 @@ defun org-ctags-create-tags (setq exitcode (shell-command (format (concat "%s --langdef=orgmode --langmap=orgmode:.org " - "--regex-orgmode=\"%s\" -f \"%s\" -e -R %s") + "--regex-orgmode=\"%s\" -f \"%s\" -e -R \"%s\"*")
-----------------------------------------------------------^^^^^^ These quote characters should be removed as well
org-ctags-path-to-ctags org-ctags-tag-regexp (expand-file-name (concat dir-name "/TAGS"))
It requires `shell-quote-argument' as well
- (expand-file-name (concat dir-name "/*"))))) + (expand-file-name (concat dir-name "/"))))) (cond ((eql 0 exitcode) (setq-local org-ctags-tag-list