]> granicus.if.org Git - neomutt/log
neomutt
5 years agotest: fix leaks in library tests
Richard Russon [Sun, 12 May 2019 22:25:28 +0000 (23:25 +0100)]
test: fix leaks in library tests

5 years agotest: fix leaks in config tests
Richard Russon [Sun, 12 May 2019 22:21:30 +0000 (23:21 +0100)]
test: fix leaks in config tests

5 years agocheck library parameters more carefully
Richard Russon [Sun, 12 May 2019 22:18:41 +0000 (23:18 +0100)]
check library parameters more carefully

Some test cases were causing library code to be run with invalid
parameters.  Reject these cases.

5 years agoFix next-unread-mailbox
Mehdi Abaakouk [Sun, 12 May 2019 19:34:42 +0000 (21:34 +0200)]
Fix next-unread-mailbox

e4133e5cd2 have introduced a small regression.

next-unread-mailbox does not automatically open the mailbox.

This change fixes it.

5 years agomerge: update translations
Richard Russon [Sat, 11 May 2019 10:05:18 +0000 (11:05 +0100)]
merge: update translations

 * Update lt_LT translation
 * update German translation
 * fix command string
 * fix 'too few/many' translations
 * tidy OAUTHBEARER error message
 * Update Ukrainian translation
 * Update Russian translation
 * Update Danish translation
 * sync translations

5 years agosync translations
Richard Russon [Sat, 11 May 2019 10:05:11 +0000 (11:05 +0100)]
sync translations

5 years agoUpdate Danish translation
Morten Bo Johansen [Fri, 10 May 2019 20:18:46 +0000 (13:18 -0700)]
Update Danish translation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoUpdate Russian translation
Vsevolod Volkov [Fri, 10 May 2019 18:09:45 +0000 (11:09 -0700)]
Update Russian translation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoUpdate Ukrainian translation
Vsevolod Volkov [Fri, 10 May 2019 18:07:41 +0000 (11:07 -0700)]
Update Ukrainian translation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agotidy OAUTHBEARER error message
Richard Russon [Sat, 11 May 2019 09:12:30 +0000 (10:12 +0100)]
tidy OAUTHBEARER error message

5 years agofix 'too few/many' translations
Richard Russon [Sat, 11 May 2019 09:07:13 +0000 (10:07 +0100)]
fix 'too few/many' translations

5 years agofix command string
Richard Russon [Fri, 10 May 2019 22:31:31 +0000 (23:31 +0100)]
fix command string

5 years agoupdate German translation
Richard Russon [Fri, 10 May 2019 22:16:28 +0000 (23:16 +0100)]
update German translation

5 years agoUpdate lt_LT translation
Marius Gedminas [Thu, 9 May 2019 11:31:56 +0000 (14:31 +0300)]
Update lt_LT translation

Fixes 6 fuzzy strings.

5 years agofeat: use mailbox description for spoolfile 1708/head
Austin Ray [Fri, 10 May 2019 00:05:22 +0000 (20:05 -0400)]
feat: use mailbox description for spoolfile

'spoolfile' is limited to mailboxes paths so if one wants to use a
'named-mailboxes' or 'virtual-mailboxes' as the spoolfile, its path must
be duplicated in the 'spoolfile' assignment. 'virtual-mailboxes' has a
helper variable, 'virtual_spoolfile', for selecting the first
'virtual-mailboxes' entry as the spoolfile.

This commit allows one to use a mailbox description for the 'spoolfile,
which removes the need to duplicate a 'named-mailboxes' or
'virtual-mailboxes' path and makes 'virtual_spoolfile' defunct. The
configuration syntax is now more consistent.

It is important to note that mailbox descriptions are preferred to
paths.

To reflect the change, documentation was updated:
 - Add note to 'spoolfile' about using a string to specify a
   'named-mailboxes' or 'virtual-mailboxes' description.
 - Add a note to the 'virtual_spoolfile' documentation saying that it is no
   longer necessary since 'spoolfile' supports descriptions now.

