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
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ 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] 10+ 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
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ 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] 10+ 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
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ 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] 10+ 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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ 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] 10+ 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
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ 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] 10+ 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
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ 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] 10+ 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
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ 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] 10+ 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
  2020-10-15 15:13 ` [ISSUE] [CLOSED] " leahneukirchen
  8 siblings, 0 replies; 10+ 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] 10+ 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
  8 siblings, 0 replies; 10+ 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] 10+ 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
  8 siblings, 0 replies; 10+ 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] 10+ messages in thread

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

Thread overview: 10+ 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

Github messages for mblaze

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/mblaze-github

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 mblaze-github mblaze-github/ http://inbox.vuxu.org/mblaze-github \
		mblaze-github@inbox.vuxu.org
	public-inbox-index mblaze-github

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.mblaze


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git