From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gabriele Nicolardi Newsgroups: gmane.emacs.bugs Subject: bug#69573: Eager macro-expansion failure: (wrong-type-argument integer-or-marker-p nil) Date: Thu, 7 Mar 2024 17:26:37 +0100 Message-ID: References: <28a41cd9-3abe-47bf-b3d5-fed723dde32b@medialab.sissa.it> <875xy0qjzf.fsf@web.de> <812c2400-07b5-451a-89bc-4e9e4b60fb44@medialab.sissa.it> <87r0gmbvnc.fsf@web.de> <871q8mbn7e.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="------------mE3Q0ILfQFw0xPv25Lm0iak9" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27116"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: michael_heerdegen@web.de, 69573@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Mar 07 17:27:57 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1riGb7-0006my-GC for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 07 Mar 2024 17:27:57 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1riGaj-0002L1-IJ; Thu, 07 Mar 2024 11:27:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riGag-0002Jo-Nz for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 11:27:30 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1riGag-0000b2-G2 for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 11:27:30 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1riGbB-0005st-U2 for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 11:28:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gabriele Nicolardi Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 07 Mar 2024 16:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 69573 X-GNU-PR-Package: emacs X-Debbugs-Original-To: Michael Heerdegen , Michael Heerdegen via Bug reports for GNU "Emacs, " the Swiss army knife of text editors X-Debbugs-Original-Cc: 69573@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.170982884622553 (code B ref -1); Thu, 07 Mar 2024 16:28:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Mar 2024 16:27:26 +0000 Original-Received: from localhost ([127.0.0.1]:54780 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riGab-0005rc-Ev for submit@debbugs.gnu.org; Thu, 07 Mar 2024 11:27:25 -0500 Original-Received: from lists.gnu.org ([209.51.188.17]:51470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1riGaZ-0005rP-BB for submit@debbugs.gnu.org; Thu, 07 Mar 2024 11:27:24 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riGa3-000255-FW for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 11:26:51 -0500 Original-Received: from smtp04.cbsolt.net ([185.97.217.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1riGZy-0008S8-9x for bug-gnu-emacs@gnu.org; Thu, 07 Mar 2024 11:26:51 -0500 Original-Received: from [10.0.2.15] (host-79-16-242-199.retail.telecomitalia.it [79.16.242.199]) by smtp04.cbsolt.net (Postfix) with ESMTPSA id 4TrF7322wvz3wf6; Thu, 7 Mar 2024 17:26:39 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cbsolt.net; s=201504-di4k2w; t=1709828800; bh=yIFKCxjmIVUcLnmjvQqPky+QrcUOOjDKGHuNdG/xKtE=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=vKib1FFB9yDogBBMxkdNJEHkyHVRtS0UH2oNXDQt9ksHCuCuD6nlOuihA55JLO2Gd Ax4Ao/LNGP7KjhhXJElUBSDhuDxH8eJuC/dTgTAOzeXIdR/lf+V+sW/87RD6SzRI03 H5dV9xn7DfaFXzwa8i0D9QiOTJOycbYl1MphnzyY= Content-Language: en-US In-Reply-To: <871q8mbn7e.fsf@web.de> Received-SPF: pass client-ip=185.97.217.43; envelope-from=gabriele@medialab.sissa.it; helo=smtp04.cbsolt.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:281177 Archived-At: This is a multi-part message in MIME format. --------------mE3Q0ILfQFw0xPv25Lm0iak9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Il 07/03/24 06:55, Michael Heerdegen ha scritto: > Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife > of text editors" writes: > >> I can't find a commit "ac89b1141a26" in my repository, though. Where >> does your Emacs come from (is it maybe a modified version)? > Forget this question please. I can now reproduce with master, too. > > But: This is only reproducible when I build Emacs with native > compilation enabled. Then I get this backtrace with your recipe: > > | Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) > | forward-paragraph(1) > | fill-forward-paragraph(1) > | fill-region(11 528 left t) > | easy-mmode--mode-docstring("MWE mode" "Mwe mode" mwe-mode-map mwe-mode nil) > | #f(compiled-function (arg1 arg2 &rest rest) "Define a new minor mode MODE.... > | elisp--eval-last-sexp(nil) > > When I load the source of paragraphs.el (where `forward-paragraph' is > defined) the problem goes away. I confirm that evaluating paragraphs.el makes the problem go away. But why? I create a copy of the `re-search-forward` function because I DON'T want advice the original function: ;; The following breaks my minor-modes definitions (advice-add 're-search-forward-ifpmod :around #'make-search-sensitive-to-ifpmod-advice) Why `forward-paragraph` should be sensitive to a function `re-search-forward-ifpmod` that it doesn't call? Is my code wrong in some way? I mean that I think that (defalias 're-search-forward-ifpmod (symbol-function 're-search-forward) "Copy of `re-search-forward' function (to be) adviced to obey to `isearch-filter-predicate'") should create a COPY, not an ALIAS, of the `re-search-forward` function indipendent of the original function. Anyway, how can I force the loading of paragraphs.el? I don't se the "provide" feature and I need to share my code with my teammates. Gabriele Nicolardi > > Maybe Andrea can help? Just CC'd - I don't know how to continue here. > > Thx, > > Michael. --------------mE3Q0ILfQFw0xPv25Lm0iak9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit


Il 07/03/24 06:55, Michael Heerdegen ha scritto:
Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife
of text editors" <bug-gnu-emacs@gnu.org> writes:

I can't find a commit "ac89b1141a26" in my repository, though.  Where
does your Emacs come from (is it maybe a modified version)?
Forget this question please.  I can now reproduce with master, too.

But: This is only reproducible when I build Emacs with native
compilation enabled.  Then I get this backtrace with your recipe:

| Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil)
|   forward-paragraph(1)
|   fill-forward-paragraph(1)
|   fill-region(11 528 left t)
|   easy-mmode--mode-docstring("MWE mode" "Mwe mode" mwe-mode-map mwe-mode nil)
|   #f(compiled-function (arg1 arg2 &rest rest) "Define a new minor mode MODE....
|   elisp--eval-last-sexp(nil)

When I load the source of paragraphs.el (where `forward-paragraph' is
defined) the problem goes away.

I confirm that evaluating paragraphs.el makes the problem go away.

But why? I create a copy of the `re-search-forward` function because I DON'T want advice the original function:

;; The following breaks my minor-modes definitions (advice-add 're-search-forward-ifpmod :around #'make-search-sensitive-to-ifpmod-advice)

Why `forward-paragraph` should be sensitive to a function `re-search-forward-ifpmod` that it doesn't call?

Is my code wrong in some way?

I mean that I think that

(defalias 're-search-forward-ifpmod (symbol-function 're-search-forward) "Copy of `re-search-forward' function (to be) adviced to obey to `isearch-filter-predicate'")

should create a COPY, not an ALIAS, of the `re-search-forward` function indipendent of the original function.

Anyway, how can I force the loading of paragraphs.el? I don't se the "provide" feature and I need to share my code with my teammates.

Gabriele Nicolardi


Maybe Andrea can help?  Just CC'd - I don't know how to continue here.

Thx,

Michael.
--------------mE3Q0ILfQFw0xPv25Lm0iak9--