5 years agomerge: upstream fixes
Richard Russon [Fri, 10 May 2019 14:16:58 +0000 (15:16 +0100)]
merge: upstream fixes

 * Add a test for NULL parameter attribute too
 * Add a quick-starter config section to the manual.
 * Add sample starter muttrc to contrib.
 * Change sample muttrc path to match other manual references.
 * Add note about %r for the pgp_list_*_command vars.

5 years agoAdd note about %r for the pgp_list_*_command vars.
Kevin McCarthy [Thu, 9 May 2019 20:48:44 +0000 (13:48 -0700)]
Add note about %r for the pgp_list_*_command vars.

In this case %r is the list of search strings.

5 years agoChange sample muttrc path to match other manual references.
Kevin McCarthy [Thu, 9 May 2019 20:25:25 +0000 (13:25 -0700)]
Change sample muttrc path to match other manual references.

The other parts of the manual refer to /usr/local/share/doc in their
examples.  For consistency, change the starter muttrc and manual entry
to do the same.

In the future, we may wish to have a config variable instead, so users
don't have to worry about system vs locally installed paths when
sourcing the gpg.rc, for instance.

5 years agoAdd sample starter muttrc to contrib.
Kevin McCarthy [Thu, 9 May 2019 02:28:21 +0000 (19:28 -0700)]
Add sample starter muttrc to contrib.

Add a mini-section with a link to the manual instead, under
"Configuration".

5 years agoAdd a quick-starter config section to the manual.
Kevin McCarthy [Mon, 6 May 2019 22:35:38 +0000 (15:35 -0700)]
Add a quick-starter config section to the manual.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd a test for NULL parameter attribute too
Kevin McCarthy [Mon, 6 May 2019 19:37:04 +0000 (12:37 -0700)]
Add a test for NULL parameter attribute too

Just to be sure we don't have any issues with the new continuation
code.  The mutt_set_parameter() code doesn't actively prevent a null
attribute.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agomerge: fixes for bugs raised by automated testing
Richard Russon [Fri, 10 May 2019 13:20:52 +0000 (14:20 +0100)]
merge: fixes for bugs raised by automated testing

 * check value of 'Content-Length' more carefully
 * Replace atoi() to mutt_str_atoi()
 * fix leaks during header parsing

5 years agofix leaks during header parsing 1707/head
Richard Russon [Thu, 9 May 2019 19:16:58 +0000 (20:16 +0100)]
fix leaks during header parsing

Credit to OSS-Fuzz

5 years agoReplace atoi() to mutt_str_atoi()
Richard Russon [Thu, 9 May 2019 15:23:24 +0000 (16:23 +0100)]
Replace atoi() to mutt_str_atoi()

mutt_str_atoi() has error checking.

5 years agocheck value of 'Content-Length' more carefully
Richard Russon [Thu, 9 May 2019 15:17:10 +0000 (16:17 +0100)]
check value of 'Content-Length' more carefully

Replace `atol()` with `mutt_str_atol()` which has error checking.
Cap the maximum size to 1GiB.  If we exceed this your email to TOO BIG!

5 years agofix: config_dump()
Richard Russon [Thu, 9 May 2019 00:07:45 +0000 (01:07 +0100)]
fix: config_dump()

Move a variable test so that config_dump() works again.

Fixes: #1705
5 years agofix: folder missing from status bar
Richard Russon [Tue, 7 May 2019 15:37:40 +0000 (16:37 +0100)]
fix: folder missing from status bar

Fix a typo introduced with the Buffer changes.
It lead to '%f' showing '(no mailbox)' all the time.

5 years agomerge: update translations
Richard Russon [Mon, 6 May 2019 15:52:04 +0000 (16:52 +0100)]
merge: update translations

 * Polish translation update
 * Update lt_LT translations
 * sync translations

5 years agosync translations
Richard Russon [Mon, 6 May 2019 15:51:06 +0000 (16:51 +0100)]
sync translations

