unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#62574: [PATCH] Preserve peer information for web page in eww-readable
@ 2023-03-31 18:55 Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-04-01  8:37 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-03-31 18:55 UTC (permalink / raw)
  To: 62574

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

Tags: patch

Hello,

Here's a small patch that addresses a slight annoyance in EWW.

Cheers,
Eshel

In GNU Emacs 30.0.50 (build 2, x86_64-apple-darwin22.4.0, NS
 appkit-2299.50 Version 13.3 (Build 22E252)) of 2023-03-31 built on
 esmac.lan
Repository revision: 73a320801e9af61a48fd0e803afcd02b059b2338
Repository branch: master
Windowing system distributor 'Apple', version 10.3.2299
System Description:  macOS 13.3

Configured using:
 'configure CFLAGS=-O3 --with-native-compilation --with-json
 --with-tree-sitter'


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Preserve-peer-information-for-web-page-in-eww-readab.patch --]
[-- Type: text/patch, Size: 1169 bytes --]

From ce54c22d01f9b84b4632adb7e294d7e883f33b81 Mon Sep 17 00:00:00 2001
From: Eshel Yaron <me@eshelyaron.com>
Date: Fri, 31 Mar 2023 17:54:12 +0300
Subject: [PATCH] Preserve peer information for web page in eww-readable

The :peer property in eww-data affects the face of the page title in
header-line-format as set by eww-update-header-line-format.
Preserving this property in eww-readable avoids having the header
line's appearance change when this command is called.

* lisp/net/eww.el (eww-readable): Preserve eww-data's :peer property.
---
 lisp/net/eww.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 1b42ef4e919..a1dd186915e 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1014,7 +1014,7 @@ eww-readable
                       (list 'base (list (cons 'href base))
                             (eww-highest-readability dom))
 		      nil (current-buffer))
-    (dolist (elem '(:source :url :title :next :previous :up))
+    (dolist (elem '(:source :url :title :next :previous :up :peer))
       (plist-put eww-data elem (plist-get old-data elem)))
     (eww--after-page-change)))
 
-- 
2.40.0


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

* bug#62574: [PATCH] Preserve peer information for web page in eww-readable
  2023-03-31 18:55 bug#62574: [PATCH] Preserve peer information for web page in eww-readable Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-04-01  8:37 ` Eli Zaretskii
  2023-04-01  8:58   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2023-04-01  8:37 UTC (permalink / raw)
  To: Eshel Yaron; +Cc: 62574

> Date: Fri, 31 Mar 2023 21:55:09 +0300
> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> Here's a small patch that addresses a slight annoyance in EWW.

Thanks, but can you please post a recipe for showing the effect of
this change?





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

* bug#62574: [PATCH] Preserve peer information for web page in eww-readable
  2023-04-01  8:37 ` Eli Zaretskii
@ 2023-04-01  8:58   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2023-04-02  7:40     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-04-01  8:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 62574

Eli Zaretskii <eliz@gnu.org> writes:

>> Date: Fri, 31 Mar 2023 21:55:09 +0300
>> From:  Eshel Yaron via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
>> 
>> Here's a small patch that addresses a slight annoyance in EWW.
>
> Thanks, but can you please post a recipe for showing the effect of
> this change?

Sure:

1. Start emacs -Q
2. Type M-x eww RET https://gnu.org RET
   (any HTTPS site with a valid certificate will do)
3. Notice the green color of the page's title in the header line that
   indicates that the peer's certificate is valid
   (You can also check C-h v header-line-format RET to validate that the
   eww-valid-certificate face is applied to the title portion of the
   header line)
4. Now type R to execute eww-readable
5. Note that the color of page's title in the header line changed (it is no longer green)






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

* bug#62574: [PATCH] Preserve peer information for web page in eww-readable
  2023-04-01  8:58   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-04-02  7:40     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2023-04-02  7:40 UTC (permalink / raw)
  To: Eshel Yaron; +Cc: 62574-done

> From: Eshel Yaron <me@eshelyaron.com>
> Cc: 62574@debbugs.gnu.org
> Date: Sat, 01 Apr 2023 11:58:52 +0300
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> Date: Fri, 31 Mar 2023 21:55:09 +0300
> >> From:  Eshel Yaron via "Bug reports for GNU Emacs,
> >>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >> 
> >> Here's a small patch that addresses a slight annoyance in EWW.
> >
> > Thanks, but can you please post a recipe for showing the effect of
> > this change?
> 
> Sure:
> 
> 1. Start emacs -Q
> 2. Type M-x eww RET https://gnu.org RET
>    (any HTTPS site with a valid certificate will do)
> 3. Notice the green color of the page's title in the header line that
>    indicates that the peer's certificate is valid
>    (You can also check C-h v header-line-format RET to validate that the
>    eww-valid-certificate face is applied to the title portion of the
>    header line)
> 4. Now type R to execute eww-readable
> 5. Note that the color of page's title in the header line changed (it is no longer green)

Thanks, installed on the emacs-29 branch, and closing the bug.





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

end of thread, other threads:[~2023-04-02  7:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-31 18:55 bug#62574: [PATCH] Preserve peer information for web page in eww-readable Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-01  8:37 ` Eli Zaretskii
2023-04-01  8:58   ` Eshel Yaron via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-04-02  7:40     ` Eli Zaretskii

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).