Re: question: how to change file extension generated by (notmuch-show-view-part)

2020-11-23 Thread Wenlong Dai
I created ~/.mailcap and put the following line in it:
text/html; links2 -g %s; test=test -n "$DISPLAY"

I did not change my configuration and now I cannot reproduce the behaviour
however I try.

On Mon, 23 Nov 2020 at 22:29, Tomi Ollila  wrote:

> On Mon, Nov 23 2020, Wenlong Dai wrote:
>
> > I've been trying to use links2 to view html part of messages.
> > The problem I'm encountering is that, the part would be saved as
> > /tmp/xxx/xxx.shtml and
> > passed on to links2, and it seems links2 doesn't recognise the .shtml
> > extension.
> >
> > netsurf works well with .shtml though.
> >
> > But being stubborn as I am, I would like to know if I can make notmuch
> > output .html file instead?
> > I did a bit of research on shtml, seems it's completely unnecessary in
> this
> > case? why would notmuch choose this extension anyway?
>
> I could not find any reference to .shtml in notmuch emacs mua sources
> ... nor could I find such in the "message" sources
> (zgrep ... in /usr/share/emacs/{version}/lisp/gnus/*.gz)
> notmuch emacs mua is using doing many of the things.
>
> How did you configure emacs to use links2/netsurf to view html parts ?
>
> (/usr/share/emacs/{version}/lisp/gnus/mm-view.elc.gz defines these
> to be known and how those are executed:
>
> --8<8<8<8<8<8<8<8<8<8<--
> (defvar mm-text-html-renderer-alist
>   '((shr . mm-shr)
> (w3m . mm-inline-text-html-render-with-w3m)
> (w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
> (gnus-w3m . gnus-article-html)
> (links mm-inline-render-with-file
>mm-links-remove-leading-blank
>"links" "-dump" file)
> (lynx mm-inline-render-with-stdin nil
>   "lynx" "-dump" "-force_html" "-stdin" "-nolist")
> (html2text mm-inline-render-with-function html2text))
>   "The attributes of renderer types for text/html.")
> -->8>8>8>8>8>8>8>8>8>8--
>
> Tomi
>


-- 
Kind Regards,
Wenlong Dai
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: question: how to change file extension generated by (notmuch-show-view-part)

2020-11-23 Thread Tomi Ollila
On Mon, Nov 23 2020, Wenlong Dai wrote:

> I've been trying to use links2 to view html part of messages.
> The problem I'm encountering is that, the part would be saved as
> /tmp/xxx/xxx.shtml and
> passed on to links2, and it seems links2 doesn't recognise the .shtml
> extension.
>
> netsurf works well with .shtml though.
>
> But being stubborn as I am, I would like to know if I can make notmuch
> output .html file instead?
> I did a bit of research on shtml, seems it's completely unnecessary in this
> case? why would notmuch choose this extension anyway?

I could not find any reference to .shtml in notmuch emacs mua sources
... nor could I find such in the "message" sources
(zgrep ... in /usr/share/emacs/{version}/lisp/gnus/*.gz)
notmuch emacs mua is using doing many of the things.

How did you configure emacs to use links2/netsurf to view html parts ?

(/usr/share/emacs/{version}/lisp/gnus/mm-view.elc.gz defines these
to be known and how those are executed:

--8<8<8<8<8<8<8<8<8<8<--
(defvar mm-text-html-renderer-alist
  '((shr . mm-shr)
(w3m . mm-inline-text-html-render-with-w3m)
(w3m-standalone . mm-inline-text-html-render-with-w3m-standalone)
(gnus-w3m . gnus-article-html)
(links mm-inline-render-with-file
   mm-links-remove-leading-blank
   "links" "-dump" file)
(lynx mm-inline-render-with-stdin nil
  "lynx" "-dump" "-force_html" "-stdin" "-nolist")
(html2text mm-inline-render-with-function html2text))
  "The attributes of renderer types for text/html.")
-->8>8>8>8>8>8>8>8>8>8--

Tomi
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: question: how to change file extension generated by (notmuch-show-view-part)

2020-11-23 Thread Wenlong Dai
Thank you very much for your email.
I just tried this again but could not reproduce it either.
I guess it just happened to a very particular message in my inbox.
I was probably quite unlucky that my first try was on such a
peculiar message.
Now I couldn't remember what message I was looking at and I cannot find it
anymore.
I'll report back if I see the problem again.

On Mon, 23 Nov 2020 at 21:43, David Bremner  wrote:

> Wenlong Dai  writes:
>
> > I've been trying to use links2 to view html part of messages.
> > The problem I'm encountering is that, the part would be saved as
> > /tmp/xxx/xxx.shtml and
> > passed on to links2, and it seems links2 doesn't recognise the .shtml
> > extension.
> >
>
> I could not duplicate this with the message you sent to the list. Does
> it happen with all html parts for you, or just some? If the latter, can
> you share an example message?
>
> I suspect emacs is taking taking the file name from the message, but I
> don't know for sure.
>
>

-- 
Kind Regards,
Wenlong Dai
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: question: how to change file extension generated by (notmuch-show-view-part)

2020-11-23 Thread David Bremner
Wenlong Dai  writes:

> I've been trying to use links2 to view html part of messages.
> The problem I'm encountering is that, the part would be saved as
> /tmp/xxx/xxx.shtml and
> passed on to links2, and it seems links2 doesn't recognise the .shtml
> extension.
>

I could not duplicate this with the message you sent to the list. Does
it happen with all html parts for you, or just some? If the latter, can
you share an example message?

I suspect emacs is taking taking the file name from the message, but I
don't know for sure.
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


notmuch2 (python cffi bindings) segfault gdb logs

2020-11-23 Thread Patrick Totzke
Hi!

I've been complaining about the new (and old) python bindings causing the 
python interpreter to segfault occasionally. So far I was not able to reproduce 
this reliably nor provide error traces. This has just changed:
see below and attached for what I got from gdb.

I hope that whoever is in charge of the bindings can make sense of it. I don't 
have any experience so far with cffi nor gdb and have a hard time debugging 
this. The logs below are my attempt to collect as much detail as possible 
about. Please let me know if I missed something.

Cheers!
P



--

(gdb) bt

... see attachment bt 

--

Some context?

(gdb) up
#1  0x77c36537 in __GI_abort () at abort.c:79
79  abort.c: No such file or directory.

(gdb) up
#2  0x766b5551 in ?? () from /usr/lib/x86_64-linux-gnu/libtalloc.so.2

(gdb) up
#3  0x766c7a6b in _cffi_f_notmuch_thread_destroy (self=, 
arg0=) at build/temp.linux-x86_64-3.8/notmuch2._capi.c:4826
4826build/temp.linux-x86_64-3.8/notmuch2._capi.c: No such file or directory.

(gdb) up
#4  0x00519b0b in cfunction_vectorcall_O (
func=, args=, nargsf=, 
kwnames=)
at ../Objects/methodobject.c:482
482 ../Objects/methodobject.c: No such file or directory.

(gdb) up
#5  0x0050a557 in _PyObject_Vectorcall (kwnames=0x0, nargsf=, 
args=0x74aa4ec0, 
callable=) at ../Include/cpython/abstract.h:127
127 ../Include/cpython/abstract.h: No such file or directory.

(gdb) up
#6  call_function (kwnames=0x0, oparg=, pp_stack=, 
tstate=0x9241a0) at ../Python/ceval.c:4963
4963../Python/ceval.c: No such file or directory.

(gdb) up
#7  _PyEval_EvalFrameDefault (f=, throwflag=)
at ../Python/ceval.c:3469
3469in ../Python/ceval.c

(gdb) up
#8  0x0051ad20 in PyEval_EvalFrameEx (throwflag=0, 
f=Frame 0x74aa4d40, for file 
/home/pazz/.local/lib/python3.8/site-packages/notmuch2/_thread.py, line 38, in 
_destroy (self=, __module__='notmuch2._database', __doc__='An 
enumeration.', _member_names_=['READ_ONLY', 'READ_WRITE'], 
_member_map_={'READ_ONLY': <...>, 'READ_WRITE': ) at remote 0x75480a30>}, 
_member_type_=, _value2member_map_={0: <...>, 1: 
<...>}, READ_ONLY=<...>, READ_WRITE=<...>, __new__=) at remote 0xd59c20>) at remote 0x76380760>, 
_memptr__db_p_d5c090=<_cffi_backend.CData at remote 0x74afd930>, 
closed=False) at remote 0x74afd5b0>, _parent=, 
_memptr__query_p_d591c0=<_cffi_backend.CData at remote 0x74afdae0>) at 
remote 0x74afd9a0>, _memptr__iter_p_d4a9d0=<_cffi_backend.CData at 
rem...(truncated)) at ../Python/ceval.c:741
741 ../Python/ceval.c: No such file or directory.

(gdb) up
#9  function_code_fastcall (globals=, nargs=1, args=, 
co=) at ../Objects/call.c:283
283 ../Objects/call.c: No such file or directory.

(gdb) up
#10 _PyFunction_Vectorcall (func=, stack=, 
nargsf=, kwnames=) at ../Objects/call.c:410
410 in ../Objects/call.c

(gdb) up
#11 0x00505a6c in _PyObject_Vectorcall (kwnames=0x0, nargsf=, 
args=0x74aa4d18, callable=)
at ../Include/cpython/abstract.h:127
127 ../Include/cpython/abstract.h: No such file or directory.

(gdb) up
#12 call_function (kwnames=0x0, oparg=, pp_stack=, 
tstate=0x9241a0) at ../Python/ceval.c:4963
4963../Python/ceval.c: No such file or directory.

(gdb) up
#13 _PyEval_EvalFrameDefault (f=, throwflag=)
at ../Python/ceval.c:3486
3486in ../Python/ceval.c

(gdb) up
#14 0x0051ad20 in PyEval_EvalFrameEx (throwflag=0, 
f=Frame 0x74aa4ba0, for file 
/home/pazz/.local/lib/python3.8/site-packages/notmuch2/_thread.py, line 34, in 
__del__ (self=, __module__='notmuch2._database', __doc__='An 
enumeration.', _member_names_=['READ_ONLY', 'READ_WRITE'], 
_member_map_={'READ_ONLY': <...>, 'READ_WRITE': ) at remote 0x75480a30>}, 
_member_type_=, _value2member_map_={0: <...>, 1: 
<...>}, READ_ONLY=<...>, READ_WRITE=<...>, __new__=) at remote 0xd59c20>) at remote 0x76380760>, 
_memptr__db_p_d5c090=<_cffi_backend.CData at remote 0x74afd930>, 
closed=False) at remote 0x74afd5b0>, _parent=, 
_memptr__query_p_d591c0=<_cffi_backend.CData at remote 0x74afdae0>) at 
remote 0x74afd9a0>, _memptr__iter_p_d4a9d0=<_cffi_backend.CData at 
remo...(truncated)) at ../Python/ceval.c:741
741 ../Python/ceval.c: No such file or directory.


--
(gdb) frame
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50  in ../sysdeps/unix/sysv/linux/raise.c

--


(gdb) info-signals

... see attachment info-signals


--

(gdb) py-bt

... see attachment py-bt

--

(gdb) py-print
Unable to read information on python frame


--

(gdb) py-locals
Unable to read information on python frame


--

(gdb) info threads
  I