Github messages for mblaze
 help / color / mirror / Atom feed
* [ISSUE] Deleting mseq selections
@ 2020-08-13 11:19 jeremybobbin
  2020-08-13 13:50 ` leahneukirchen
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: jeremybobbin @ 2020-08-13 11:19 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1048 bytes --]

New issue by jeremybobbin on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182

Description:
Say I delete the selected thread from my inbox:
```sh
mseq -r .= | grep "Inbox" | mflag -S | xargs rm
```

After doing this, the thread will remain in `$MAILSEQ`, so I need to either "re-index" my mail and their threads:

```sh
full_thread() {
	tmp="$(mktemp)"
	mdirs "$@" | xargs mlist | mthread | tee "$threads" | MAILSEQ="$tmp" mseq -S >/dev/null
	grep -nFf "$patterns" "$threads" | sed 's/:.*/=/' | MAILSEQ="$tmp" xargs -n1 mseq | awk '!x[$0]++'
}

mlist -s ~/.mail/*/Inbox | full_thread ~/.mail/ | mseq -S && mseq -C $
```

Or, I'd need to remove the selection from `$MAILSEQ`:

```sh
thread=$(mktemp)
old=$(mktemp)
mseq .= > "$thread" 
cp "${MBLAZE:-$HOME/.mblaze}/seq" "$old"
grep -vFf "$thread" "$old" | mseq -S  
```

I was curious as to whether you had any ideas on how do any of these things more effectively,
as well as your thoughts on an "invert matches" option like `grep`'s `-v`.

Thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
@ 2020-08-13 13:50 ` leahneukirchen
  2020-08-13 16:55 ` Anachron
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2020-08-13 13:50 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 235 bytes --]

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673490894

Comment:
I use a script `mfix`:

```
#!/bin/sh
# mfix - fix current sequence

mseq -f | mseq -S
```

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
  2020-08-13 13:50 ` leahneukirchen
@ 2020-08-13 16:55 ` Anachron
  2020-08-13 16:55 ` Anachron
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Anachron @ 2020-08-13 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New comment by Anachron on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673591063

Comment:
Afaik this is also documentes somewhere in the mblaze docs. I do something similiar whenever I sync mails.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
  2020-08-13 13:50 ` leahneukirchen
  2020-08-13 16:55 ` Anachron
@ 2020-08-13 16:55 ` Anachron
  2020-08-13 17:08 ` Anachron
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Anachron @ 2020-08-13 16:55 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 238 bytes --]

New comment by Anachron on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673591063

Comment:
Afaik this is also documented somewhere in the mblaze docs. I do something similiar whenever I sync mails.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (2 preceding siblings ...)
  2020-08-13 16:55 ` Anachron
@ 2020-08-13 17:08 ` Anachron
  2020-08-13 17:23 ` jeremybobbin
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: Anachron @ 2020-08-13 17:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 329 bytes --]

New comment by Anachron on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673591063

Comment:
Afaik this is also documented somewhere in the mblaze docs. I do something similiar whenever I sync mails.

Edit: Interestingly its not in the manuals. Where did I see it? Or has it been deleted.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (3 preceding siblings ...)
  2020-08-13 17:08 ` Anachron
@ 2020-08-13 17:23 ` jeremybobbin
  2020-08-13 17:40 ` leahneukirchen
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jeremybobbin @ 2020-08-13 17:23 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1305 bytes --]

New comment by jeremybobbin on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673605560

Comment:
Hey thanks! Yeah I haven't found anything on it in the manuals.

The only issue with the solution that @leahneukirchen provided is that,
I want to keep my inbox as empty as possible, and archive emails that I consider "dealt with".

When I delete a thread(or a single reply to a thread) from my inbox, then do `mseq -f | mseq -S`,
only those ones are removed from the `mseq` list.

So this:

```
/home/jer/.mail/work/Sent Mail/cur/1597154230.1026742_15.Amphibian,U=979:2,S
 /home/jer/.mail/work/Archive/cur/1597154277.1026721_14.Amphibian,U=7089:2,RS
  /home/jer/.mail/work/Sent Mail/cur/1597154468.1028958_2.Amphibian,U=980:2,S
   /home/jer/.mail/work/Inbox/cur/1597155064.1031310_4.Amphibian,U=7093:2,S
```

Would turn into this:

```
/home/jer/.mail/work/Sent Mail/cur/1597154230.1026742_15.Amphibian,U=979:2,S
 /home/jer/.mail/work/Archive/cur/1597154277.1026721_14.Amphibian,U=7089:2,RS
  /home/jer/.mail/work/Sent Mail/cur/1597154468.1028958_2.Amphibian,U=980:2,S
```

When I'd prefer that the entire thread were gone.

Though I might just be trying get the `mblaze` suite to do something a `mairix` should be doing - what do you think?

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (4 preceding siblings ...)
  2020-08-13 17:23 ` jeremybobbin
@ 2020-08-13 17:40 ` leahneukirchen
  2020-08-13 19:33 ` jeremybobbin
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2020-08-13 17:40 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 228 bytes --]

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673613862

Comment:
I see, so a (fictional) `mseq -v .=` would be what you want? (Print all messages but `.=`)

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (5 preceding siblings ...)
  2020-08-13 17:40 ` leahneukirchen
@ 2020-08-13 19:33 ` jeremybobbin
  2020-08-13 20:08 ` leahneukirchen
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: jeremybobbin @ 2020-08-13 19:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 183 bytes --]

New comment by jeremybobbin on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673670323

Comment:
Actually, I think I'd prefer to see `mseq !.=`.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (6 preceding siblings ...)
  2020-08-13 19:33 ` jeremybobbin
@ 2020-08-13 20:08 ` leahneukirchen
  2020-08-14  0:56 ` jeremybobbin
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2020-08-13 20:08 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 173 bytes --]

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673685352

Comment:
But then `mseq !1 !2` doesn't work.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (7 preceding siblings ...)
  2020-08-13 20:08 ` leahneukirchen
@ 2020-08-14  0:56 ` jeremybobbin
  2020-08-14 13:44 ` leahneukirchen
  2020-08-15 13:04 ` [ISSUE] [CLOSED] " jeremybobbin
  10 siblings, 0 replies; 12+ messages in thread
From: jeremybobbin @ 2020-08-14  0:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

New comment by jeremybobbin on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-673780986

Comment:
Ah, good catch. A `-v` option would seem reasonable.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (8 preceding siblings ...)
  2020-08-14  0:56 ` jeremybobbin
@ 2020-08-14 13:44 ` leahneukirchen
  2020-08-15 13:04 ` [ISSUE] [CLOSED] " jeremybobbin
  10 siblings, 0 replies; 12+ messages in thread
From: leahneukirchen @ 2020-08-14 13:44 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 216 bytes --]

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182#issuecomment-674082303

Comment:
Unfortunately, this is not so easy to implement directly. :) Queueing as TODO.

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [ISSUE] [CLOSED] Deleting mseq selections
  2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
                   ` (9 preceding siblings ...)
  2020-08-14 13:44 ` leahneukirchen
@ 2020-08-15 13:04 ` jeremybobbin
  10 siblings, 0 replies; 12+ messages in thread
From: jeremybobbin @ 2020-08-15 13:04 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 1051 bytes --]

Closed issue by jeremybobbin on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/182

Description:
Say I delete the selected thread from my inbox:
```sh
mseq -r .= | grep "Inbox" | mflag -S | xargs rm
```

After doing this, the thread will remain in `$MAILSEQ`, so I need to either "re-index" my mail and their threads:

```sh
full_thread() {
	tmp="$(mktemp)"
	mdirs "$@" | xargs mlist | mthread | tee "$threads" | MAILSEQ="$tmp" mseq -S >/dev/null
	grep -nFf "$patterns" "$threads" | sed 's/:.*/=/' | MAILSEQ="$tmp" xargs -n1 mseq | awk '!x[$0]++'
}

mlist -s ~/.mail/*/Inbox | full_thread ~/.mail/ | mseq -S && mseq -C $
```

Or, I'd need to remove the selection from `$MAILSEQ`:

```sh
thread=$(mktemp)
old=$(mktemp)
mseq .= > "$thread" 
cp "${MBLAZE:-$HOME/.mblaze}/seq" "$old"
grep -vFf "$thread" "$old" | mseq -S  
```

I was curious as to whether you had any ideas on how do any of these things more effectively,
as well as your thoughts on an "invert matches" option like `grep`'s `-v`.

Thanks

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-08-15 13:04 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-13 11:19 [ISSUE] Deleting mseq selections jeremybobbin
2020-08-13 13:50 ` leahneukirchen
2020-08-13 16:55 ` Anachron
2020-08-13 16:55 ` Anachron
2020-08-13 17:08 ` Anachron
2020-08-13 17:23 ` jeremybobbin
2020-08-13 17:40 ` leahneukirchen
2020-08-13 19:33 ` jeremybobbin
2020-08-13 20:08 ` leahneukirchen
2020-08-14  0:56 ` jeremybobbin
2020-08-14 13:44 ` leahneukirchen
2020-08-15 13:04 ` [ISSUE] [CLOSED] " jeremybobbin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).