5 years agoUpdate lt_LT translations
Marius Gedminas [Sat, 27 Apr 2019 07:20:49 +0000 (10:20 +0300)]
Update lt_LT translations

New fuzzy and untranslated strings.

See also https://github.com/neomutt/neomutt/issues/1680 because

  all: no binds in this menu
  all: no macros in this menu

probably should not be translated to

  all: šiame meniu nėra binds
  all: šiame meniu nėra macros

5 years agoPolish translation update
Marcin Rajner [Wed, 10 Apr 2019 13:11:39 +0000 (15:11 +0200)]
Polish translation update

5 years agoAllow to disable IMAP's ENABLE extension to work-around broken servers
Pietro Cerutti [Fri, 3 May 2019 14:12:17 +0000 (14:12 +0000)]
Allow to disable IMAP's ENABLE extension to work-around broken servers

Issue #1689

5 years agomerge: Upstream refactoring
Richard Russon [Mon, 6 May 2019 11:27:15 +0000 (12:27 +0100)]
merge: Upstream refactoring

 * Change struct Mailbox->realpath to be const char *
 * Convert struct Buffer->path to a struct Buffer
 * Convert other users of struct Mailbox->pathbuf to use Buffers
 * Add mutt_buffer_enter_fname()
 * Convert change folder operations to use struct Buffer
 * Increase prompt size to remove warning
 * Convert migrated lib.c functions to use struct Buffer
 * Add menu dialog helper to add rows
 * Convert certficate prompts to use menu dialog helper and struct Buffer
 * Convert pager help string to use struct Buffer
 * Convert compress to use mutt_buffer_quote_filename()
 * Convert remailer to use struct Buffer for Mixmaster invocation
 * Revert "Fix truncation of long filenames in attachments."
 * Handle the same secret key appearing in multiple public keyrings
 * Change mutt_parse_mailboxes() to use the path struct Buffer argument
 * Convert mutt_parse_adrlist() to use struct Buffer for simple parsing
 * Add note about $mailcap_path generation to the documentation
 * Add $imap_fetch_chunk_size to allow FETCHing new headers in chunks
 * Enable the use of toggle-write from the pager
 * Add note about IMAP browser and trailing delimiters
 * Add $forward_attachments quadoption for inline-forward mode
 * Note the other parts of generated message-ids in the manual
 * Fix mailbox search to not recompile for a repeated search
 * Corrected minor errors in text related to $forward_attachments
 * Update French translation
 * Write rfc2231 parameter continuations for long parameters
 * Add a manual section on OpenPGP and S/MIME configuration.
 * build: fix tests
 * tidy code

5 years agotidy code 1701/head
Richard Russon [Sat, 4 May 2019 22:29:38 +0000 (23:29 +0100)]
tidy code

- doxy: Tidy duplicate comments
- clang-format

5 years agobuild: fix tests
Richard Russon [Sat, 4 May 2019 23:44:25 +0000 (00:44 +0100)]
build: fix tests

5 years agoAdd a manual section on OpenPGP and S/MIME configuration.
Kevin McCarthy [Sun, 5 May 2019 20:26:59 +0000 (13:26 -0700)]
Add a manual section on OpenPGP and S/MIME configuration.

Talk about the required config variables, GPGME and classic mode,
agents, pinentry programs, and smime_keys.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoWrite rfc2231 parameter continuations for long parameters
Kevin McCarthy [Thu, 2 May 2019 19:31:29 +0000 (12:31 -0700)]
Write rfc2231 parameter continuations for long parameters

Previously, Mutt would truncate long attachment filenames, to avoid
writing an illegal length header line.  This commit is a followup to
4dcb3ba1, where I reverted an incorrect fix for the problem.

rfc2231_encode_string() now returns a list of continuations, with
encoding and continuation number suffixes already appended to the
attribute.  The function tries to keep the line length less than 78
characters, but the code is a bit imprecise as a trade off for
simplicity and readability.

