Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split folders and preserve quoted names #206

Merged
merged 2 commits into from
Sep 20, 2018
Merged

Conversation

nicolasbock
Copy link
Contributor

If a folder in the MailMover section includes a
space (e.g. [Gmail].Sent Mail) there is currently not way to quote
the folder name such as to preserver the space in it. This change
replaces the standard split() function with one that understands
quotes. For the above example, the following config entry works:

    folders = "[Gmail].Sent Mail" other_folder

Fixes: #97

Signed-off-by: Nicolas Bock nicolasbock@gmail.com

If a folder in the `MailMover` section includes a
space (e.g. `[Gmail].Sent Mail`) there is currently no way to quote
the folder name such as to preserve the space in it. This change
replaces the standard `split()` function with one that understands
quotes. For the above example, the following config entry works:

        folders = "[Gmail].Sent Mail" other_folder

Fixes: afewmail#97

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
@flokli
Copy link
Member

flokli commented Sep 20, 2018

Thanks for your PR!

The config parser is something that I'd eventually like to see replaced with ConfigObj anyhow, but that will most likely introduce more format changes down the road anyhow ;-)

Can you also update docs/source/move_mode.rst, explaining it's possible to use quotes, with the example above?

@nicolasbock
Copy link
Contributor Author

Done @flokli .

This change updates the MailMover documentation to explain how to deal
with folder names that contain whitespace.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
@flokli flokli merged commit 6322531 into afewmail:master Sep 20, 2018
@flokli
Copy link
Member

flokli commented Sep 20, 2018

Thanks!

@nicolasbock nicolasbock deleted the issue_97 branch January 7, 2019 15:46
nicolasbock added a commit to nicolasbock/afew that referenced this pull request Jan 8, 2019
When using folder names containing whitespace characters (see PR afewmail#206)
the folder part of the notmuch search query needs to be quoted.

Signed-off-by: Nicolas Bock <nicolasbock@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants