Github messages for mblaze
 help / color / mirror / Atom feed
* [ISSUE] Anyway to handle "mailto:" from inside mblaze ?
@ 2020-10-15  9:43 Eluminae
  2020-10-15 10:09 ` leahneukirchen
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Eluminae @ 2020-10-15  9:43 UTC (permalink / raw)
  To: ml

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

New issue by Eluminae on mblaze repository

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

Description:
Hello there,

I'd like to use mcom to handle the mailto: protocol from my personal xdg-open.

How should I do that ? Does mblaze can handle it directly ?

Thanks a lot !

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
@ 2020-10-15 10:09 ` leahneukirchen
  2020-10-15 11:59 ` Eluminae
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2020-10-15 10:09 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709076931

Comment:
Very rough idea:

```
#!/bin/sh

mailto=$1
mailto="mailto:${mailto#mailto:}"
xterm -e mcom "$1"
```

Needs better parsing for subject etc. I would add something like this to contrib.

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
  2020-10-15 10:09 ` leahneukirchen
@ 2020-10-15 11:59 ` Eluminae
  2020-10-15 12:01 ` Eluminae
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Eluminae @ 2020-10-15 11:59 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709242156

Comment:
I use something very similar but I do not handle bcc, subject, in-reply-to, and others. I dunno if mcom can take additional arguments for those and I'd prefer mblaze to handle it internaly.

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
  2020-10-15 10:09 ` leahneukirchen
  2020-10-15 11:59 ` Eluminae
@ 2020-10-15 12:01 ` Eluminae
  2020-10-15 12:32 ` leahneukirchen
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Eluminae @ 2020-10-15 12:01 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709242156

Comment:
I use something very similar but I do not handle bcc, subject, in-reply-to, and others. I dunno if mcom can take additional arguments for those and I'd prefer mblaze to handle it internaly.

ps: here a typical complex mailto that I would need a solution "mailto:~mil/sxmo-devel@lists.sr.ht?cc=Eddie%20Barraco%20%3Ccontact%40eddiebarraco.fr%3E&in-reply-to=%3C22DDDZGB7TN5A.3QNVU0UJ98DBD%40eddiebarraco.fr%3E&subject=Re%3A%20Current%20status%20of%20telephony%3F"

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (2 preceding siblings ...)
  2020-10-15 12:01 ` Eluminae
@ 2020-10-15 12:32 ` leahneukirchen
  2020-10-15 13:35 ` leahneukirchen
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2020-10-15 12:32 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709285302

Comment:
Yes, `-cc ... -reply-to ...` etc.

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (3 preceding siblings ...)
  2020-10-15 12:32 ` leahneukirchen
@ 2020-10-15 13:35 ` leahneukirchen
  2020-10-15 13:45 ` Eluminae
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2020-10-15 13:35 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709328953

Comment:
Another try:

```
IFS='
'

mcom $(
awk -v url="$1" '

function decode(s) {
  hexdigits = "0123456789abcdef"
  for (i = 1; i < length(s); i++) {
    if (substr(s, i, 3) ~ /%[0-9a-fA-F][0-9a-fA-F]/) {
      c = sprintf("%c", (index(hexdigits, tolower(substr(s, i+1, 1)))-1) * 16 + \
                         index(hexdigits, tolower(substr(s, i+2, 1)))-1)
      s = substr(s, 1, i-1) c substr(s, i+3)
      i += 2
    }
  }
  return s
}

BEGIN {
  url = decode(url)
  sub(/^mailto:/, "", url)
  split(url, parts, "?")
  to = parts[1]
  split(parts[2], fields, "&") 
  args[1] = to
  for (i in fields) {
    split(fields[i], kv, "=")
    if (kv[1] != "r") {
      args[length(args)+1] = "-" kv[1]
      args[length(args)+1] =  kv[2]
    }
  }
  for (i in args) {
    print decode(args[i])
  }
}
'
)
```

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (4 preceding siblings ...)
  2020-10-15 13:35 ` leahneukirchen
@ 2020-10-15 13:45 ` Eluminae
  2020-10-15 13:46 ` Eluminae
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Eluminae @ 2020-10-15 13:45 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709335404

Comment:
wow amazing, that rocks !

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (5 preceding siblings ...)
  2020-10-15 13:45 ` Eluminae
