Re: show a single message in a huge thread

2021-06-01 Thread David Bremner
Alan Schmitt  writes:

> Hello,
>
> On 2021-05-28 16:16, Alan Schmitt  writes:
>
>> Thank you for the suggestion. Here is what I did:
>> - run the search
>> - execute notmuch-tree-from-search-current-query
>> - hit RET on a message deep in the thread
>> - I get this error
>>
>> Debugger entered--Lisp error: (error "Lisp nesting exceeds 
>> ‘max-lisp-eval-depth’")
>
> Is this a bug of notmuch-emacs? Is there a way to display a single
> message independently of its context?
>

I'm not sure what the best UI is, but here is a start:

(defun notmuch-show-single-message (query)
  (interactive "sQuery: ")
  (message query)
  (let ((notmuch-show-indent-messages-width 0)
(notmuch-show-only-matching-messages t))
(notmuch-show query)))
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


Re: show a single message in a huge thread

2021-06-01 Thread Jameson Graef Rollins
On Tue, Jun 01 2021, David Bremner  wrote:
> Alan Schmitt  writes:
>
>> Hello,
>>
>> On 2021-05-28 16:16, Alan Schmitt  writes:
>>
>>> Thank you for the suggestion. Here is what I did:
>>> - run the search
>>> - execute notmuch-tree-from-search-current-query
>>> - hit RET on a message deep in the thread
>>> - I get this error
>>>
>>> Debugger entered--Lisp error: (error "Lisp nesting exceeds 
>>> ‘max-lisp-eval-depth’")
>>
>> Is this a bug of notmuch-emacs? Is there a way to display a single
>> message independently of its context?
>>
>
> I'm not sure what the best UI is, but here is a start:
>
> (defun notmuch-show-single-message (query)
>   (interactive "sQuery: ")
>   (message query)
>   (let ((notmuch-show-indent-messages-width 0)
> (notmuch-show-only-matching-messages t))
> (notmuch-show query)))

It used to be that if a search returned only a single message that
message would just be displayed directly, by passing the thread view.
I'm not sure when/why that changed.

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


Re: show a single message in a huge thread

2021-06-01 Thread Alan Schmitt
Hello,

On 2021-06-01 15:33, David Bremner  writes:

>> Is this a bug of notmuch-emacs? Is there a way to display a single
>> message independently of its context?
>>
>
> I'm not sure what the best UI is, but here is a start:
>
> (defun notmuch-show-single-message (query)
>   (interactive "sQuery: ")
>   (message query)
>   (let ((notmuch-show-indent-messages-width 0)
> (notmuch-show-only-matching-messages t))
> (notmuch-show query)))

Thank you for the suggestion, unfortunately I get a very similar error.
I found the id of the message I want, and when I run this function, I
get this backtrace.

Debugger entered--Lisp error: (error "Lisp nesting exceeds 
‘max-lisp-eval-depth’")
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...))) (nil ((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...)) (nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...)) (nil (...))) 195)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...) (nil ...))) 194)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 194)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil ...))) 193)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (...
  notmuch-show-insert-thread(((nil ((nil ((nil (...))) 193)

  …many line elided…

  notmuch-show-insert-tree((nil ((nil ((nil nil) (nil ((nil ...) (nil 
nil))) 1)
  #f(compiled-function (tree) #)((nil ((nil ((nil nil) 
(nil ((nil ...) (nil nil
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil nil) (nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil nil) (nil (... ...))) 1)
  notmuch-show-insert-tree((nil ((nil ((nil ((nil nil) (nil ...))) 0)
  #f(compiled-function (tree) #)((nil ((nil ((nil 
((nil nil) (nil ...
  mapc(#f(compiled-function (tree) #) ((nil ((nil 
((nil (... ...
  notmuch-show-insert-thread(((nil ((nil ((nil (... ...))) 0)
  #f(compiled-function (thread) #)(((nil ((nil ((nil 
(... ...
  mapc(#f(compiled-function (thread) #) (((nil ((nil 
((nil ...
  notmuch-show-insert-forestnil ((nil ((nil ...
  notmuch-show--build-buffer()
  notmuch-show("id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  (let ((notmuch-show-indent-messages-width 0) 
(notmuch-show-only-matching-messages t)) (notmuch-show query))
  notmuch-show-single-message("id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  funcall-interactively(notmuch-show-single-message 
"id:mr.mcs31ym4nf_.pqmximnh...@petitepomme.net")
  call-interactively(notmuch-show-single-message record nil)
  command-execute(notmuch-show-single-message record)

This seems to be the same problem as when hitting RET on a tree-view
buffer. Some huge forest is built, instead of showing the single
message. (Or maybe the forest is built before deciding to show only the
message, but there is a stack overflow before that.)

Best,

Alan


signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org