Modify mutt_write_mime_header() to loop through the continuations.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoUpdate French translation
Vincent Lefevre [Mon, 29 Apr 2019 11:03:44 +0000 (13:03 +0200)]
Update French translation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoCorrected minor errors in text related to $forward_attachments
Vincent Lefevre [Mon, 29 Apr 2019 10:49:22 +0000 (12:49 +0200)]
Corrected minor errors in text related to $forward_attachments

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix mailbox search to not recompile for a repeated search
Kevin McCarthy [Sun, 28 Apr 2019 22:48:33 +0000 (15:48 -0700)]
Fix mailbox search to not recompile for a repeated search

The LastSearchExpn was being compared, but was never set to the
expanded search value.  This was causing the search to be recompiled
even if it were for the same previous expanded search string.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoNote the other parts of generated message-ids in the manual
Kevin McCarthy [Sun, 28 Apr 2019 21:59:13 +0000 (14:59 -0700)]
Note the other parts of generated message-ids in the manual

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd $forward_attachments quadoption for inline-forward mode
Kevin McCarthy [Fri, 26 Apr 2019 02:41:04 +0000 (19:41 -0700)]
Add $forward_attachments quadoption for inline-forward mode

When set or answered yes, non text-decodable parts will be attached to
the new message.  The default value is "ask-yes", because I believe
this is something people will want to use, and should be made aware of
the new possible behavior.

The option presents a nice middle ground between previous
inline-forwarding behavior (where all the non-text parts were
dropped), and $mime_forward where the entire email was included as an
attachment.

This was previously difficult to achieve, but after the
recv-attachment refactoring: (a19e5266^..faabd621)
it became possible to use the ATTACH_CONTEXT and the recvattach.c
helper mutt_generate_recvattach_list() to properly deal with nesting
and multiple file-handles.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd note about IMAP browser and trailing delimiters
Kevin McCarthy [Thu, 25 Apr 2019 16:26:43 +0000 (09:26 -0700)]
Add note about IMAP browser and trailing delimiters

This is the same behavior as the regular browser, but I think still
deserves a quick mention.

Thanks to Charles for pointing out this section of the manual and
suggesting the addition.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoEnable the use of toggle-write from the pager
Jeremy Sowden [Tue, 23 Apr 2019 21:15:31 +0000 (22:15 +0100)]
Enable the use of toggle-write from the pager

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd $imap_fetch_chunk_size to allow FETCHing new headers in chunks
Kevin McCarthy [Sun, 19 Aug 2018 16:25:53 +0000 (09:25 -0700)]
Add $imap_fetch_chunk_size to allow FETCHing new headers in chunks

For extremely large mailboxes, some implementations will time out just
while fetching the new headers, because the client doesn't send any
commands for 30 minutes while downloading the large number of headers.

Rewrite imap_fetch_msn_seqset() to return chunks of size
$imap_fetch_chunk_size.

The change requires trusting the server will follow the RFC and not
send an EXPUNGE during or between the FETCH chunks; otherwise we'll
miss MSNs between the chunks because the shift.

We could in theory continue to set "msn_begin = idata->max_msn + 1",
but that makes the assumption there are no holes in the header cache
that we are filling in during a chunk.  Personally I am dubious about
"header cache holes", but the IMAP code has explicitly mentioned and
handled them since prior to my involvement.

Since the RFC forbids the interleaving EXPUNGE I believe it's safe
enough to set "msn_begin = fetch_msn_end + 1" until proven otherwise.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd note about $mailcap_path generation to the documentation
Kevin McCarthy [Mon, 22 Apr 2019 18:02:28 +0000 (11:02 -0700)]
Add note about $mailcap_path generation to the documentation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_parse_adrlist() to use struct Buffer for simple parsing
Kevin McCarthy [Mon, 22 Apr 2019 03:05:13 +0000 (20:05 -0700)]
Convert mutt_parse_adrlist() to use struct Buffer for simple parsing

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange mutt_parse_mailboxes() to use the path struct Buffer argument
Kevin McCarthy [Mon, 22 Apr 2019 02:45:49 +0000 (19:45 -0700)]
Change mutt_parse_mailboxes() to use the path struct Buffer argument

