Denote and find-grep-dired on BSD
=================================

Denote
------
Denote is a wonderful tool to take linked notes on Emacs.

The capability to interlink notes is my main reason to use
Denote.

The file-naming scheme of Denote build file names from several
parts:

* timestamp
* title
* keywords
* extension

Dashes and underscores delimit the timestamp, title, and
keywords.

This well thought file-naming scheme allows for searching with
regexps for one or more keywords.

To make the directory listing in Dired easy to read, Denote
add colors to the file listing in it, each part in different
color.

Search for notes
----------------
The number of notes tends to grow fast.

The file-naming scheme makes narrowing the file list in Dired
to files with certain keywords, certain words in the title,
or a combination of both, an easy task.

The links between notes are also useful to discover notes.

Still, sometimes one has to search beyond the title and
keywords.

find-grep-dired
---------------
The Emacs function find-grep-dired finds files in a
directory and starts Dired on the output.

Emacs is, of course, developed for GNU systems. On BSD
systems, Emacs uses the grep option "-s" in the search
command, while on Linux systems it uses the option "-q".

Still, the format of the output of the search command on Linux
systems differs from the formatting on BSD systems.

When switched to dired-hide-details-mode, on Linux systems the
search command shows the file names each on its own line. On
BSD systems it shows the file names concatenated on a single
line, separated by tabs.

The long file names of Denote notes requires
dired-hide-details-mode to get a full view of the title and
the keywords. The concatenated view of the file names on BSD
makes this mode hard to use.

Solution
--------
The search command used by find-grep-dired can be customized.

Just open C-h f find-grep-dired, hit enter on "find-grep-options"
and hit enter on "customize".

Replacing "-s" by "-sq" results in working solution.

I don't know how it will affect other searches outside
find-grep-dired, but for know, this seems to work.



Last edited: $Date: 2023/10/31 14:40:24 $