Re: [S-mailx] w3m default in .mailcap for plain and html text, lynx still called

2023-02-25 Thread Steffen Nurpmeso
Χάρης Καραχριστιανίδης wrote in
 <20230225153045.x5sns%haris...@otenet.gr>:
 |Steffen Nurpmeso  wrote:
 ...
 |>|lynx is called form /etc/mailcap which is not overriden from ~/.mailcap..
 |> 
 |> Mailcap files are searched in $MAILCAPS order:
 |> 
 |>   ? varshow MAILCAPS
 |>   set MAILCAPS=~/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/ma\
 |>   ilcap
 |> 
 |> So your personal file should be matched first.  (You could
 |> override this if you need to.)
 |> 
 |>   ? mailcap
 ...
 |In /etc/mailcap I commented out
 |text/html; lynx -dump -assume_charset=%{charset} %s; copiousoutput; \
 |description=HTML Text; nametemplate=%s.html

 |and in ~/.maicap I added

 |text/html; w3m -H -T text/html %s; needsterminal; description=HTML \
 |Text; nametemplate=%s.html
 |text/html; w3m -H -dump -T text/html %s; copiousoutput; description=HTML \
 |Text; nametemplate=%s.html

 |and everything, icluding Greek works fine!

Nice.. but it sounds a bit odd to me because your ~/.mailcap comes
first so whatever is in /etc/mailcap should be inspected as
a second class citizen, and to be absolutely sure (just in case my
code inspection is borked) i have even tried it.


But hey!
In the meantime i had a conscious moment and fixed this terrible
bug in the mailcap %{NAME} format expansion!  With credits to you!

On master and the stable branches; the according test is on the
development branch only.  v14.10 will come with a much improved
test coverage, but that .. we yet had not.

No easy way out for you, except maybe doing someting like

  text/html;\
cs=%{charset}\;\
cs=${cs%*'charset}'}\;\
lynx -dump -assume_charset=$cs %s; copiousoutput

etc (not tried but in shell).

AARGH!!

Thanks and ciao!  Greetings to Greece!!

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Re: [S-mailx] w3m default in .mailcap for plain and html text, lynx still called

2023-02-25 Thread Χάρης Καραχριστιανίδης
Steffen Nurpmeso  wrote:

