unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "Basil L. Contovounesios" <contovob@tcd.ie>
To: Tassilo Horn <tsdh@gnu.org>
Cc: lars ingebrigtsen <larsi@gnus.org>, 41133@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	[thread overview]
Message-ID: <87sgg9tes2.fsf@tcd.ie> (raw)
In-Reply-To: <87h7wqlwrw.fsf@gnu.org> (Tassilo Horn's message of "Fri, 08 May 2020 09:18:43 +0200")

Tassilo Horn <tsdh@gnu.org> writes:

> "Basil L. Contovounesios" <contovob@tcd.ie> writes:
>
>> X-Debbugs-Cc: Lars Ingebrigtsen <larsi@gnus.org>, Tassilo Horn <tsdh@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





      reply	other threads:[~2020-05-09 13:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  1:18 bug#41133: 28.0.50; Respect browse-url user options in shr/eww Basil L. Contovounesios
2020-05-08  6:37 ` Eli Zaretskii
2020-05-08  7:23   ` Tassilo Horn
2020-05-09 13:27   ` Basil L. Contovounesios
2020-05-09 13:42     ` Eli Zaretskii
2020-05-10  0:05       ` Basil L. Contovounesios
2020-05-10 13:52         ` Eli Zaretskii
2020-05-22 15:43           ` Basil L. Contovounesios
2020-05-08  7:18 ` Tassilo Horn
2020-05-09 13:32   ` Basil L. Contovounesios [this message]

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=87sgg9tes2.fsf@tcd.ie \
    --to=contovob@tcd.ie \
    --cc=41133@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=tsdh@gnu.org \
    /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).