GNU bug report logs - #22721
Make the eww-font-toggle message clear

Previous Next

Package: emacs;

Reported by: Kaushal Modi <kaushal.modi <at> gmail.com>

Date: Wed, 17 Feb 2016 15:03:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22721 in the body.
You can then email your comments to 22721 AT debbugs.gnu.org in the normal way.

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-gnu-emacs <at> gnu.org:
bug#22721; Package emacs. (Wed, 17 Feb 2016 15:03:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Kaushal Modi <kaushal.modi <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 17 Feb 2016 15:03:02 GMT) Full text and rfc822 format available.

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

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: "bug-gnu-emacs <at> gnu.org" <bug-gnu-emacs <at> gnu.org>,
 Lars Ingebrigtsen <larsi <at> gnus.org>
Subject: Make the eww-font-toggle message clear
Date: Wed, 17 Feb 2016 10:01:44 -0500
[Message part 1 (text/plain, inline)]
Hi,

Here's a little patch where I change things a little bit in eww-font-toggle
function.

(1) The message is printed *after* eww-reload so that the font message is
not quickly masked by the "Contacting host.." message put out by
eww-reload. That way it is more obvious to the user if the proportional
fonts were turned on or off.

(2) Instead of "Fonts are now .." message, it now prints "Proportional
fonts are now ..". Earlier, I was confused if the monospace fonts were on
or proportional fonts were on. Doing "C-h v shr-use-fonts" helped me
understand that message better.

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index da920c1..8536c63 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1498,11 +1498,11 @@ eww-set-character-encoding
 (defun eww-toggle-fonts ()
   "Toggle whether to use monospaced or font-enabled layouts."
   (interactive)
-  (message "Fonts are now %s"
+  (eww-reload)
+  (message "Proportional fonts are now %s"
    (if (setq shr-use-fonts (not shr-use-fonts))
        "on"
-     "off"))
-  (eww-reload))
+     "off")))

 ;;; Bookmarks code





--
Kaushal Modi
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22721; Package emacs. (Wed, 17 Feb 2016 15:07:02 GMT) Full text and rfc822 format available.

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

From: Kaushal Modi <kaushal.modi <at> gmail.com>
To: 22721 <at> debbugs.gnu.org
Subject: Make the eww-font-toggle message clear
Date: Wed, 17 Feb 2016 10:05:31 -0500
[Message part 1 (text/plain, inline)]
Made a "duh" mistake in my earlier patch.

Here's the fixed version:

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index da920c1..185b9e6 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -1498,11 +1498,10 @@ eww-set-character-encoding
 (defun eww-toggle-fonts ()
   "Toggle whether to use monospaced or font-enabled layouts."
   (interactive)
-  (message "Fonts are now %s"
-   (if (setq shr-use-fonts (not shr-use-fonts))
-       "on"
-     "off"))
-  (eww-reload))
+  (setq shr-use-fonts (not shr-use-fonts))
+  (eww-reload)
+  (message "Proportional fonts are now %s"
+   (if shr-use-fonts "on" "off")))

 ;;; Bookmarks code





--
Kaushal Modi
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22721; Package emacs. (Fri, 19 Feb 2016 05:57:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Kaushal Modi <kaushal.modi <at> gmail.com>
Cc: 22721 <at> debbugs.gnu.org
Subject: Re: bug#22721: Make the eww-font-toggle message clear
Date: Fri, 19 Feb 2016 16:56:29 +1100
Kaushal Modi <kaushal.modi <at> gmail.com> writes:

> Here's the fixed version:

Thanks; applied to emacs-25.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 19 Feb 2016 05:58:01 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 22721 <at> debbugs.gnu.org and Kaushal Modi <kaushal.modi <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Fri, 19 Feb 2016 05:58:01 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 18 Mar 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 95 days ago.

Previous Next


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