unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Subject: [PATCH 3/3] doc: add some documentation about duplicate files.
Date: Sat, 30 Jul 2022 20:45:51 -0300	[thread overview]
Message-ID: <20220730234551.2623885-3-david@tethera.net> (raw)
In-Reply-To: <20220730234551.2623885-1-david@tethera.net>

This is mainly motivated by the new emacs-UI features to select
duplicates, but hopefully it will help demystify things for users of
the CLI as well.
---
 doc/man1/notmuch.rst  | 17 +++++++++++++++++
 doc/notmuch-emacs.rst | 25 +++++++++++++++++++++++++
 2 files changed, 42 insertions(+)

diff --git a/doc/man1/notmuch.rst b/doc/man1/notmuch.rst
index 1fec4ee5..4b146e41 100644
--- a/doc/man1/notmuch.rst
+++ b/doc/man1/notmuch.rst
@@ -155,6 +155,23 @@ equivalent:
    notmuch --config:alt-config config get user.name
    notmuch --config alt-config config get user.name
 
+.. _duplicate-files:
+
+DUPLICATE MESSAGE FILES
+=======================
+
+Notmuch considers the :mailheader:`Message-ID` to be the primary
+identifier of message. Per :rfc:`5322` the :mailheader:`Message-ID` is
+supposed to be globally unique, but this fails in two distinct
+ways. When you receive copies of a message via a mechanism like
+:mailheader:`Cc` or via a mailing list, the copies are typically
+interchangeable. In the case of some broken mail sending software, the
+same :mailheader:`Message-ID` is used for completely unrelated
+messages. The options :option:`search --duplicate` and :option:`show
+--duplicate` options provide the user with control over which message
+file is displayed. Front ends will need to provide their own
+interface, see e.g. :any:`emacs-show-duplicates`.
+
 ENVIRONMENT
 ===========
 
diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst
index e69bd23d..162f62a4 100644
--- a/doc/notmuch-emacs.rst
+++ b/doc/notmuch-emacs.rst
@@ -431,6 +431,31 @@ in :ref:`notmuch-search`.
 ``c ?``
     Show all available copying commands
 
+.. _emacs-show-duplicates:
+
+Dealing with duplicates
+-----------------------
+
+If there are are multiple files with the same :mailheader:`Message-ID`
+(see :any:`duplicate-files`), then :any:`notmuch-show` displays the
+number of duplicates and identifies the current duplicate. In the
+following example duplicate 3 of 5 is displayed.
+
+.. code-block::
+   :emphasize-lines: 1
+
+    M. Mustermann <max@example.com> (Sat, 30 Jul 2022 10:33:10 -0300) (inbox signed)      3/5
+    Subject: Re: Multiple files per message in emacs
+    To: notmuch@notmuchmail.org
+
+To display a different message file with the same
+:mailheader:`Message-ID`, the user can run the command
+:emacscmd:`notmuch-show-choose-duplicate`, by default bound to `%`.
+
+.. emacscmd:: notmuch-show-choose-duplicate
+
+   |docstring::notmuch-show-choose-duplicate|
+
 .. _notmuch-tree:
 
 notmuch-tree
-- 
2.35.2

  parent reply	other threads:[~2022-07-30 23:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-30 23:45 [PATCH 1/3] doc/notmuch: merge two sections on external commands David Bremner
2022-07-30 23:45 ` [PATCH 2/3] emacs: add docstring for notmuch-show-choose-duplicate David Bremner
2022-07-31 12:46   ` [PATCH v2] " David Bremner
2022-07-30 23:45 ` David Bremner [this message]
2022-08-11 10:42   ` [PATCH 3/3] doc: add some documentation about duplicate files David Bremner
2022-08-06 12:23 ` [PATCH 1/3] doc/notmuch: merge two sections on external commands David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220730234551.2623885-3-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).