(file-name-directory curr-file)))
(setq curr-file (file-name-nondirectory curr-file))
(goto-char (point-min))
- (when (search-forward-regexp (format "\\s %s[*@]?$" curr-file) nil t)
+ (when (search-forward-regexp (format "\\s %s[*@]?$" (regexp-quote curr-file)) nil t)
(setq hits (+ hits 1))
(dired-mark 1))))
(message "%d files with matching tag marked" hits)))
(setq file (car elt)
tag (cdr elt))
(goto-char (point-min))
- (if (search-forward-regexp (format "^%s.*$" file) nil t)
+ (if (search-forward-regexp (format "^%s.*$" (regexp-quote file)) nil t)
(progn
(setq end (point))
(beginning-of-line)
(error "Files must be a string or a list of strings!")))
(dolist (file files)
(goto-char (point-min))
- (when (search-forward-regexp (format "^%s;" file) nil t)
+ (when (search-forward-regexp (format "^%s;" (regexp-quote file)) nil t)
(end-of-line)
(setq end (point))
(beginning-of-line)
(image-dired-sane-db-file)
(image-dired--with-db-file
(let (end (tags ""))
- (when (search-forward-regexp (format "^%s" file) nil t)
+ (when (search-forward-regexp (format "^%s" (regexp-quote file)) nil t)
(end-of-line)
(setq end (point))
(beginning-of-line)
(setq file (car elt)
comment (cdr elt))
(goto-char (point-min))
- (if (search-forward-regexp (format "^%s.*$" file) nil t)
+ (if (search-forward-regexp (format "^%s.*$" (regexp-quote file)) nil t)
(progn
(setq end (point))
(beginning-of-line)
(image-dired-sane-db-file)
(image-dired--with-db-file
(let (end comment-beg-pos comment-end-pos comment)
- (when (search-forward-regexp (format "^%s" file) nil t)
+ (when (search-forward-regexp (format "^%s" (regexp-quote file)) nil t)
(end-of-line)
(setq end (point))
(beginning-of-line)