~jcc

https://jasoncarloscox.com

~jcc/kbd-analyzer

Last active 1 year, 2 months ago

~jcc/public-inbox

Last active 2 years ago
View more

Recent activity

Re: Preserve draft emails somewhere on non-zero editor exit code 20 days ago

From Jason Cox to ~rjarry/aerc-discuss

Hi Brandon,

On Tue Nov 12, 2024 at 7:17 PM EST, Brandon Sprague wrote:
> I recently added the Harper LSP [1] to my text editor (Helix) to get spellchecking when composing my emails. This generally works great, but when composing emails with lots of quoted context, the LSP sometimes times out as I'm :wq-ing the editor, which makes Helix return a non-zero status code.
>
> Aerc appears to throw away the draft email in this case, it's no longer available in /tmp/aerc-compose-*.eml, which means I have to write the email again. If an editor exits with a non-zero exit code, we should preserve the .eml file somewhere, or drop the user to a choice screen where they decide what should happen. This could probably be the usual send/preview/attach/abort screen, a non-zero exit code from the editor doesn't necessarily mean the whole *.eml is unsalvageable.

Aerc used to just go to the normal send/preview/attach/abort screen
regardless of the editor's exit code. That was changed in commit 5f5514d
(compose: quit composing when editor returns error) because some people
want to be able to use :cq to quit vim and abort composing, like you
might do with a git commit message.

When the editor crashes, though, it definitely makes sense to keep the

Re: HTML privacy and security 25 days ago

From Jason Cox to ~rjarry/aerc-discuss

On Fri Nov 8, 2024 at 2:07 PM EST, Avid Seeker wrote:
> Currently `:open` behavior in aerc saves .html to /tmp then xdg-open it.
> Would it be possible to pipe the saved .html into an image and js stripper?

You should be able to pull this off. When you run :open, it looks at the
[openers] section of aerc.conf to decide what to do with the saved file.
(See aerc-config(5).) I imagine that you could write a script to first
strip the images and JS from the file and then open it in your browser.
From there you would just set the script as your text/html opener.

If you come up with a good script for this, I'm sure it would be a
welcome contribution to the contrib directory or the wiki.

Re: aerc templates / .OriginalHeader 28 days ago

From Jason Cox to ~rjarry/aerc-discuss

On Tue Nov 5, 2024 at 1:19 PM EST, prowess-alarm-much wrote:
> but if it has a picture and text. Can the template after correctly
> determining that it has a muiltipart/mixed, that it really has no
> text, just attachments?

I'm not aware of a way to do this. I suppose you could just check
OriginalMIMEType, which would not be text/plain or text/html if you are
replying to a non-text part of the message.

Re: aerc templates / .OriginalHeader 28 days ago

From Jason Cox to ~rjarry/aerc-discuss

On Tue Nov 5, 2024 at 11:27 AM EST, prowess-alarm-much wrote:
> {{if eq .OriginalHeader "Content-Type" "multipart/mixed"}}

I think you may just need to add some parentheses here:

    {{if eq (.OriginalHeader "Content-Type") "multipart/mixed"}}

Re: notmuch + custom statusbar notifications + refresh after tag/label change + some minor issues a month ago

From Jason Cox to ~rjarry/aerc-discuss

On Thu Oct 31, 2024 at 12:55 PM EDT, prowess-alarm-much@duck.com wrote:
> Here is a screenshot of the error: https://imgur.com/a/Z73uHPY
> Could be interesting to understand what could be tripping the screen
> parser, but the same notmuch database is fed to alot (another MUA) and
> it will show these emails correctly.

These will likely need to be debugged by you or by sharing the full
message with someone who knows more about how the parsing works.

> I'm using a keybind which will :close<Enter>:open<Enter>, it is not
> ideal because if the message is filtered based on the underlying notmuch
> query, it will actually (try to) open the next available message. I
> dunno, I'm really looking for just a redraw/refresh. 
>

Re: notmuch + custom statusbar notifications + refresh after tag/label change + some minor issues a month ago

From Jason Cox to ~rjarry/aerc-discuss

On Thu Oct 31, 2024 at 12:27 PM EDT, prowess-alarm-much@duck.com wrote:
> Note: normally I'm using tmux in alacritty in WSL2 (Win11... ofc)
>
> I will do so, here are a couple screenshots. Note: blockiness due to
> privacy. The shots below serve to illustrate graphical issues and errors
> trying displaying message header info in the main aerc window (msglist).
>
> 1- Possible threaded mode view issue → https://imgur.com/a/hqWdBMP

Note sure about this. I typically see no subject beyond the first
message. You'd have to dig into the code to see what's going on here.

> 2- Whether using alacritty 0.14 or Windows Terminal (both Win11), aerc
> will be B&W if launched straight from the linux prompt, but will render

Re: Reply to self send mail a month ago

From Jason Cox to ~rjarry/aerc-discuss

On Mon Oct 28, 2024 at 5:53 PM EDT, Sertonix wrote:
> When I reply to a mail that I wrote myself to someone else I noticed that
> aerc adds my own mail to the To header.
>
> Additionally when using multiple aliases aerc uses my default mail for the
>>From header instead of the alias I write my previous mail with.
>
> Would it be possible to change that so aerc doesn't include my own mail
> in the To header and uses the alias in the From header?

Does setting reply-to-self = false in aerc.conf work for you? I'm not
sure about the alias behavior, but it should at least prevent including
yourself in the To header.

Re: notmuch + custom statusbar notifications + refresh after tag/label change + some minor issues a month ago

From Jason Cox to ~rjarry/aerc-discuss

On Tue Oct 29, 2024 at 1:24 PM EDT, prowess-alarm-much@duck.com wrote:
> OK, the issue remains with the latest version, I'm not sure if it is
> allowed to post here screenshots as imgur links

Yep, you can post screenshot links.

> I get an error with the :echo command, as per log:
> ERROR 2024/10/29 18:20:29.699919 status.go:133: Unknown command echo

The :echo command may only be in the latest master, not in v0.18.2.

Re: notmuch + custom statusbar notifications + refresh after tag/label change + some minor issues a month ago

From Jason Cox to ~rjarry/aerc-discuss

As Bence points out, you're on a rather old version of aerc and
therefore may have some bugs or missing features compared to the latest
version, but I know that some of your requests are possible -- see my
notes below.

On Tue Oct 29, 2024 at 6:25 AM EDT, Bence Ferdinandy wrote:
>> 1) Aerc will display on the msglist for very old email literally this
>> message: (unable to fetch header) ← and I'm not able to open it
>> I've checked if that could be a malformed email, but notmuch will
>> search/show/count correctly this email from the terminal.
>> I've also doublechecked with alot, and it too will display these old
>> emails correctly

Likely a message parsing error. This may have been fixed in later

Re: Trying to understand aerc's take on the notmuch database path a month ago

From Jason Cox to ~rjarry/aerc-devel

On Wed Oct 23, 2024 at 7:44 PM EDT, Ralph Seichter wrote:
> Before I dig deeper into an unfamiliar codebase: Does aerc delegate
> finding notmuch's database path fully to notmuch? handleConnect() in
> notmuch/worker.go references some w.db.Path(), but how is that path
> determined?

Looks like it. The path from the account source is passed to NewDB() in
worker/notmuch/lib/database.go, which in turn creates a notmuch database
using that path (via the notmuch C API bindings). The calls to
w.db.Path() just call the ResolvedPath() function which is a wrapper
around the notmuch_database_get_path() function from the C API.

> Aerc also expects a /some/path/.notmuch/xapian folder structure to
> exist. While "xapian" is likely unavoidable, why the ".notmuch" part? Is