GNU bug report logs - #70348
[PATCH] Make preview placement more flexible

Previous Next

Package: auctex;

Reported by: Paul Nelson <ultrono <at> gmail.com>

Date: Fri, 12 Apr 2024 07:19:03 UTC

Severity: normal

Tags: patch

Done: Arash Esbati <arash <at> gnu.org>

To reply to this bug, email your comments to 70348 AT debbugs.gnu.org.
There is no need to reopen the bug first.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Fri, 12 Apr 2024 07:19:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Paul Nelson <ultrono <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-auctex <at> gnu.org. (Fri, 12 Apr 2024 07:19:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Paul Nelson <ultrono <at> gmail.com>
To: bug-auctex <at> gnu.org
Subject: [PATCH] Make preview placement more flexible
Date: Fri, 12 Apr 2024 09:17:33 +0200
[Message part 1 (text/plain, inline)]
Hello,

This patch has no effect on current behavior, but introduces a
variable preview-find-end-function that would allow (e.g.) an external
package to modify how previews overlays are placed, without resorting
to advice.

The code needed to be rearranged a bit because the implementation of
preview-find-end-function that I have in mind requires the beginning
of the region as an argument, which thus needs to be computed outside
the argument list of preview-place-preview.

This patch complements the preprocessing step introduced in bug#70295.
I'd be happy to supply more detailed motivation if that would be
helpful.

Thanks, best,

Paul
[0001-Make-preview-placement-more-flexible.patch (application/octet-stream, attachment)]

Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 19:27:01 GMT) Full text and rfc822 format available.

Message #8 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Wed, 17 Apr 2024 21:25:35 +0200
Hi Paul,

Paul Nelson <ultrono <at> gmail.com> writes:

> This patch has no effect on current behavior, but introduces a
> variable preview-find-end-function that would allow (e.g.) an external
> package to modify how previews overlays are placed, without resorting
> to advice.
>
> The code needed to be rearranged a bit because the implementation of
> preview-find-end-function that I have in mind requires the beginning
> of the region as an argument, which thus needs to be computed outside
> the argument list of preview-place-preview.
>
> This patch complements the preprocessing step introduced in bug#70295.
> I'd be happy to supply more detailed motivation if that would be
> helpful.

I can't install the patch with 'git am' and get:

  Applying: Make preview placement more flexible
  error: patch failed: preview.el.in:3273
  error: preview.el.in: patch does not apply
  Patch failed at 0001 Make preview placement more flexible

Do have the chance to look at this and resolve this?  Otherwise I'll
have to have a closer look.

TIA.  Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 19:29:01 GMT) Full text and rfc822 format available.

Message #11 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Paul Nelson <ultrono <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Wed, 17 Apr 2024 21:28:19 +0200
[Message part 1 (text/plain, inline)]
Hi Arash, sorry, must have messed up -  I’ll be happy to redo and resend
it. Thanks, best, Paul
[Message part 2 (text/html, inline)]

Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 19:42:01 GMT) Full text and rfc822 format available.

Message #14 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Paul Nelson <ultrono <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Wed, 17 Apr 2024 21:40:28 +0200
[Message part 1 (text/plain, inline)]
See attached, and let me know if I missed anything else.  Thanks, best,  Paul
[0001-Make-preview-placement-more-flexible.patch (application/octet-stream, attachment)]

Reply sent to Arash Esbati <arash <at> gnu.org>:
You have taken responsibility. (Wed, 17 Apr 2024 20:21:02 GMT) Full text and rfc822 format available.

Notification sent to Paul Nelson <ultrono <at> gmail.com>:
bug acknowledged by developer. (Wed, 17 Apr 2024 20:21:03 GMT) Full text and rfc822 format available.

Message #19 received at 70348-done <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: 70348-done <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Wed, 17 Apr 2024 22:19:43 +0200
Paul Nelson <ultrono <at> gmail.com> writes:

