✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
ci: enable UBSan alongside the existing ASan run ASan already runs in CI (asan.yml), but UBSan (a separate, independent compile flag) never did, despite auto.def supporting it. Added --ubsan to the existing configure invocation rather than a new workflow, with halt_on_error=1 so a real violation actually fails the job instead of just logging, and a log artifact upload matching the existing ASan one. Depends on the previous commit - without it, this run fails immediately on a real (if harmless in practice) function-pointer type violation in attachmatch_free(). | 1 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
attach: fix undefined behaviour in attachmatch_free's signature attachmatch_free() was declared as void(struct AttachMatch **) but called everywhere through a (list_free_t) cast - void(void **). Calling a function through an incompatible function-pointer type is undefined behaviour per the C standard, caught by UBSan's function check while testing --ubsan locally (issue found ahead of enabling it in CI - see next commit). Harmless in practice on this ABI (both are just pointer-to-pointer), which is exactly why it went unnoticed. Fixed by giving attachmatch_free() the generic void ** signature list_free_t actually expects, matching the pattern the codebase's own tests use (test_list_free in test/list/mutt_list_free_type.c), and casting internally instead of at each of the 8 call sites. Removed the now technically-unnecessary (list_free_t) casts. | 1 个月前 | |
initialise things Ensure that pointers, structs and variables used as outparams are initialised. (some of variable types were obscured by typedefs) | 2 个月前 | |
tidy code - shorten name to parse_unbind_exec() - drop unused function mutt_unget_string() - add missing const - drop unnecessary comments - autosetup: add const | 7 个月前 | |
bcache: sanitize mailbox names that escape the cache dir the body cache builds its on-disk path from the server-supplied mailbox name, so a name containing '..' components escapes $message_cache_dir. replace each '..' path component with '__' so the path stays inside the cache directory and caching keeps working for such names. | 2 个月前 | |
browser: add home and root navigation Add <goto-home> and <goto-root> functions to the Browser menu. | 1 个月前 | |
Use optreset on Solaris too Without that neomutt on Solaris treats any and all commandline arguments as an address. | 5 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
module: tidy cleanup Pass the Module Data to the Module on cleanup() | 4 个月前 | |
compmbox: parse hook expandos early Compile and validate compression hook expandos while parsing them. Store them on Hooks and reuse them for compressed mailboxes. | 1 个月前 | |
compose: make spelling command configurable Rename the config option from $ispell to $spelling_command while retaining $ispell as a synonym. Upgrade the option to DT_EXPANDO and add %f / %{file} for the shell-quoted message filename. Move ispell's -x argument into the default value, leaving alternate spelling programs free to define their own command line. Track whether the filename expando was rendered and append the quoted filename when it was omitted. This preserves the convenient behaviour of legacy command values without duplicating filenames in expando-aware commands. | 1 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
conn: add missing sys/time.h include in raw.c raw.c uses struct timeval directly but only got sys/time.h transitively via sys/select.h. Found while scoping #4962 (IWYU CI check) -- confirmed via IWYU itself (clean after this change) and by checking the two actual usages (raw.c:115,360). | 1 个月前 | |
contrib: fix vim modeline Set filetype 'ft' instead of syntax 'syn'. | 5 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
fuzzy: OpFuzzy Create a dedicated menu for Fuzzy Searching. | 2 个月前 | |
build: tidy makefiles Remove duplicates, sort file lists, wrap to 80 chars. | 1 个月前 | |
compose: make spelling command configurable Rename the config option from $ispell to $spelling_command while retaining $ispell as a synonym. Upgrade the option to DT_EXPANDO and add %f / %{file} for the shell-quoted message filename. Move ispell's -x argument into the default value, leaving alternate spelling programs free to define their own command line. Track whether the filename expando was rendered and append the quoted filename when it was omitted. This preserves the convenient behaviour of legacy command values without duplicating filenames in expando-aware commands. | 1 个月前 | |
build: tidy makefiles Remove duplicates, sort file lists, wrap to 80 chars. | 1 个月前 | |
menu: drop helper macros | 2 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
fix: avoid short overflow of row count in calc_address() rows was declared short, but is only bounded by the number of addresses in a single To/Cc header -- an email with more than 32767 recipients in one header would overflow it (undefined behaviour in C, likely wraps negative on real compilers). Needs an extreme address count to trigger, so practical severity is low, but it's genuine UB reachable from attacker-controlled input. Widen the internal loop variable to int; *srows (the short output) is still only ever assigned MIN(rows, MAX_ADDR_ROWS), and MAX_ADDR_ROWS is 5, so the narrowing at that point is always safe regardless of how large rows gets internally. Coverity CID 392740. | 1 个月前 | |
expando: add find_node helper Add expando_find_node() to recurse through an Expando's tree looking for a matching (did,uid) pair. This allows callers to check if a certain Expando is in use. | 1 个月前 | |
build: tidy makefiles Remove duplicates, sort file lists, wrap to 80 chars. | 1 个月前 | |
fuzzy: guard match position index UTF-8 matches record one candidate position for each pattern byte. Although the pattern-length checks constrain those writes indirectly, the computed pi + k index was not checked against the fixed matchpos capacity at the write site. Validate the computed index before storing it so malformed input or a future change to the surrounding bounds cannot write element 256 of the 256-element array. | 1 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
iwyu: fix includes | 2 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
compmbox: parse hook expandos early Compile and validate compression hook expandos while parsing them. Store them on Hooks and reuse them for compressed mailboxes. | 1 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
index: add <browse-mailboxes> Add two Index functions: - <browse-mailboxes> - <browse-mailboxes-readonly> These are shortcuts into the Mailbox view in the Browser Dialog. | 1 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 3 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
color: fix index_tags pattern matching Commit d86195a51 changed MT_COLOR_INDEX_TAGS to match the configured argument as a literal substring against the rendered tag text. This was wrong, so revert that bit of the change. Evaluate the argument as a NeoMutt pattern against the Email via mutt_pattern_exec(). | 2 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
menu: use the OP_QUIT from 'generic' Update lots of dialogs to use 'generic's OP_QUIT (`q`) rather than implement their own. - alias - attach - autocrypt - browser - compose - gpgme - mlist - pgp - postpone - query - smime | 2 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
parse: always expand $var inside backticks Variable interpolation inside backticks was gated behind the opt-in TOKEN_BACKTICK_VARS flag, which only 'set', 'source' and 'sidebar' passed. Other commands (macro, alias, ...) therefore did not expand NeoMutt variables inside backticks, giving inconsistent behaviour. Make the recursive token extraction the default in parse_extract_token() so all commands expand $var inside backticks consistently. TOKEN_NOSHELL recursion semantics are preserved, leaving unknown/env variables for the shell. The now-unused TOKEN_BACKTICK_VARS flag is removed. | 2 个月前 | |
bugprone: parenthesize macro arguments/replacement lists The last of the three categories flatcap flagged as good candidates on #4970 -- bugprone-macro-parentheses. 28 sites across 13 files fixed; 7 confirmed as genuine false positives and deliberately left untouched (see below). Every site was checked against its actual call sites for a live bug, not just mechanically wrapped: - Simple negative-constant macros (COLOR_DEFAULT, MUTT_WIN_SIZE_UNLIMITED, OP_REPAINT/TIMEOUT/ABORT, IMAP_RES_NO/BAD, MUTT_MAXRANGE) get their replacement list wrapped. - Value-expression arguments used unparenthesized next to an operator (config/types.h's IS_MAILBOX/IS_COMMAND, mutt/array.h's ARRAY_GET, mutt/mbyte.h's IsWPrint/IsBOM, notmuch/private.h's LIBNOTMUCH_CHECK_VERSION) get the argument wrapped -- no live caller currently passes a compound expression, but this is exactly the class of bug that bites the next caller who does. - mutt/string2.h's SKIPWS and mutt/array.h's ARRAY_FOREACH_(REVERSE_)FROM_TO wrap the argument even though it's used as an assignment/increment target, since `(x)++`/`(x) = ...` are equivalent to the unparenthesized form for any valid lvalue -- harmless, satisfies the check. Three false-positive patterns confirmed and left alone, since parenthesizing would either not compile or change meaning: - mutt/atoi.h:39 and mutt/memory.h:57: the macro argument is a type name (a function parameter's type, and a _Generic type-association respectively), not a value expression -- wrapping a type name in parens isn't valid there. - mutt/array.h:52: same class -- `T` is the array element's type name in a struct member declaration. - mutt/queue.h:437/632/887/896 (all four remaining sites in that file): `field` is passed as a member-designator into `__containerof()` (built on `offsetof()`), not a value expression. Verified empirically with a standalone test file: parenthesizing a member-designator argument to `offsetof()` is a genuine compile error ("expected identifier"), not just a style question. Verification: `clang-tidy -p . <file> --checks='-*,bugprone-macro-parentheses' --header-filter='.*'` now reports only the 7 confirmed-false-positive sites above (was 28 fixable + 7 false positives = 35 total unique locations). Full clean build, `make test` passes (all suites), `clang-format --dry-run -Werror` shows no *new* violations in any changed file (checked differentially against each file's pre-existing state, since several of these headers already had unrelated formatting drift). AI assistance: the mechanical location of all sites, the call-site tracing to distinguish live risk from defensive-only fixes, and the identification + empirical verification of the false positives was done by Claude Code; I reviewed the reasoning and diff, including the compile-error test for the offsetof() case, before this went up. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
docs: minor fixes - doxy: typo - docs: $resolve applies to non-email lists - docs: "This screen" -> "Help screen" | 2 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
initialise things Ensure that pointers, structs and variables used as outparams are initialised. (some of variable types were obscured by typedefs) | 2 个月前 | |
triv: fix const warnings Fix a few simple `const` warnings. | 3 个月前 | |
bugprone: replace rewind()/setbuf() with checked equivalents rewind() and setbuf() give clang-tidy's bugprone-unsafe-functions check no way to detect failure. Replace with their exact behavioural equivalents that do: fseek()+clearerr() for rewind() (fseek alone doesn't clear the error indicator the way rewind() does), and setvbuf() for the one setbuf() call. Three sites (nntp.c, crypt_gpgme.c, smime.c) had the original rewind() as an unbraced single-statement if-body; braces added where the two-statement replacement needed them, since one would otherwise silently run unconditionally. Doesn't add explicit fseek()/setvbuf() return-value checking beyond what the codebase already does at nearby call sites -- that would be a separate, larger error-handling question, not addressed here. Confirmed via `clang-tidy -p . <file> --checks='-*,bugprone-unsafe-functions'` this clears all 76 warnings flatcap found on PR #4970 in this category. Full clean build and `make test` pass. AI assistance: written and verified by Claude Code (mechanical transform + manual review of all 76 sites for the brace hazard above), reviewed by chrisdebian before commit. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> | 1 个月前 | |
fix: fall back to hil_index -1 when sb_prev() finds nothing on removal sb_remove_mailbox() keeps the sidebar highlight in place when possible after a mailbox is removed. When the highlighted entry was the last one in the array and got deleted, it calls sb_prev() to backtrack to the previous unhidden entry, but never checked whether that succeeded. If every remaining entry is hidden, sb_prev() returns false and hil_index is left at its old value - which is now one past the end of the shrunk array, since the entry it used to point to no longer exists. The sibling is_hidden branch a few lines below already falls back to hil_index = -1 in its own equivalent failure case; this branch didn't. Not memory-unsafe on its own: every hil_index reader goes through ARRAY_GET(), which bounds-checks and returns NULL out of range. But it leaves the sidebar in a state the "hil_index < 0" checks scattered through this file won't detect as "nothing highlighted". Fixed by checking sb_prev()'s return value and falling back to -1, matching the sibling branch. Found via Coverity CID 561613. | 1 个月前 | |
Add missing backquote to smime-notes.txt | 4 个月前 | |
initialise things Ensure that pointers, structs and variables used as outparams are initialised. (some of variable types were obscured by typedefs) | 2 个月前 | |
build: tidy makefiles Remove duplicates, sort file lists, wrap to 80 chars. | 1 个月前 | |
.clang-format: Don't special-case <stddef.h> The commit ac6ef83f3229 ("fix: build of imap/auth_sasl.c") claims to workaround a bug in sasl.h, which supposedly is missing an `#include <stddef.h>` for size_t. However, I can see the include in my system: alx@debian:~$ apt-file search sasl/sasl.h libsasl2-dev: /usr/include/sasl/sasl.h alx@debian:~$ grep stddef /usr/include/sasl/sasl.h #include <stddef.h> /* For size_t */ And the include has been there since 2012, according to a git-blame(1) on the source repository: alx@debian:/tmp/cyrus-sasl$ find | grep /sasl.h ./include/sasl.h alx@debian:/tmp/cyrus-sasl$ git blame ./include/sasl.h | grep stddef 67a188693 (Ken Murchison 2012-12-20 18:14:50 -0500 124) #include <stddef.h> /* For size_t */ alx@debian:/tmp/cyrus-sasl$ git show 67a188693 commit 67a188693796a14e3a76ac603104807fbbfddfc4 Author: Ken Murchison <murch@andrew.cmu.edu> Date: Thu Dec 20 18:14:50 2012 -0500 sasl.h: #include <stddef.h> for size_t on NetBSD diff --git a/include/sasl.h b/include/sasl.h index fef4d510..8b8a63fb 100755 --- a/include/sasl.h +++ b/include/sasl.h @@ -121,6 +121,8 @@ #ifndef SASL_H #define SASL_H 1 +#include <stddef.h> /* For size_t */ + /* Keep in sync with win32/common.mak */ #define SASL_VERSION_MAJOR 2 #define SASL_VERSION_MINOR 1 This seems to have been a red herring. There was probably some include problem somewhere else, and that change accidentally fixed it. Or maybe back then in 2017, some distributions still had an already-very old version of <sasl/sasl.h> which still didn't have the include. However it is, the include has been there for more than a decade now, and we don't need to workaround any bugs. Fixes: ac6ef83f3229 ("fix: build of imap/auth_sasl.c") Link: <https://github.com/neomutt/neomutt/issues/4284> Cc: Richard Russon <rich@flatcap.org> Signed-off-by: Alejandro Colomar <alx@kernel.org> | 2 年前 | |
Generate .clang_complete For users of https://github.com/Rip-Rip/clang_complete, this allows to always keep the .clang_complete file in sync with CFLAGS. | 8 年前 | |
editorconfig: fix charset entry According to the spec, utf-8 must be spelled "utf-8" https://spec.editorconfig.org/#supported-pairs | 3 年前 | |
educate github's linguist GitHub creates language stats about NeoMutt using "linguist". Unfortunately, it thinks that mutt.h and init.h are C++. | 9 年前 | |
build: Don't unnecessarily rebuild docs and po Drop the PHONY targets for dirs. Instead, create a `.keepme` temporary file. | 7 个月前 | |
sync changelog Sync the changelog, authors, mailmap from the release branch | 4 个月前 | |
sync changelog Sync the changelog, authors, mailmap from the release branch | 4 个月前 | |
sync changelog Sync the changelog, authors, mailmap from the release branch | 4 个月前 | |
docs: add missing hcache backends to INSTALL | 4 个月前 | |
docs: tidy license info - Use GNU's own markdown version of the license - Clarify NeoMutt's copyright w.r.t. GPLv2+ | 2 年前 | |
build: tidy makefiles Remove duplicates, sort file lists, wrap to 80 chars. | 1 个月前 | |
docs: add Repology packaging status badge to README No packaging status indicator existed in the README badge row, unlike the website (distro.md), which already has one. Confirmed via the GitHub API that the live README has no existing mention of Repology, and no prior open/closed PR or issue on this repo ever proposed one. Used the tiny-repos variant rather than vertical-allrepos (used on the website) since the README's badge row is a single line of small badges -- the tall variant would break that layout. | 1 个月前 | |
docs: tidy grammar, style Co-authored-by: Laur Aliste <laur.aliste@gmail.com> | 6 个月前 | |
store: drop bdb | 5 个月前 | |
Update autosetup | 3 年前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 3 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 3 个月前 | |
index: resolve after printing Make OP_PRINT follow $resolve for non-tagged selections. Return a status from mutt_print_message() so the index only advances when printing actually succeeds, and use the actual repeat-count selection size when resolving to the next menu entry. | 4 个月前 | |
flags: check for NULL email and thread in mutt_thread_set_flag() Prevent a SIGSEGV in mutt_thread_set_flag() by adding validation for the Email pointer and its associated MuttThread. Some callers in index/functions.c, such as op_main_read_thread() and op_undelete_thread(), do not guard against shared->email being NULL (which occurs when the mailbox is empty). If triggered, they pass a NULL Email pointer to mutt_thread_set_flag(), causing a crash when attempting to access the thread. Additionally, even if the Email pointer is valid, its thread association (e->thread) can be NULL. This happens when threading is disabled, but can also occur when threading is enabled if the thread tree has been cleared (e.g., via mutt_clear_threads() during a rebuild, or mview_free() during teardown) and not yet rebuilt. If mutt_thread_set_flag() is called in this transient state, attempting to traverse the thread results in a SIGSEGV. To address this, we now return early if the Email pointer is NULL, verify that threading is enabled (preserving the "Threading is not enabled" error message), and return early if the MuttThread pointer itself is NULL. | 2 个月前 | |
alias: encapsulate globals | 6 个月前 | |
send: encapsulate globals | 6 个月前 | |
menu: drop helper macros | 2 个月前 | |
fuzzy: OpFuzzy Create a dedicated menu for Fuzzy Searching. | 2 个月前 | |
module: use gui_init | 4 个月前 | |
doxy: unify module names | 6 个月前 | |
update copyright dates | 2 年前 | |
postpone: move globals to PostponeModuleData - Add post_count and update_num_postponed to struct PostponeModuleData - Enable init/cleanup in module.c - Update postpone.c and functions.c to use mod_data - Remove extern from mutt.h | 4 个月前 | |
docs: minor fixes - doxy: typo - docs: $resolve applies to non-email lists - docs: "This screen" -> "Help screen" | 2 个月前 | |
initialise things Ensure that pointers, structs and variables used as outparams are initialised. (some of variable types were obscured by typedefs) | 2 个月前 | |
logging: rename validator Rename level_validator() to debug_level_validator() to match the config option. | 9 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 3 个月前 | |
index: add previous-unread-mailbox function Add new <previous-unread-mailbox> function for symmetry with <next-unread-mailbox>. Allows navigating backwards through mailboxes with unread mail, wrapping around to the end of the list. - Implement mutt_mailbox_prev_unread() in mutt_mailbox.c - Add OP_MAIN_PREV_UNREAD_MAILBOX opcode - Add op_main_prev_unread_mailbox() function to index and pager - Update documentation to mention both functions - Works in both index and pager modes | 4 个月前 | |
module: pass data into helpers Update helper functions reached from module init/cleanup paths so callers pass the module-owned fields they use, or the module data pointer when several fields are needed. This removes extra neomutt_get_module_data() lookups from attach, autocrypt, color, conn, gui, history, hooks, key, menu, ncrypt, and sidebar helpers, and updates the affected tests to match. | 4 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 3 个月前 | |
update copyright dates | 2 年前 | |
compose: honour $resolve in Attachment List functions Compose functions that act upon the Attachment List now advance the selection by the number of items operated on when $resolve is set, matching the behaviour of the Index and other menus. Nothing moves for tag-prefix selections, and overruns are capped at the end of the list. Add a resolve_attachment() helper and apply it to get-attachment, print-entry, copy-file, toggle-disposition, toggle-recode, toggle-unlink, update-encoding, filter/pipe, edit-content-id, edit-description, edit-encoding, edit-language and edit-mime. | 2 个月前 | |
tmp: merge similar tmp file functions - merge buf_mktemp_full() and buf_mktemp_draft_full() - merge mutt_adv_mktemp() and mutt_adv_mktemp_draft() The two functions were identical except for which config option they read (tmp_dir vs tmp_draft_dir). Add a 'cfg' parameter to select the config option and remove the duplicate function. The macros now pass the appropriate config key, so callers are unchanged. | 5 个月前 | |
compmbox: parse hook expandos early Compile and validate compression hook expandos while parsing them. Store them on Hooks and reuse them for compressed mailboxes. | 1 个月前 | |
refactor: upgrade macro flags to enum flags Turn #define'd flags into enums. Enums provide: - debugger visibility - compiler diagnostics - symbol scoping by convention - easier navigation/search - cleaner documentation generation - type grouping Naming: - enum has singular ending, e.g. Flag - typedef wrapper has plural ending, e.g. Flags Suffix `_NO_FLAGS` has been renamed to `_NONE` for consistency. | 3 个月前 | |
split up variable definitions clang-tidy warns: 'warning: multiple declarations in a single statement reduces readability' | 2 个月前 | |
doxy: unify module names | 6 个月前 | |
Update log level description to cover the value 0 The option `--debug-level` and configuration variable `$debug_level` also accept the value of 0, in which case logging is disabled. Document this in the documentation and the help output. | 3 个月前 | |
doxy: unify module names | 6 个月前 | |
doxy: document struct members Assisted-by: GitHub Copilot | 8 个月前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
这是 NeoMutt 项目
什么是 NeoMutt?
NeoMutt 是一个项目的集合:
- 收集所有针对 Mutt 的补丁的地方
- 所有开发者聚集的地方
这有助于建立社区并减少重复工作。
NeoMutt 是由 Richard Russon(@FlatCap)创建的,他收集了所有旧的 Mutt 补丁,对其进行整理、修复并编写了文档。
NeoMutt 有哪些功能?
| 名称 | 描述 |
|---|---|
| Account Command | 通过外部命令填充账户凭据 |
| Attach Headers Color | 使用正则表达式为附件标题着色,就像邮件正文一样 |
| Command-line Crypto (-C) | 在默认不启用消息安全的模式下启用该功能 |
| Compose Message Preview | 在撰写对话框中显示邮件预览 |
| Compose to Sender | 向当前邮件的发件人发送新邮件 |
| Compressed Folders | 读取/写入压缩的邮箱 |
| Conditional Dates | 使用规则选择日期格式 |
| Custom Mailbox Tags | 实现 Notmuch 标签和 Imap 关键字 |
| Encrypt-to-Self | 保存电子邮件的自加密副本 |
| Fmemopen | 用内存缓冲区替换一些临时文件 |
| Forgotten Attachment | 当用户忘记在待发邮件中添加附件时提醒用户 |
| Global Hooks | 定义在 NeoMutt 中全局运行的操作 |
| Header Cache Compression | 压缩邮件头缓存文件的选项 |
| Ifdef | 条件配置选项 |
| Index Color | 用于自定义电子邮件索引主题的规则 |
| Initials Expando | 作者姓名首字母的扩展变量 |
| Limit Current Thread | 专注于单个电子邮件线程 |
| LMDB | 邮件头缓存的 LMDB 后端 |
| Multiple FCC | 保存多份已发送邮件副本 |
| Nested If | 允许在格式字符串中使用复杂的嵌套条件 |
| New Mail | 收到新邮件时执行命令 |
| NNTP | 连接 Usenet 新闻服务器 |
| Notmuch | 电子邮件搜索引擎 |
| Pager Read Delay | 预览邮件时,寻呼机标记邮件为已读的延迟时间 |
| Progress Bar | 在缓慢操作时显示可视化进度条 |
| Quasi-Delete | 标记应隐藏但不删除的电子邮件 |
| Reply With X-Original-To | 使用 X-Original-To 头直接回复邮件 |
| Sensible Browser | 使文件浏览器正常工作 |
| Sidebar | 包含邮箱列表的面板 |
| Skip Quoted | 保留一些上下文可见 |
| Status Color | 用于自定义状态栏主题的规则 |
| TLS-SNI | 与服务器协商 TLS/SSL 证书 |
| Trash Folder | 自动将已删除的电子邮件移至垃圾箱 |
| Use Threads | 改进在索引中查看线程的体验 |
贡献的脚本与配置
| 名称 | 描述 |
|---|---|
| Header Cache Benchmark | 用于测试标头缓存速度的脚本 |
| Keybase | Keybase 集成 |
| Useful programs | 与 NeoMutt 交互的实用程序列表 |
| Vi Keys | 简单清晰的 NeoMutt Vi 键位设置 |
| Vim Syntax | Vim 语法文件 |
如何安装 NeoMutt
您的发行版可能已打包 NeoMutt。如果没有,可以从源代码构建(https://neomutt.org/dev/build/build)。请参考发行版页面(https://neomutt.org/distro.html)上的安装说明。
NeoMutt 相关资源在哪里?
- 源代码: https://github.com/neomutt/neomutt
- 发布版本: https://github.com/neomutt/neomutt/releases/latest
- 问题/漏洞反馈: https://github.com/neomutt/neomutt/issues
- 官方网站: https://neomutt.org
- IRC 频道: irc://irc.libera.chat/neomutt — 请耐心等待,我们是一个小团队,因此回复可能需要一些时间
- 邮件列表: neomutt-users 和 neomutt-devel
- 开发相关: https://neomutt.org/dev.html
- 贡献者: 所有为 NeoMutt 提供帮助的人
版权信息
NeoMutt 采用 GPL v2+(GNU 通用公共许可证)发布;详情参见 LICENSE.md。
NeoMutt 的主要作者包括:
- Copyright (C) 2015-2024 Richard Russon
<rich@flatcap.org> - Copyright (C) 2016-2023 Pietro Cerutti
<gahr@gahr.ch> - Copyright (C) 2017-2019 Mehdi Abaakouk
<sileht@sileht.net> - Copyright (C) 2018-2020 Federico Kircheis
<federico.kircheis@gmail.com> - Copyright (C) 2017-2022 Austin Ray
<austin@austinray.io> - Copyright (C) 2023-2024 Dennis Schön
<mail@dennis-schoen.de> - Copyright (C) 2016-2017 Damien Riegel
<damien.riegel@gmail.com> - Copyright (C) 2023 Rayford Shireman
- Copyright (C) 2021-2023 David Purton
<dcpurton@marshwiggle.net> - Copyright (C) 2020-2023 наб
<nabijaczleweli@nabijaczleweli.xyz>