Richard Russon [Fri, 16 Feb 2018 14:21:24 +0000 (14:21 +0000)]
disable the folder-hook for $record
It's possible to use $record to save an email to a different account.
The right thing to do is to call the `folder-hook` for the save folder,
save the email, then call the `folder-hook` for the 'current' folder.
Calling the hook this way causes problems for lots of people who have
commands in their hooks that are called when they didn't expect.
The hooks are left in the code wrapped in: `#ifdef RECORD_FOLDER_HOOK`
Richard Russon [Tue, 20 Feb 2018 22:12:32 +0000 (22:12 +0000)]
merge: upstream fixes
* Remove useless assignments in add_to_list functions.
* Add history-search function, bound to ctrl-r.
* Avoid a potential integer overflow if a Content-Length value is huge.
* Updated French translation.
* update translations
Kevin McCarthy [Sun, 4 Feb 2018 02:08:28 +0000 (18:08 -0800)]
Add history-search function, bound to ctrl-r.
Create a very basic "search history" functionality in the line editor.
It uses the current input, and searches backward through history. If
there is one match, it immediately uses that otherwise it pops up a
simple menu of matches.
Kevin McCarthy [Mon, 22 Jan 2018 03:41:47 +0000 (19:41 -0800)]
Remove useless assignments in add_to_list functions.
The code was probably pulled from some of the header processing
functions, which were in a loop. In those versions, "last" pointed to
a collection of new entries appended, but in these two functions,
updating last just obfuscates the code.
For "regular" filesystems (not IMAP or Notmuch folder hierarchies),
<change-dir> and the browser GUI now resolve paths via a new mutt library
function `mutt_realpath`. This means no more path buildup such as
"a/b/../../c". Additionally, Symlinks are resolved automatically. This is
a circumstance of realpath(). Note that a future PR is planned to add a
non-symlinking option.
The new <goto-parent> function has a default shortcut key of 'p' for parent.
Since this function uses the pre-existing `mutt_get_parent_path()`,
<goto-parent> may also work on IMAP and Notmuch folder hierarchies
(tested and working on IMAP)
Note: The paths passed to `mutt_get_parent_path()` formerly would not
parse correctly a path which included a final trailing slash (eg 'abc/')
So, I added it a check to that function to remove it before hitting
the parser.
Note2: The browser for IMAP was janky before this commit, but the browser
is not the primary mailbox navigation tool, afterall. At least 'p'
<goto-parent> adds to its functionality. I expect a similar evaluation for
Notmuch folder browsing, although I have never used Notmuch. Any
contributions to make a better IMAP/Notmuch folder browsing experience
are welcome. I have reported some of the fallbacks in Github PR #1037
comments (look for IMAP headlines).
Richard Russon [Tue, 30 Jan 2018 14:56:46 +0000 (14:56 +0000)]
fix parsing of urls containing '?'
The URL schemes come in two patterns
- smtp://user:pass@host
- notmuch:///path?query
The 'host' types don't take a query string.
'notmuch' and 'mailto' don't use a 'user:pass' string.
This fix will still be confused by a notmuch URL that has a '?' in the
path component, but no query string. (but I don't think the code ever
coped with that). e.g.
Richard Russon [Wed, 24 Jan 2018 20:48:49 +0000 (20:48 +0000)]
merge: md5 improvements
* Remove unused functions, unexpose implementation functions
* Implement and use mutt_md5_toascii
* Initial tests
* Use mutt_md5_toascii some more
* Add and use an API to process a NULL-terminated string
* More API polishing
* Rename test cases to better reflect what they're doing
Richard Russon [Sat, 20 Jan 2018 16:52:14 +0000 (16:52 +0000)]
merge: RFC2047 improvements
* Handle RFC2047 words split in the middle of a multibyte character
* move rfc2047 functions to library
* Use our base64 API instead of duplicating the decoding algorithm
* Move mutt_rfc2047_choose_charset to mutt_ch_choose
* light tidy
Fixes an bug introduced by changes intorduced in commit 465fad6d21ac3b9d2ae5d12bae7705f5f04323e7 to contrib/gpg.rc that breaks signed
and encrypted mail. The issues is just a typo related to way that pgpewrap
works. This should fix issue #998.