Instead of copying to a buf[] variable, since the various utility
methods are now available to struct Buffer too.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoHandle the same secret key appearing in multiple public keyrings
Julian Gilbey [Thu, 18 Apr 2019 15:30:38 +0000 (16:30 +0100)]
Handle the same secret key appearing in multiple public keyrings

Allow for S/MIME keys and the possibility of missing subkeys

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoRevert "Fix truncation of long filenames in attachments."
Kevin McCarthy [Sat, 20 Apr 2019 22:43:59 +0000 (15:43 -0700)]
Revert "Fix truncation of long filenames in attachments."

This reverts commit f476d0aecd6f88db5291427fced21a8e834ca181.

The commit allowed the generation of illegal length header lines.  A
correct fix needs to implement parameter continuations.

I will work on that, but in case I don't get it in before 1.12,
preserve the hard truncation.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert remailer to use struct Buffer for Mixmaster invocation
Kevin McCarthy [Sat, 20 Apr 2019 20:00:28 +0000 (13:00 -0700)]
Convert remailer to use struct Buffer for Mixmaster invocation

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert compress to use mutt_buffer_quote_filename()
Kevin McCarthy [Sat, 20 Apr 2019 19:34:35 +0000 (12:34 -0700)]
Convert compress to use mutt_buffer_quote_filename()

Because the compress expandos operate differently than the rest of
mutt, requiring manual outer quoting, add a parameter to the function
to toggle outer quoting off.

Remove the now unused escape_path() function.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert pager help string to use struct Buffer
Kevin McCarthy [Fri, 19 Apr 2019 22:04:43 +0000 (15:04 -0700)]
Convert pager help string to use struct Buffer

Remove the awkward string truncation warnings, and remove helpstr and
tmphelp char arrays from the stack.

Because the pager is fairly long lived, allocate the helpstr instead
of using the pool.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert certficate prompts to use menu dialog helper and struct Buffer
Kevin McCarthy [Fri, 19 Apr 2019 21:25:05 +0000 (14:25 -0700)]
Convert certficate prompts to use menu dialog helper and struct Buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd menu dialog helper to add rows
Kevin McCarthy [Fri, 19 Apr 2019 20:14:54 +0000 (13:14 -0700)]
Add menu dialog helper to add rows

Remove the manual max calculation and dialog row allocation.

Add a NONULL check because the helper uses safe_strdup() to add a row.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert migrated lib.c functions to use struct Buffer
Kevin McCarthy [Fri, 19 Apr 2019 01:42:57 +0000 (18:42 -0700)]
Convert migrated lib.c functions to use struct Buffer

Fix mutt_getcwd() to return NULL on failure.

Change mutt_rmtree(), mutt_mkwrapdir(), safe_open(), and
safe_symlink() to use struct Buffer so they don't have filename length
limitations.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoIncrease prompt size to remove warning
Kevin McCarthy [Wed, 17 Apr 2019 23:07:05 +0000 (16:07 -0700)]
Increase prompt size to remove warning

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert change folder operations to use struct Buffer
Kevin McCarthy [Wed, 17 Apr 2019 03:22:08 +0000 (20:22 -0700)]
Convert change folder operations to use struct Buffer

Store the folder name inside a struct Buffer and use the various struct Buffer
enhanced functions.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd mutt_buffer_enter_fname()
Kevin McCarthy [Wed, 17 Apr 2019 02:25:36 +0000 (19:25 -0700)]
Add mutt_buffer_enter_fname()

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert other users of struct Mailbox->pathbuf to use Buffers
Kevin McCarthy [Wed, 17 Apr 2019 01:11:35 +0000 (18:11 -0700)]
Convert other users of struct Mailbox->pathbuf to use Buffers

A few functions in browser.c, buffy.c, and monitor.c were using
struct Mailbox->pathbuf but were potentially truncating via fixed size buffers.
Convert those to use Buffers too.

