Richard Russon [Wed, 15 Nov 2017 23:57:37 +0000 (23:57 +0000)]
merge: upstream fixes (mutt/default)
* Note which ssl config vars are GnuTLS or OpenSSL only
* Add message count to $move quadoption prompt
* Add %R (number of read messages) for $status_format
* Updated French translation
* Add $change_folder_next option to control mailbox suggestion order
* Fix $smart_wrap to not be disabled by whitespace-prefixed lines
* Remove useless else branch in the $smart_wrap code
Kevin McCarthy [Wed, 15 Nov 2017 22:53:19 +0000 (14:53 -0800)]
Fix $smart_wrap to not be disabled by whitespace-prefixed lines. (closes #3857)
changeset:737102af74eb fixed a folded header display issue with $smart_wrap
by disabling $smart_wrap for lines beginning with whitespace.
Unfortunately, this turns off smart wrapping in the body of an email
too, even when the line has other whitespace breaks in it.
An earlier commit, changeset:125076e0fdfa added an infinite loop fix
when MUTT_PAGER_NSKIP is set, by disabling the smart_wrap if the space
backtracking went to the beginning of the line. That is, a line
beginning with 1+ whitespace followed by a single long word.
Extend this second commit by always disabling the smart_wrap in that
case, not just when MUTT_PAGER_NSKIP is set. This also solves the
folded header issue without other side effects.
Kevin McCarthy [Sat, 11 Nov 2017 23:49:15 +0000 (15:49 -0800)]
Add $change_folder_next option to control mailbox suggestion order.
This patch is out of the Gentoo package maintained by Fabian Groffen.
From the link below, it appears the original author was Simon Burge.
I made some minor changes to get it to apply correctly, and cleaned up
the documentation a bit.
Original patch description:
This patch brings back the original behaviour of change-folder, which
some people find more useful. It suggests the next folder in your
mailboxes list that has new mail measured from the current folder,
instead of the first folder from your mailboxes list in any case. This
prevents starvation of folders defined at the back of your list ;)
See discussion: http://thread.gmane.org/gmane.mail.mutt.devel/12457
Richard Russon [Wed, 15 Nov 2017 21:36:54 +0000 (21:36 +0000)]
merge: add <edit-or-view-raw-message>
* Rename OP_EDIT_MESSAGE to OP_EDIT_RAW_MESSAGE
* neomutt-syntax.vim: Add highlight rules for new functions
* doc: Document new mutt functions in manual
* editmsg.c: Implement mutt_view_message() function
* Add `<{edit,edit-or-view,view}-raw-message>` functions
Add mutt-functions `<edit-raw-message>`, `<edit-or-view-raw-message>`
and `<view-raw-message>`.
`<view-raw-message>` is a binding for the C-function
`mutt_view_message()`, which opens the raw message as a read-only file
in an external editor.
`<edit-or-view-raw-message>` is a dispatcher function: If the mailbox
is writable then this is the same as `<edit-raw-message>`, otherwise it
is the same as `<view-raw-message>`.
`<edit-raw-message>` is a synonym for `<edit>` whose name coherent with
the naming scheme of the other two functions introduced.
Change default key binding of `e` from `edit` to
`edit-or-view-raw-message`. This allows viewing the raw message in an
external editor also in read-only mailboxes.
Reis Radomil [Wed, 15 Nov 2017 20:53:03 +0000 (21:53 +0100)]
editmsg.c: Implement mutt_view_message() function
Add mutt_view_message() function, which opens the selected message or
the tagged messages as a read-only file in an external editor. This
function is similar to mutt_edit_message() but does not allow modifying
the message.
A usage scenario might be to view the message source code in an editor.
Note: This patch only adds C functions. It does not add any mutt-functions.
Reis Radomil [Wed, 15 Nov 2017 20:52:14 +0000 (21:52 +0100)]
Rename OP_EDIT_MESSAGE to OP_EDIT_RAW_MESSAGE
This brings the constant name in line with the description of its
corresponding mutt-function and paves the way for a coherent name scheme
in the upcoming 'edit-raw-message' family of mutt-functions.
Richard Russon [Mon, 13 Nov 2017 02:39:04 +0000 (02:39 +0000)]
highlight preproc-like variable
`allow_skip` is only set in one place in a `#ifdef`d block.
This effectively makes it a preprocessor condition.
By changing its name to capitals we let Coverity know how we're using
the variable.
Richard Russon [Wed, 1 Nov 2017 05:14:22 +0000 (05:14 +0000)]
fix: drop capability aliases
`CapabilityAliases` was a list of alternative names (just one) for IMAP
capability strings. This isn't necessary. We can put the strings in
`Capabilities` and fix the enumeration.
Richard Russon [Sat, 4 Nov 2017 14:31:54 +0000 (14:31 +0000)]
alias drop self
struct Alias began:
```c
struct Alias
{
struct Alias *self; /* XXX - ugly hack */
...
```
There didn't seem to be any reason for this pointer.
The two places that allocate a new Alias, immediately set the self
pointer to the object. No users of `self` test it first.
Pietro Cerutti [Thu, 26 Oct 2017 16:08:41 +0000 (17:08 +0100)]
Wrap dirname(3) inside a mutt_dirname() function
* Wrap dirname(3) inside a mutt_dirname() function
This new function, opposite to the original dirname(3), does not modify
its argument and can be passed a const char * argument. This means that
callers mustn't copy their strings before calling dirname anymore.
Mehdi ABAAKOUK [Wed, 25 Oct 2017 16:10:53 +0000 (18:10 +0200)]
url: make notmuch query string parser generic (#812)
* Notmuch: remove custom UriTag linked list
Use STAILQ helper for UriTag linked list.
* url: make notmuch query string parser generic
Enhance the url.c to handle query strings.
This permits to remove the notmuch custom url parser.
* url: always parse query string
This removes url_parse_with_qs methods.
* fix some problems
- double free in nm_normalize_uri()
- set path to NULL in url_parse()
If we're setting all the other members, we should set the path too
- tidy some doxygen docs
* notmuch: remove useless starting / from db_filename
Pietro Cerutti [Wed, 25 Oct 2017 15:51:46 +0000 (16:51 +0100)]
Do not use CPPFLAGS / CFLAGS together with CC_FOR_BUILD (#882)
* Do not use CPPFLAGS / CFLAGS together with CC_FOR_BUILD
* Restore -std=c99 when building makedoc
* Make sure host-independent CFLAGS are passed to CC_FOR_BUILD
* Let CC_FOR_BUILD carry CFLAGS_FOR_BUILD, there's no reason to split them
Austin Ray [Sat, 21 Oct 2017 18:08:34 +0000 (14:08 -0400)]
Fix smart wrap in pager without breaking header
This commit addresses the issue of smart wrap not working if a line
started with whitespace.
This behavior was a result commit f5e472b where smart wrap was disabled
on lines beginning with a space or tab to prevent headers from having
weird wrapping.
This commit addresses this issue by only applying smart wrapping if the
pager is displaying a message body. This allows smart_wrap to work
inside of a message and preserves what commit f5e472b addressed.
Additionally, the buf[cnt] checks have been simplified with the use of
the ISSPACE() macro.
While fixing the smart wrap, it became apparent that the HEADER portion
of the pager was not properly updating when the wrap size was modified.
To address this, the wrap command was changed from R_PAGER to
R_PAGER_FLOW in init.h. This redraws the pager after wrap is modified.