GNU bug report logs - #41133
28.0.50; Respect browse-url user options in shr/eww

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Fri, 8 May 2020 01:19:01 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 28.0.50

Fixed in version 28.1

Done: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: "Basil L. Contovounesios" <contovob <at> tcd.ie>
To: Tassilo Horn <tsdh <at> gnu.org>
Cc: lars ingebrigtsen <larsi <at> gnus.org>, 41133 <at> debbugs.gnu.org
Subject: bug#41133: 28.0.50; Respect browse-url user options in shr/eww
Date: Sat, 09 May 2020 14:32:29 +0100
Tassilo Horn <tsdh <at> gnu.org> writes:

> "Basil L. Contovounesios" <contovob <at> tcd.ie> writes:
>
>> X-Debbugs-Cc: Lars Ingebrigtsen <larsi <at> gnus.org>, Tassilo Horn <tsdh <at> gnu.org>
>> Severity: wishlist
>> Tags: patch
>>
>> The commands shr-browse-url and eww-follow-link currently pass mailto
>> URLs directly to browse-url-mail, which doesn't respect the user options
>> browse-url-handlers and browse-url-mailto-function.
>>
>> Can't/shouldn't the commands call browse-url instead?
>> WDYT of the attached patch that does this?
>
> Looks good to me (I just looked at the parts calling browse-url), and I
> think it won't change any behavior unless the user customizes
> browse-url-handlers to catch mailto links with his own function instead
> of the default one in browse-url-default-handlers (which in turn just
> calls browse-url-mailto-function).

Thanks.

> BTW: I didn't know about function-put.  Should that be preferred to put?
> I've tested that put/get also work with #'function, so where's the
> difference?

function-put is currently identical to put, but this may change in the
future.  Quoth (info "(elisp) Symbol Plists"):

 -- Function: function-put function property value
     This function sets PROPERTY of FUNCTION to VALUE.  FUNCTION should
     be a symbol.  This function is preferred to calling ‘put’ for
     setting properties of a function, because it will allow us some day
     to implement remapping of old properties to new ones.

See also the commentary in its definition:

  (defalias 'function-put
    ;; We don't want people to just use `put' because we can't conveniently
    ;; hook into `put' to remap old properties to new ones.  But for now, there's
    ;; no such remapping, so we just call `put'.
    #'(lambda (function prop value)
        "Set FUNCTION's property PROP to VALUE.
  The namespace for PROP is shared with symbols.
  So far, FUNCTION can only be a symbol, not a lambda expression."
        (put function prop value)))

-- 
Basil




This bug report was last modified 5 years and 50 days ago.

Previous Next


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