[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

dired-mark-files-containing-regexp: unconsistent behaviour

From: Tino Calancha
Subject: dired-mark-files-containing-regexp: unconsistent behaviour
Date: Wed, 20 Apr 2016 11:59:36 +0900 (JST)
User-agent: Alpine 2.20 (LRH 67 2015-01-07)


The doc. string of `dired-mark-files-containing-regexp' is:

"Mark all files with contents containing REGEXP for use in later commands.
A prefix argument means to unmark them instead.
`.' and `..' are never marked."

This string doesn't mention exceptions or required user
according with this doc. if the file contains REGEXP, then is marked.

Unfortunately, this function will _not_ mark a file, FILE,
containing REGEXP if:

1) There is a buffer, BUF, visiting FILE.
2) BUF is out of sync with the file, i.e., REGEXP is not in BUF.

*) This behaviour is unconsistent with the doc. string.
*) An user would be aware of 1), 2) just after reading the source code.

I)  I suggest to not use BUF at all: just read always FILE.
II) OTOH, if this function should be kept as it is, then the doc. string
    need to be updated to cover 1), 2) behaviour.

See Bug#22694.

What do you think?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]