From: Visuwesh <visuweshm@gmail.com>
To: Manuel Giraud <manuel@ledu-giraud.fr>
Cc: 67764@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>, jm@pub.pink
Subject: bug#67764: 30.0.50; Opening image in eww no longer works
Date: Tue, 12 Dec 2023 14:44:12 +0530 [thread overview]
Message-ID: <87msufu6jf.fsf@gmail.com> (raw)
In-Reply-To: <87h6kn4z2q.fsf@ledu-giraud.fr> (Manuel Giraud's message of "Tue, 12 Dec 2023 09:14:37 +0100")
[-- Attachment #1: Type: text/plain, Size: 739 bytes --]
[Tuesday December 12, 2023] Manuel Giraud wrote:
> Visuwesh <visuweshm@gmail.com> writes:
>
> [...]
>
>> diff --git a/lisp/net/shr.el b/lisp/net/shr.el
>> index 9f030b4c743..bf5038a421d 100644
>> --- a/lisp/net/shr.el
>> +++ b/lisp/net/shr.el
>> @@ -1137,7 +1137,9 @@ shr-put-image
>> (when image
>> ;; The trailing space can confuse shr-insert into not
>> ;; putting any space after inline images.
>> - (setq alt (string-trim alt))
>> + ;; ALT may be nil when visiting image URLs in eww
>> + ;; (bug#6774).
>
> There is a 6 missing in the bug reference ;-)
...and in the commit log. I don't know how I managed to mess it up.
Thanks for catching the mistake. Revised patch attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-shr-put-image-with-nil-value-for-ALT.patch --]
[-- Type: text/x-diff, Size: 979 bytes --]
From 4327fb4eae80b217437fbabae6c2ef7c6ac940a3 Mon Sep 17 00:00:00 2001
From: Visuwesh <visuweshm@gmail.com>
Date: Mon, 11 Dec 2023 17:09:03 +0530
Subject: [PATCH] Fix shr-put-image with nil value for ALT
* lisp/net/shr.el (shr-put-image): Account for nil value for ALT.
(Bug#67764)
---
lisp/net/shr.el | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index 9f030b4c743..d6ea5213337 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1137,7 +1137,9 @@ shr-put-image
(when image
;; The trailing space can confuse shr-insert into not
;; putting any space after inline images.
- (setq alt (string-trim alt))
+ ;; ALT may be nil when visiting image URLs in eww
+ ;; (bug#67764).
+ (setq alt (if alt (string-trim alt) "*"))
;; When inserting big-ish pictures, put them at the
;; beginning of the line.
(let ((inline (shr--inline-image-p image)))
--
2.42.0
next prev parent reply other threads:[~2023-12-12 9:14 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-11 6:26 bug#67764: 30.0.50; Opening image in eww no longer works john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-11 11:40 ` Visuwesh
2023-12-11 15:03 ` john muhl via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-11 15:47 ` Eli Zaretskii
2023-12-12 4:12 ` Visuwesh
2023-12-12 8:14 ` Manuel Giraud via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-12-12 9:14 ` Visuwesh [this message]
2023-12-16 12:53 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87msufu6jf.fsf@gmail.com \
--to=visuweshm@gmail.com \
--cc=67764@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=jm@pub.pink \
--cc=manuel@ledu-giraud.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).