> Hello Hariskar.
> 
> (Just quick note, be back in a few hours..)
> 
> Χάρης Καραχριστιανίδης wrote in
>  <20230225132925.igpgb%haris...@otenet.gr>:
>  |Χάρης Καραχριστιανίδης  wrote:
>  |> lynx doesn't recognise Greek iso-8859-7 characters whatever options \
>  |> I tried (assume_charset, assume_local_charset, assume_unrec_charset) \
>  |> so I installed w3m (it shows Greek characters) and uninstalled lynx. \
>  |> I put in .mailcap:
> 
>  |> text/html; w3m -H %s; nametemplate=%s.html
>  |> text/plain; w3m -H %s
> 
>  |> Most of emails open in less but when I try to open some of them they \
>  |> don't open and this message appears:
> 
>  |> s-nail: Forking child with spawn control: /bin/bash -c $'lynx -dump \
>  |> -assume_charset=\'UTF-8\'charset} "${MAILX_FILENAME_TEMPORARY}"'
>  |> /bin/bash: line 1: lynx: command not found
>  |> 
>  |> I have no relevant setting in .mailrc. Why is lynx called? How can \
>  |> I make w3m be called for this (or how can I make lynx read Greek \
>  |> iso-8859-7 characters?)
> 
> Should show you the actually used cache.
> In general (as per manual section "HTML mail and MIME
> attachments") the lookup order is pipe-EXTENSION,
> pipe-TYPE/SUBTYPE, mailcaps, mimetype type-markers.
> Maybe you still have a pipe-text/html thing set?
> 
>  |lynx is called form /etc/mailcap which is not overriden from ~/.mailcap..
> 
> Mailcap files are searched in $MAILCAPS order:
> 
>   ? varshow MAILCAPS
>   set MAILCAPS=~/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
> 
> So your personal file should be matched first.  (You could
> override this if you need to.)
> 
>   ? mailcap
> 
>  --End of <20230225132925.igpgb%haris...@otenet.gr>
> 
> Ciao!
> 
> --steffen
> |
> |Der Kragenbaer,The moon bear,
> |der holt sich munter   he cheerfully and one by one
> |einen nach dem anderen runter  wa.ks himself off
> |(By Robert Gernhardt)



In /etc/mailcap I commented out
text/html; lynx -dump -assume_charset=%{charset} %s; copiousoutput; 
description=HTML Text; nametemplate=%s.html
and in ~/.maicap I added
text/html; w3m -H -T text/html %s; needsterminal; description=HTML Text; 
nametemplate=%s.html
text/html; w3m -H -dump -T text/html %s; copiousoutput; description=HTML Text; 
nametemplate=%s.html
and everything, icluding Greek works fine!

Thank you!
Haris


Re: [S-mailx] w3m default in .mailcap for plain and html text, lynx still called

2023-02-25 Thread Steffen Nurpmeso
Hello Hariskar.

(Just quick note, be back in a few hours..)

Χάρης Καραχριστιανίδης wrote in
 <20230225132925.igpgb%haris...@otenet.gr>:
 |Χάρης Καραχριστιανίδης  wrote:
 |> lynx doesn't recognise Greek iso-8859-7 characters whatever options \
 |> I tried (assume_charset, assume_local_charset, assume_unrec_charset) \
 |> so I installed w3m (it shows Greek characters) and uninstalled lynx. \
 |> I put in .mailcap:

 |> text/html; w3m -H %s; nametemplate=%s.html
 |> text/plain; w3m -H %s

 |> Most of emails open in less but when I try to open some of them they \
 |> don't open and this message appears:

 |> s-nail: Forking child with spawn control: /bin/bash -c $'lynx -dump \
 |> -assume_charset=\'UTF-8\'charset} "${MAILX_FILENAME_TEMPORARY}"'
 |> /bin/bash: line 1: lynx: command not found
 |> 
 |> I have no relevant setting in .mailrc. Why is lynx called? How can \
 |> I make w3m be called for this (or how can I make lynx read Greek \
 |> iso-8859-7 characters?)

Should show you the actually used cache.
In general (as per manual section "HTML mail and MIME
attachments") the lookup order is pipe-EXTENSION,
pipe-TYPE/SUBTYPE, mailcaps, mimetype type-markers.
Maybe you still have a pipe-text/html thing set?

 |lynx is called form /etc/mailcap which is not overriden from ~/.mailcap..

Mailcap files are searched in $MAILCAPS order:

  ? varshow MAILCAPS
  set MAILCAPS=~/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap

So your personal file should be matched first.  (You could
override this if you need to.)

  ? mailcap

 --End of <20230225132925.igpgb%haris...@otenet.gr>

Ciao!

--steffen
|
|Der Kragenbaer,The moon bear,
|der holt sich munter   he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)


Re: [S-mailx] w3m default in .mailcap for plain and html text, lynx still called

2023-02-25 Thread Χάρης Καραχριστιανίδης
Χάρης Καραχριστιανίδης  wrote:

> lynx doesn't recognise Greek iso-8859-7 characters whatever options I tried 
> (assume_charset, assume_local_charset, assume_unrec_charset) so I installed 
> w3m (it shows Greek characters) and uninstalled lynx. I put in .mailcap:
> text/html; w3m -H %s; nametemplate=%s.html
> text/plain; w3m -H %s
> Most of emails open in less but when I try to open some of them they don't 
> open and this message appears:
> s-nail: Forking child with spawn control: /bin/bash -c $'lynx -dump 
> -assume_charset=\'UTF-8\'charset} "${MAILX_FILENAME_TEMPORARY}"'
> /bin/bash: line 1: lynx: command not found
> 
> I have no relevant setting in .mailrc. Why is lynx called? How can I make w3m 
> be called for this (or how can I make lynx read Greek iso-8859-7 characters?)
> Thank you!
> Haris

lynx is called form /etc/mailcap which is not overriden from ~/.mailcap..


[S-mailx] w3m default in .mailcap for plain and html text, lynx still called

2023-02-25 Thread Χάρης Καραχριστιανίδης
lynx doesn't recognise Greek iso-8859-7 characters whatever options I tried 
(assume_charset, assume_local_charset, assume_unrec_charset) so I installed w3m 
(it shows Greek characters) and uninstalled lynx. I put in .mailcap:
text/html; w3m -H %s; nametemplate=%s.html
text/plain; w3m -H %s
Most of emails open in less but when I try to open some of them they don't open 
and this message appears:
s-nail: Forking child with spawn control: /bin/bash -c $'lynx -dump 
-assume_charset=\'UTF-8\'charset} "${MAILX_FILENAME_TEMPORARY}"'
/bin/bash: line 1: lynx: command not found

I have no relevant setting in .mailrc. Why is lynx called? How can I make w3m 
be called for this (or how can I make lynx read Greek iso-8859-7 characters?)
Thank you!
Haris