emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PROPOSAL: New function ffap-ip-at-point


From: Robert Pluim
Subject: Re: PROPOSAL: New function ffap-ip-at-point
Date: Fri, 22 Jul 2022 17:55:40 +0200

>>>>> On Fri, 22 Jul 2022 17:34:06 +0200, Iñigo Serna <inigoserna@gmx.com> said:

    Iñigo> Hi Lars,
    Iñigo> On 22 July 2022 at 17:09 +02, Lars Ingebrigtsen <larsi@gnus.org>
    Iñigo> wrote:

    >> Have a look at textsec--ipvx-address-p -- I think that should do the
    >> right thing?  (And could be moved somewhere more central if it's
    >> doing
    >> the right thing here for reuse.)

    Iñigo> 'textsec--ipvx-address-p' current implementation is not perfect.
    Iñigo> It returns a wrong result when some octet is greater than 255.

    Iñigo> (textsec--ipvx-address-p "343.1.2.3")
    Iñigo> 0

    Iñigo> (ffap-ipv4-p "343.1.2.3")
    Iñigo> nil

    Iñigo> So IMO it's not as useful for my purposes, reports from network 
tools.

We could extend network-lookup-address-info so that it could pass
AI_NUMERICHOST to getaddrinfo, which would then check that itʼs
been passed a valid numeric IP address.

Robert
-- 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]