~rjarry/aerc#156: 
Be able to move emails in between accounts

A feature which lets users move mail (using :mv: maybe with a parameter) to another Account's folder.

This should be rather easy to implement using code from the feature of mbox imports and exports.

And if also possible be able to configure a specific account for archives.

Status
RESOLVED IMPLEMENTED
Submitter
~julianmarcos
Assigned to
No-one
Submitted
1 year, 11 months ago
Updated
1 year, 1 month ago
Labels
feature

~mcepl 1 year, 6 months ago*

I think the biggest problem is not the implementation itself (really, how difficult it could be? <create-temporary-file/memory-space>,<export-message>,<switch-to-other-account>,<import-message>,<switch-back>,<delete-message>,<delete-temporary-file/memory-space>), but to agree on the user interface of such command (or rather on modifications of mv command).

I see two possible ways:

  1. mv grows new option -a meaning the target account, so while in the “FLOSS” account, I could run command mv -a Home Junk to move the message to the Junk folder in the Home account. Seems like the simplest solution of this problem, but seems quite hackish.

  2. Whole <target> from mv <target> needs to be redefined to include (optionally) the account name. E.g., something like mv #Home/Junk (instead of # use any other character which cannot be legitimately part of the account name). Probably more complicated, but seems like closer to The Right Thing™ to me. Of course, this would also mean that the account concept could be used with other commands (e.g., archive).

jmjl 1 year, 6 months ago · edit

On Mon Aug 28, 2023 at 1:42 PM CEST, ~mcepl wrote:

  1. mv grows new option -a meaning the target account, so while in the “FLOSS” account, I could run command mv -a Home Junk to move the message to the Junk folder in the Home account. Seems like the simplest solution of this problem, but seems quite hackish. I guess this would be the easiest.
  1. Whole <target> from mv <target> needs to be redefined to include (optionally) the account name. E.g., something like mv #Home/Junk (instead of # use any other character which cannot be legitimately part of the account name). Probably more complicated, but seems like closer to The Right Thing™ to me. Yeah, this would mean limiting the possible account name characters, which may or may not be a breaking change. But I guess you could escape the characters, but I guess we could see which characters couldn't be legitimely part of the folder name, because of that I think 1 would be simpler.

~julianmarcos 1 year, 6 months ago

Ops, it didn't stop quoting the data properly.

~julianmarcos 1 year, 6 months ago

On Mon Aug 28, 2023 at 1:42 PM CEST, ~mcepl wrote:

  1. mv grows new option -a meaning the target account, so while in the “FLOSS” account, I could run command mv -a Home Junk to move the message to the Junk folder in the Home account. Seems like the simplest solution of this problem, but seems quite hackish.

I guess this would be the easiest.

  1. Whole from mv needs to be redefined to include (optionally) the account name. E.g., something like mv #Home/Junk (instead of # use any other character which cannot be legitimately part of the account name). Probably more complicated, but seems like closer to The Right Thing™ to me.

Yeah, this would mean limiting the possible account name characters, which may or may not be a breaking change. But I guess you could escape the characters, but I guess we could see which characters couldn't be legitimely part of the folder name, because of that I think 1 would be simpler.

~mcepl 1 year, 6 months ago

On Mon Aug 28, 2023 at 2:16 PM CEST, ~julianmarcos wrote:

  1. mv grows new option -a meaning the target account, so while in the “FLOSS” account, I could run command mv -a Home Junk to move the message to the Junk folder in the Home account. Seems like the simplest solution of this problem, but seems quite hackish.

I guess this would be the easiest.

How does the completion work? Is it possible that in the moment -a NAMEOFACCOUNT is added on the command line, aerc would complete from the target account not from the current one?

Best,

#Matěj

https://matej.ceplovi.cz/blog/, @mcepl@floss.social GPG Finger: 3C76 A027 CA45 AD70 98B5 BC1D 7920 5802 880B C9D8

Find the dependencies -- and eliminate them. -- according to http://is.gd/oeYpcI the motto of the MS Excel team

~julianmarcos 1 year, 6 months ago

Correct, when you start typing :mv -a it'll list all accounts, and when you complete one of them or when you write the entire name, it would automatically start completing folder names for that account.

~mcepl 1 year, 1 month ago

This has been probably fixed, wasn’t it?

~rjarry REPORTED IMPLEMENTED 1 year, 1 month ago

That's correct.

~rjarry 1 year, 1 month ago

Johannes Thyssen Tishman referenced this ticket in commit 40c25caafd58

Johannes Thyssen Tishman referenced this ticket in commit e4eab644b0ee

Register here or Log in to comment, or comment via email.