notmuch-emacs and Emacs26 (master)

classic Classic list List threaded Threaded
6 messages Options
aaermolov aaermolov
Reply | Threaded
Open this post in threaded view
|

notmuch-emacs and Emacs26 (master)

Hi,

in 23.7+ version of notmuch, when building notmuch emacs part against
Emacs master, the following error pops up:

In toplevel form:
emacs/notmuch.el:405:1:Error: Wrong type argument: listp, cl--function-convert

The same error reveals in all mentioned versions, ranging only in line
numbers.

Is there any way to work it around? Or fix it in some easy way?

regards,
Alex

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (497 bytes) Download Attachment
Thomas Hisch Thomas Hisch
Reply | Threaded
Open this post in threaded view
|

Re: notmuch-emacs and Emacs26 (master)

I fixed this by applying the following patch. TBH, I didn't check that everything is still working as expected, but the compilation succeeds.

---
 emacs/notmuch.el | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index d8d3afe..ab58fcb 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -411,13 +411,13 @@ the region between points BEG and END.  As a special case, if (=
 BEG END), FUNCTION will be applied to the result containing point
 BEG."
 
-  (lexical-let ((pos (notmuch-search-result-beginning beg))
- ;; End must be a marker in case function changes the
- ;; text.
- (end (copy-marker end))
- ;; Make sure we examine at least one result, even if
- ;; (= beg end).
- (first t))
+  (let ((pos (notmuch-search-result-beginning beg))
+ ;; End must be a marker in case function changes the
+ ;; text.
+ (end (copy-marker end))
+ ;; Make sure we examine at least one result, even if
+ ;; (= beg end).
+ (first t))
     ;; We have to be careful if the region extends beyond the results.
     ;; In this case, pos could be null or there could be no result at
     ;; pos.
-- 
2.9.3

On Thu, Apr 6, 2017 at 1:12 PM, <[hidden email]> wrote:
Hi,

in 23.7+ version of notmuch, when building notmuch emacs part against
Emacs master, the following error pops up:

In toplevel form:
emacs/notmuch.el:405:1:Error: Wrong type argument: listp, cl--function-convert

The same error reveals in all mentioned versions, ranging only in line
numbers.

Is there any way to work it around? Or fix it in some easy way?

regards,
Alex

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch



_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: notmuch-emacs and Emacs26 (master)

Thomas Hisch <[hidden email]> writes:

> I fixed this by applying the following patch. TBH, I didn't check that
> everything is still working as expected, but the compilation succeeds.
>
> ---
>  emacs/notmuch.el | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
> index d8d3afe..ab58fcb 100644
> --- a/emacs/notmuch.el
> +++ b/emacs/notmuch.el
> @@ -411,13 +411,13 @@ the region between points BEG and END.  As a special
> case, if (=
>  BEG END), FUNCTION will be applied to the result containing point
>  BEG."
>
> -  (lexical-let ((pos (notmuch-search-result-beginning beg))

> - (first t))
> +  (let ((pos (notmuch-search-result-beginning beg))

I'm pretty sure there's a reason Austin used lexical-let in the first
place, but maybe someone can convince me it isn't needed.

Since emacs 26 is not released yet, I guess you mean the master branch
of emacs? Since it currently doesn't compile, I can't really debug. Do
you have a precise revision that you have tested?

If you want to try to debug this you could try using git bisect (on
emacs) to figure out what commit broke things.

Another useful thing to know is whether emacs master can byte-compile
the minimal example attached. There will be warnings, but there should
not be any errors.

d



PS: I couldn't actually apply that patch. Maybe try git-format-patch and
use an attachment if using gmail.

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

test.el (1012 bytes) Download Attachment
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

[PATCH] emacs/notmuch.el: don't use 'function' as variable name.

In principle this should work, but at least in some pre-release
versions of emacs26, this causes problems inside lexical let [1].

[1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26406
---
 emacs/notmuch.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index d8d3afeb..40b9fabd 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -402,17 +402,17 @@ returns nil"
     (next-single-property-change (or pos (point)) 'notmuch-search-result
  nil (point-max))))
 
-(defun notmuch-search-foreach-result (beg end function)
-  "Invoke FUNCTION for each result between BEG and END.
+(defun notmuch-search-foreach-result (beg end fn)
+  "Invoke FN for each result between BEG and END.
 
-FUNCTION should take one argument.  It will be applied to the
+FN should take one argument.  It will be applied to the
 character position of the beginning of each result that overlaps
 the region between points BEG and END.  As a special case, if (=
-BEG END), FUNCTION will be applied to the result containing point
+BEG END), FN will be applied to the result containing point
 BEG."
 
   (lexical-let ((pos (notmuch-search-result-beginning beg))
- ;; End must be a marker in case function changes the
+ ;; End must be a marker in case fn changes the
  ;; text.
  (end (copy-marker end))
  ;; Make sure we examine at least one result, even if
@@ -423,7 +423,7 @@ BEG."
     ;; pos.
     (while (and pos (or (< pos end) first))
       (when (notmuch-search-get-result pos)
- (funcall function pos))
+ (funcall fn pos))
       (setq pos (notmuch-search-result-end pos)
     first nil))))
 ;; Unindent the function argument of notmuch-search-foreach-result so
--
2.11.0

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch
Steven Allen Steven Allen
Reply | Threaded
Open this post in threaded view
|

Re: notmuch-emacs and Emacs26 (master)

In reply to this post by aaermolov

This appears to have been fixed by commit
89898e43c7ceef28bb3c2116b4d8a3ec96d9c8da in Emacs master.

_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch

signature.asc (847 bytes) Download Attachment
David Bremner-2 David Bremner-2
Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] emacs/notmuch.el: don't use 'function' as variable name.

In reply to this post by David Bremner-2
David Bremner <[hidden email]> writes:

> In principle this should work, but at least in some pre-release
> versions of emacs26, this causes problems inside lexical let [1].
>
> [1]: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=26406

pushed to master (some time ago). In the meantime, also fixed upstream
for the next major release of emacs.

d
_______________________________________________
notmuch mailing list
[hidden email]
https://notmuchmail.org/mailman/listinfo/notmuch