unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: "Rudolf Adamkovič" <salutis@me.com>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: Splitting long lines in .notmuch-config
Date: Fri, 14 Oct 2022 01:08:43 +0200	[thread overview]
Message-ID: <m2tu47pbic.fsf@me.com> (raw)
In-Reply-To: <87edvlanuh.fsf@tethera.net>

David Bremner <david@tethera.net> writes:

> Not sure if this helps, but we are using the GLib GKeyFile API, so
> whatever it supports (if anything) for line continuation, we do too.

I found nothing in the GLib/GKeyFile documentation.  But then, I figured
that Org mode has me covered, as usual.  If anyone has the problem:

#+name: spammers
- [[mailto:foo@bar]]
- ...

#+name: notmuch-or
#+begin_src emacs-lisp :var addresses=() :results silent
(mapconcat (lambda (entry)
             (let* ((step-1 (car entry))
                    (step-2 (string-remove-prefix "[[mailto:" step-1))
                    (step-3 (string-remove-suffix "]]" step-2)))
               step-3))
           addresses
           " or ")
#+end_src

#+begin_src conf :tangle ~/.notmuch-config :noweb yes
...
spam = <<notmuch-or(addresses=spammers)>>
#+end_src

Thank you!

Rudy
-- 
"Genius is 1% inspiration and 99% perspiration."
-- Thomas Alva Edison, 1932

Rudolf Adamkovič <salutis@me.com> [he/him]
Studenohorská 25
84103 Bratislava
Slovakia\r

      reply	other threads:[~2022-10-13 23:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-05 12:11 Splitting long lines in .notmuch-config Rudolf Adamkovič
2022-10-05 22:48 ` David Bremner
2022-10-13 23:08   ` Rudolf Adamkovič [this message]

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=m2tu47pbic.fsf@me.com \
    --to=salutis@me.com \
    --cc=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).