unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* notmuch-emacs and Emacs26 (master)
@ 2017-04-06 11:12 aaermolov
  2017-04-07  5:16 ` Thomas Hisch
  2017-04-21 17:23 ` notmuch-emacs and Emacs26 (master) Steven Allen
  0 siblings, 2 replies; 6+ messages in thread
From: aaermolov @ 2017-04-06 11:12 UTC (permalink / raw)
  To: notmuch

[-- Attachment #1: Type: text/plain, Size: 378 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: notmuch-emacs and Emacs26 (master)
  2017-04-06 11:12 notmuch-emacs and Emacs26 (master) aaermolov
@ 2017-04-07  5:16 ` Thomas Hisch
  2017-04-07 11:29   ` David Bremner
  2017-04-21 17:23 ` notmuch-emacs and Emacs26 (master) Steven Allen
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Hisch @ 2017-04-07  5:16 UTC (permalink / raw)
  To: aaermolov; +Cc: notmuch

[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]

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, <aaermolov@gmail.com> 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
> notmuch@notmuchmail.org
> https://notmuchmail.org/mailman/listinfo/notmuch
>
>

[-- Attachment #2: Type: text/html, Size: 3788 bytes --]

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: notmuch-emacs and Emacs26 (master)
  2017-04-07  5:16 ` Thomas Hisch
@ 2017-04-07 11:29   ` David Bremner
  2017-04-08 17:03     ` [PATCH] emacs/notmuch.el: don't use 'function' as variable name David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2017-04-07 11:29 UTC (permalink / raw)
  To: Thomas Hisch, aaermolov; +Cc: notmuch, Austin Clements

[-- Attachment #1: Type: text/plain, Size: 1330 bytes --]

Thomas Hisch <t.hisch@gmail.com> 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


[-- Attachment #2: test.el --]
[-- Type: application/emacs-lisp, Size: 1008 bytes --]

[-- Attachment #3: Type: text/plain, Size: 108 bytes --]


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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] emacs/notmuch.el: don't use 'function' as variable name.
  2017-04-07 11:29   ` David Bremner
@ 2017-04-08 17:03     ` David Bremner
  2017-05-07 11:56       ` David Bremner
  0 siblings, 1 reply; 6+ messages in thread
From: David Bremner @ 2017-04-08 17:03 UTC (permalink / raw)
  To: David Bremner, Thomas Hisch, aaermolov; +Cc: notmuch, Austin Clements

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

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: notmuch-emacs and Emacs26 (master)
  2017-04-06 11:12 notmuch-emacs and Emacs26 (master) aaermolov
  2017-04-07  5:16 ` Thomas Hisch
@ 2017-04-21 17:23 ` Steven Allen
  1 sibling, 0 replies; 6+ messages in thread
From: Steven Allen @ 2017-04-21 17:23 UTC (permalink / raw)
  To: aaermolov, notmuch

[-- Attachment #1: Type: text/plain, Size: 101 bytes --]


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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] emacs/notmuch.el: don't use 'function' as variable name.
  2017-04-08 17:03     ` [PATCH] emacs/notmuch.el: don't use 'function' as variable name David Bremner
@ 2017-05-07 11:56       ` David Bremner
  0 siblings, 0 replies; 6+ messages in thread
From: David Bremner @ 2017-05-07 11:56 UTC (permalink / raw)
  To: Thomas Hisch, aaermolov; +Cc: notmuch, Austin Clements, notmuch

David Bremner <david@tethera.net> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-05-07 11:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-06 11:12 notmuch-emacs and Emacs26 (master) aaermolov
2017-04-07  5:16 ` Thomas Hisch
2017-04-07 11:29   ` David Bremner
2017-04-08 17:03     ` [PATCH] emacs/notmuch.el: don't use 'function' as variable name David Bremner
2017-05-07 11:56       ` David Bremner
2017-04-21 17:23 ` notmuch-emacs and Emacs26 (master) Steven Allen

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).