buffy_get() was creating epath and expanding it, apparently to match
against expanded struct Mailbox list entries, was wasn't using the epath.  I
believe this is a bug, and have switched the comparison to epath.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert struct Buffer->path to a struct Buffer
Kevin McCarthy [Tue, 16 Apr 2019 20:41:10 +0000 (13:41 -0700)]
Convert struct Buffer->path to a struct Buffer

Rename to struct Buffer->pathbuf to make it clear the field is a struct Buffer, and
to make sure to catch and review all usages.

There are still uses of pathbuf that are truncating and need to be
fixed, for example in browser.c and buffy.c.

Fix up sidebar usage in one place, that was pointing inside the
struct Mailbox->path with a char *.  At the same time, change their "short
folder" computation to also use a struct Buffer.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange struct Mailbox->realpath to be const char *
Kevin McCarthy [Tue, 16 Apr 2019 19:23:42 +0000 (12:23 -0700)]
Change struct Mailbox->realpath to be const char *

struct Mailbox->path is a fixed array (which will be converted to a struct Buffer in
the next commit).  This is needed to call mutt_expand_path().

However, struct Mailbox->realpath has no such need, and so it is a bit
wasteful (not to mention not big enough) to store as such.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoFix utf7/utf8 conversion of mailbox names in LIST response
Pietro Cerutti [Fri, 3 May 2019 11:53:40 +0000 (11:53 +0000)]
Fix utf7/utf8 conversion of mailbox names in LIST response

Because of a wrong argument passed into `imap_unmunge_mbox_name`, mailbox names
encoded in utf7 are not properly converted into utf8. This causes two problems:

1. mailbox names are mangled in the UI (M&AOY-lstr&APY-m instead of Mælström)

2. mailbox names are re-encoded to utf7 before being sent to the server,
resulting in "Mailbox does not exists" errors in commands such as DELETE

5 years agoAvoid identity conversion
Pietro Cerutti [Fri, 3 May 2019 11:34:58 +0000 (11:34 +0000)]
Avoid identity conversion

5 years agoAvoid useless reallocations in IMAP utf8/utf7 conversion
Pietro Cerutti [Fri, 3 May 2019 10:00:15 +0000 (10:00 +0000)]
Avoid useless reallocations in IMAP utf8/utf7 conversion

5 years agomerge: unit test updates
Richard Russon [Thu, 2 May 2019 16:06:32 +0000 (17:06 +0100)]
merge: unit test updates

 * test: quieten successful tests
 * test: merge tests
 * build: disable testing by default

5 years agobuild: disable testing by default 1694/head
Richard Russon [Thu, 2 May 2019 13:06:07 +0000 (14:06 +0100)]
build: disable testing by default

Change `configure` to not build the unit tests by default.

```
--testing   Enable Unit Testing
--coverage  Enable Coverage Testing (enables Unit Testing)
```

Co-authored-by: Pietro Cerutti <gahr@gahr.ch>
5 years agotest: merge tests
Richard Russon [Wed, 1 May 2019 15:54:42 +0000 (16:54 +0100)]
test: merge tests

5 years agotest: quieten successful tests
Richard Russon [Wed, 1 May 2019 23:50:27 +0000 (00:50 +0100)]
test: quieten successful tests

5 years agoFix crash when trying to collapse a limit not matching any messages
Pietro Cerutti [Thu, 2 May 2019 12:42:29 +0000 (12:42 +0000)]
Fix crash when trying to collapse a limit not matching any messages

This is a follow-up of #1685

5 years agoDo not link in a new Account after a failed login
Pietro Cerutti [Thu, 2 May 2019 09:09:08 +0000 (09:09 +0000)]
Do not link in a new Account after a failed login

Fixes #1690

5 years agomerge: move existing tests
Richard Russon [Wed, 1 May 2019 22:42:26 +0000 (23:42 +0100)]
merge: move existing tests

 * test: move base64 tests
 * test: move file tests
 * test: move rfc2047 tests
 * test: move md5 tests
 * test: move url tests
 * test: move address tests
 * test: move buffer tests

