unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH v1 0/2] Interpret a directory path without a leading slash as relative to $HOME.
@ 2018-08-25 11:57 David Edmondson
  2018-08-25 11:57 ` [PATCH v1 1/2] test: Absolute and relative directory paths David Edmondson
  2018-08-25 11:57 ` [PATCH v1 2/2] notmuch: Database paths without a leading / are relative to $HOME David Edmondson
  0 siblings, 2 replies; 9+ messages in thread
From: David Edmondson @ 2018-08-25 11:57 UTC (permalink / raw)
  To: notmuch


Being able to specify a database path that works well on multiple
machines, where $HOME is not always the same, seems generally
useful.

There was a previous attempt to support ~ in the configuration file
(id:1462722574-4176-1-git-send-email-bijan@chokoufe.com), but this
foundered on concerns about support for ~otheruser.

This patch attempts to avoid that problem by asserting that any
database lacking a leading / character is interpreted as being
relative to $HOME.

So in my case, I would set the path to Maildir:

[database]
path=Maildir

This would work in Linux (where my home directory is /home/dme) and on
macOS (where it is /Users/dme).

David Edmondson (2):
  test: Absolute and relative directory paths.
  notmuch: Database paths without a leading / are relative to $HOME

 notmuch-config.c    | 14 +++++++++++++-
 test/T030-config.sh | 10 ++++++++++
 2 files changed, 23 insertions(+), 1 deletion(-)

-- 
2.11.0

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-09-08 10:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-25 11:57 [PATCH v1 0/2] Interpret a directory path without a leading slash as relative to $HOME David Edmondson
2018-08-25 11:57 ` [PATCH v1 1/2] test: Absolute and relative directory paths David Edmondson
2018-09-08  0:05   ` David Bremner
2018-09-08  9:22     ` David Edmondson
2018-09-08 10:27       ` David Bremner
2018-08-25 11:57 ` [PATCH v1 2/2] notmuch: Database paths without a leading / are relative to $HOME David Edmondson
2018-09-08  0:10   ` David Bremner
2018-09-08  9:22     ` David Edmondson
2018-09-08 10:28       ` David Bremner

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).