> See attached, and let me know if I missed anything else.

Thanks for your swift response.  I installed the change (e4def30851),
and closing.

Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 21:52:01 GMT) Full text and rfc822 format available.

Message #22 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: 70348 <at> debbugs.gnu.org
Cc: ultrono <at> gmail.com
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Wed, 17 Apr 2024 23:50:39 +0200
Arash Esbati <arash <at> gnu.org> writes:

> Paul Nelson <ultrono <at> gmail.com> writes:
>
>> See attached, and let me know if I missed anything else.
>
> Thanks for your swift response.  I installed the change (e4def30851),
> and closing.

Bad news, AUCTeX doesn't build after this commit.  The error is:

  In toplevel form:
  preview.el: Error: End of file during parsing
  make: *** [Makefile:249: lisp] Error 1

Can you please have another look?  I think there is a closing paren
mismatch.

TIA.  Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 22:06:01 GMT) Full text and rfc822 format available.

Message #25 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Paul Nelson <ultrono <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Thu, 18 Apr 2024 00:04:57 +0200
Sorry about that, I was sloppy in splitting up a commit.  The fix is:

(setq close-data (nconc ovl close-data))

->

(setq close-data (nconc ovl close-data)))

If it's easier for you, I'm happy to resend the patch.




Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 22:15:01 GMT) Full text and rfc822 format available.

Message #28 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Paul Nelson <ultrono <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Thu, 18 Apr 2024 00:14:05 +0200
> Sorry about that, I was sloppy in splitting up a commit.  The fix is:

In more detail, the "fix" is contained in the patch I submitted later
at #70442, and the issue arose when I split some commit into this
patch and that one.  One way to proceed would be to squash those two
patches, if the latter looks OK.




Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Wed, 17 Apr 2024 22:28:03 GMT) Full text and rfc822 format available.

Message #31 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Arash Esbati <arash <at> gnu.org>
To: Paul Nelson <ultrono <at> gmail.com>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Thu, 18 Apr 2024 00:26:42 +0200
Paul Nelson <ultrono <at> gmail.com> writes:

>> Sorry about that, I was sloppy in splitting up a commit.  The fix is:
>
> In more detail, the "fix" is contained in the patch I submitted later
> at #70442, and the issue arose when I split some commit into this
> patch and that one.  One way to proceed would be to squash those two
> patches, if the latter looks OK.

If you don't mind, I install this small change to fix the issue at hand:

--8<---------------cut here---------------start------------->8---
diff --git a/preview.el.in b/preview.el.in
index 5625d9c0..925ea3eb 100644
--- a/preview.el.in
+++ b/preview.el.in
@@ -3619,7 +3619,7 @@ name(\\([^)]+\\))\\)\\|\
                                            tempdir
                                            (cdr open-data)))
                                      (ov (car ovl)))
-                                (setq close-data (nconc ovl close-data))
+                                (setq close-data (nconc ovl close-data)))
                             (with-current-buffer run-buffer
                               (preview-log-error
                                (list 'error
--8<---------------cut here---------------end--------------->8---

and we can the go on and discuss the other patches.  It will probably
produce a little work at your end, but I hope you bear with me.  Ok?

Best, Arash




Information forwarded to bug-auctex <at> gnu.org:
bug#70348; Package auctex. (Thu, 18 Apr 2024 01:26:02 GMT) Full text and rfc822 format available.

Message #34 received at 70348 <at> debbugs.gnu.org (full text, mbox):

From: Paul Nelson <ultrono <at> gmail.com>
To: Arash Esbati <arash <at> gnu.org>
Cc: 70348 <at> debbugs.gnu.org
Subject: Re: bug#70348: [PATCH] Make preview placement more flexible
Date: Thu, 18 Apr 2024 03:24:33 +0200
[Message part 1 (text/plain, inline)]
Yes, good for me. Thanks

>
[Message part 2 (text/html, inline)]

This bug report was last modified 16 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.