5 years agotest: move buffer tests
Richard Russon [Wed, 1 May 2019 15:05:48 +0000 (16:05 +0100)]
test: move buffer tests

5 years agotest: move address tests
Richard Russon [Wed, 1 May 2019 15:01:24 +0000 (16:01 +0100)]
test: move address tests

5 years agotest: move url tests
Richard Russon [Wed, 1 May 2019 14:27:30 +0000 (15:27 +0100)]
test: move url tests

5 years agotest: move md5 tests
Richard Russon [Wed, 1 May 2019 00:32:20 +0000 (01:32 +0100)]
test: move md5 tests

5 years agotest: move rfc2047 tests
Richard Russon [Wed, 1 May 2019 00:07:20 +0000 (01:07 +0100)]
test: move rfc2047 tests

5 years agotest: move file tests
Richard Russon [Tue, 30 Apr 2019 23:12:05 +0000 (00:12 +0100)]
test: move file tests

5 years agotest: move base64 tests
Richard Russon [Tue, 30 Apr 2019 19:01:54 +0000 (20:01 +0100)]
test: move base64 tests

5 years agomerge: upstream Buffer changes
Richard Russon [Wed, 1 May 2019 22:38:00 +0000 (23:38 +0100)]
merge: upstream Buffer changes

 * Change autoview_handler() to use struct Buffer
 * Convert mutt_check_simple() to accept a struct Buffer parameter
 * Add mutt_buffer_quote_filename()
 * Convert mutt_expand_file_fmt() to accept struct Buffer dest parameter
 * Convert mutt_get_tmp_attachment to use struct Buffer
 * Convert mutt_compose_attachment to use struct Buffer
 * Convert mutt_edit_attachment to use struct Buffer
 * Convert mutt_view_attachment to use struct Buffer
 * Convert mutt_print_attachment to use struct Buffer
 * Convert mutt_expand_fmt() and rfc1524_expand_filename() to struct Buffer
 * Rename to mutt_rfc1524_expand_filename()
 * Convert remaining mutt_adv_mktemp() calls to use buffer version
 * Rename mutt_buffer_adv_mktemp()
 * test: update for buffer changes

5 years agotest: update for buffer changes 1687/head
Richard Russon [Wed, 1 May 2019 22:19:54 +0000 (23:19 +0100)]
test: update for buffer changes

5 years agoRename mutt_buffer_adv_mktemp()
Kevin McCarthy [Sun, 14 Apr 2019 17:46:36 +0000 (10:46 -0700)]
Rename mutt_buffer_adv_mktemp()

Remove buffer prefix since all callers now use this version.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert remaining mutt_adv_mktemp() calls to use buffer version
Kevin McCarthy [Sun, 14 Apr 2019 16:20:46 +0000 (09:20 -0700)]
Convert remaining mutt_adv_mktemp() calls to use buffer version

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoRename to mutt_rfc1524_expand_filename()
Kevin McCarthy [Wed, 10 Apr 2019 01:54:20 +0000 (18:54 -0700)]
Rename to mutt_rfc1524_expand_filename()

Now that all callers pass a struct Buffer, the buffer prefix is not needed to
distinguish the parameter.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_expand_fmt() and rfc1524_expand_filename() to struct Buffer
Kevin McCarthy [Wed, 10 Apr 2019 00:52:14 +0000 (17:52 -0700)]
Convert mutt_expand_fmt() and rfc1524_expand_filename() to struct Buffer

These two functions were tied together and so are converted at the
same time.