@ 2020-10-15 13:46 ` Eluminae
  2020-10-15 14:04 ` leahneukirchen
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: Eluminae @ 2020-10-15 13:46 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709335404

Comment:
wow amazing, that rocks !

ps: So I just wrote a mmailto to wrap this awk script and that do the job perfectly.

Thanks a lot !

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (6 preceding siblings ...)
  2020-10-15 13:46 ` Eluminae
@ 2020-10-15 14:04 ` leahneukirchen
  2020-10-15 15:13 ` [ISSUE] [CLOSED] " leahneukirchen
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2020-10-15 14:04 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-709348025

Comment:
ok, then i'll wrap it up and add it.

I'm not sure why urldecoding twice is needed, but oh well.

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

* Re: [ISSUE] [CLOSED] Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (7 preceding siblings ...)
  2020-10-15 14:04 ` leahneukirchen
@ 2020-10-15 15:13 ` leahneukirchen
  2021-03-21 21:01 ` Eluminae
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2020-10-15 15:13 UTC (permalink / raw)
  To: ml

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

Closed issue by Eluminae on mblaze repository

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

Description:
Hello there,

I'd like to use mcom to handle the mailto: protocol from my personal xdg-open.

How should I do that ? Does mblaze can handle it directly ?

Thanks a lot !

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (8 preceding siblings ...)
  2020-10-15 15:13 ` [ISSUE] [CLOSED] " leahneukirchen
@ 2021-03-21 21:01 ` Eluminae
  2021-04-07 13:35 ` leahneukirchen
  2021-04-07 14:54 ` Eluminae
  11 siblings, 0 replies; 13+ messages in thread
From: Eluminae @ 2021-03-21 21:01 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-803659290

Comment:
I pretty much think something is now broken while it worked in the first place.

We now got one line per subject word:

```
$ mmailto "mailto:contact@foobar.com?subject=toto%20titi" 
To: contact@foobar.com
Cc:
Bcc:
Subject: toto
Subject: titi
From: Toto Titi <toto@titi.com>
Message-Id: <3N9CFLPTCRUVZ.3861YVA3MMQR4@tototiti.net>
User-Agent: mblaze/1.1
```

But the mmailto seems to do its job. Something changed in how mcom handle arguments in the recent release ?

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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (9 preceding siblings ...)
  2021-03-21 21:01 ` Eluminae
@ 2021-04-07 13:35 ` leahneukirchen
  2021-04-07 14:54 ` Eluminae
  11 siblings, 0 replies; 13+ messages in thread
From: leahneukirchen @ 2021-04-07 13:35 UTC (permalink / raw)
  To: ml

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

New comment by leahneukirchen on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-814919819

Comment:
Can't reproduce, it calls here as follows:

`5772 urxvt -e mcom contact@foobar.com -subject 'toto titi'`


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

* Re: Anyway to handle "mailto:" from inside mblaze ?
  2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
                   ` (10 preceding siblings ...)
  2021-04-07 13:35 ` leahneukirchen
@ 2021-04-07 14:54 ` Eluminae
  11 siblings, 0 replies; 13+ messages in thread
From: Eluminae @ 2021-04-07 14:54 UTC (permalink / raw)
  To: ml

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

New comment by Eluminae on mblaze repository

https://github.com/leahneukirchen/mblaze/issues/189#issuecomment-814981947

Comment:
Okay got it ! My mmailto was missing the IFS setup. It now works, ty :D


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

end of thread, other threads:[~2021-04-07 14:54 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-15  9:43 [ISSUE] Anyway to handle "mailto:" from inside mblaze ? Eluminae
2020-10-15 10:09 ` leahneukirchen
2020-10-15 11:59 ` Eluminae
2020-10-15 12:01 ` Eluminae
2020-10-15 12:32 ` leahneukirchen
2020-10-15 13:35 ` leahneukirchen
2020-10-15 13:45 ` Eluminae
2020-10-15 13:46 ` Eluminae
2020-10-15 14:04 ` leahneukirchen
2020-10-15 15:13 ` [ISSUE] [CLOSED] " leahneukirchen
2021-03-21 21:01 ` Eluminae
2021-04-07 13:35 ` leahneukirchen
2021-04-07 14:54 ` Eluminae

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).