bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71741: 30.0.60; Wrong type argument: number-or-marker-p after C-x C-


From: Jim Porter
Subject: bug#71741: 30.0.60; Wrong type argument: number-or-marker-p after C-x C-+ in eww
Date: Sun, 23 Jun 2024 17:32:36 -0700

On 6/23/2024 4:24 PM, Stefan Kangas wrote:
epg@pretzelnet.org writes:

To reproduce:
- emacs -Q
- M-x eww RET gnu.org RET C-x C-+

Expected:
Text is scaled up without error.

Actual:
Text is scaled up, but with an error:

run-hooks: Wrong type argument: number-or-marker-p, default

I can reproduce this bug.  Copying in Po Lu.

I was just looking at image scaling in an unrelated bug, so I had already swapped in all the necessary mental context for this. Here's a patch.

The second part fixes a closely-related issue: the scaling didn't work for sliced images (you can get a sliced image by zooming it: put point on the image and press "z").

Fixing that required fixing a bug in 'get-display-property': it only returned the CAR of the display property value. To maintain backwards compatibility, I changed it so that it still returns the CAR if there's only one element, but it now returns the whole list if there are multiple elements. I don't love this, and maybe we should always return a list, but I'll leave that decision to others (for what it's worth, 'get-display-property' is new in Emacs 29, so there hopefully aren't too many uses of it out in the wild yet).

I think the first patch is definitely worth merging to Emacs 30, but the second I'm neutral on. Maybe we should fix 'get-display-property' now?

Attachment: 0001-Fix-rescaling-of-images-via-text-scale-mode-in-EWW.patch
Description: Text document

Attachment: 0002-Support-rescaling-sliced-images-in-EWW-via-text-scal.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]