Note that rfc1524_expand_filename() had an off-by-one error for the
left hand size of the name template.  It was only copying i-1 instead
of the i characters before %s.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_print_attachment to use struct Buffer
Kevin McCarthy [Sun, 14 Oct 2018 21:35:21 +0000 (14:35 -0700)]
Convert mutt_print_attachment to use struct Buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_view_attachment to use struct Buffer
Kevin McCarthy [Sun, 14 Oct 2018 21:02:20 +0000 (14:02 -0700)]
Convert mutt_view_attachment to use struct Buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_edit_attachment to use struct Buffer
Kevin McCarthy [Sun, 14 Oct 2018 20:02:20 +0000 (13:02 -0700)]
Convert mutt_edit_attachment to use struct Buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_compose_attachment to use struct Buffer
Kevin McCarthy [Sun, 14 Oct 2018 23:18:53 +0000 (16:18 -0700)]
Convert mutt_compose_attachment to use struct Buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_get_tmp_attachment to use struct Buffer
Kevin McCarthy [Sun, 14 Oct 2018 19:52:30 +0000 (12:52 -0700)]
Convert mutt_get_tmp_attachment to use struct Buffer

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_expand_file_fmt() to accept struct Buffer dest parameter
Kevin McCarthy [Tue, 9 Apr 2019 22:20:51 +0000 (15:20 -0700)]
Convert mutt_expand_file_fmt() to accept struct Buffer dest parameter

mutt_expand_fmt() will be converted in the next commit, at the same
time as rfc1524_expand_filename().

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoAdd mutt_buffer_quote_filename()
Kevin McCarthy [Tue, 9 Apr 2019 21:04:36 +0000 (14:04 -0700)]
Add mutt_buffer_quote_filename()

Convert almost all the callers to use the new function.  alias.c usage
is a bit involved, so leave that for now.

Remove unneeded index while converting from mutt_quote_filename().

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoConvert mutt_check_simple() to accept a struct Buffer parameter
Kevin McCarthy [Tue, 9 Apr 2019 02:51:01 +0000 (19:51 -0700)]
Convert mutt_check_simple() to accept a struct Buffer parameter

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agoChange autoview_handler() to use struct Buffer
Kevin McCarthy [Mon, 8 Apr 2019 16:51:34 +0000 (09:51 -0700)]
Change autoview_handler() to use struct Buffer

This will allow the full conversion of rfc1524_expand_filename(), and
thereafter mutt_adv_mktemp() too.

Co-authored-by: Richard Russon <rich@flatcap.org>
5 years agomerge: fix bind/macro translations
Richard Russon [Tue, 30 Apr 2019 16:40:59 +0000 (17:40 +0100)]
merge: fix bind/macro translations

 * icommands.c: Unify error messages about temp file creation
 * icommands.c: Add hints about '%s' for the translators
 * icommands.c: I18N: Fix piecemeal constructed translation string
 * po: Update PO files due to icommands.c change

5 years agopo: Update PO files due to icommands.c change 1686/head
Reis Radomil [Mon, 29 Apr 2019 17:23:44 +0000 (17:23 +0000)]
po: Update PO files due to icommands.c change

5 years agoicommands.c: I18N: Fix piecemeal constructed translation string
Reis Radomil [Sun, 28 Apr 2019 14:32:34 +0000 (14:32 +0000)]
icommands.c: I18N: Fix piecemeal constructed translation string

Do not translate individual parts of a message and then combine them in
a printf-style way. This might work for English but miserably fails for
other languages. Instead use two or more complete sentences and pass
each of the sentences to the translator.

Fixes issue #1680

5 years agoicommands.c: Add hints about '%s' for the translators
Reis Radomil [Sun, 28 Apr 2019 14:25:18 +0000 (14:25 +0000)]
icommands.c: Add hints about '%s' for the translators

Add comments which describe what the '%s' parameter in the translation
string is.

5 years agoicommands.c: Unify error messages about temp file creation
Reis Radomil [Sun, 28 Apr 2019 13:03:12 +0000 (13:03 +0000)]
icommands.c: Unify error messages about temp file creation

Unify all the messages stating that the temporary file could not be
created to include the filename of the temporary file.

5 years agoRespect collapse_all after limit (#1685)
Pietro Cerutti [Tue, 30 Apr 2019 15:25:01 +0000 (16:25 +0100)]
Respect collapse_all after limit (#1685)

Issue #1667