unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Ralph Seichter <ralph@ml.seichter.de>
To: notmuch@notmuchmail.org
Subject: Re: Dependencies should include "realpath"
Date: Sun, 18 Oct 2020 01:08:49 +0200	[thread overview]
Message-ID: <87lfg4bgce.fsf@wedjat.horus-it.com> (raw)
In-Reply-To: <87pn5hw16e.fsf@tethera.net>

* David Bremner:

> I'm not sure what an "overhaul" would involve.

Looking at conf.py, I find the following confusing:

  lines = ['.. include:: /../emacs/rstdoc.rsti\n\n'] # in the source tree
  for file in ('notmuch.rsti', 'notmuch-lib.rsti', 'notmuch-show.rsti', 'notmuch-tag.rsti'):
      lines.extend(open(rsti_dir+'/'+file))
  rst_epilog = ''.join(lines)
  del lines

"lines" is of type List[str]. In a loop which uses "file" (a reserved
expression), open() returns file handles on success. The string (!) list
is then extended with file handles, and after the loop, members of the
list (one string, n file handles) are concatenated using an empty string.
What is the reasoning behind this code segment?

As for generating a config file with configure and then reading and
executing individual lines from Python: Why not write to doc/dyncf.py 
and use "from .dyncf import tags, rsti_dir" in conf.py?

Maybe I am off on a tangent, though. It would help me if I knew what
problem you were actually trying to solve?`

-Ralph

  reply	other threads:[~2020-10-17 23:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-16 20:42 Dependencies should include "realpath" Ralph Seichter
2020-10-17  0:18 ` David Bremner
2020-10-17  1:15   ` Ralph Seichter
2020-10-17 11:18     ` David Bremner
2020-10-17 23:08       ` Ralph Seichter [this message]
2020-10-19 18:48     ` Tomi Ollila
2020-10-20 14:54       ` Ralph Seichter
2020-10-20 15:06         ` Tomi Ollila

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=87lfg4bgce.fsf@wedjat.horus-it.com \
    --to=ralph@ml.seichter.de \
    --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).