[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: PROPOSAL: New function ffap-ip-at-point
From: |
Iñigo Serna |
Subject: |
Re: PROPOSAL: New function ffap-ip-at-point |
Date: |
Fri, 22 Jul 2022 16:46:44 +0200 |
User-agent: |
mu4e 1.8.6; emacs 29.0.50 |
Thanks Robert and Eli for your comments and suggestions.
On 22 July 2022 at 11:36 +02, Robert Pluim <rpluim@gmail.com>
wrote:
IPv6?
Parsing IPv6 addresses is much more complex: can be shortened and
even
one or more leading zeros from any group of hexadecimal digits
could be
removed. Too much work for this humble patch.
Youʼll need a ChangeLog style commit message.
What about this?
##################################################
Fri Jul 22 16:37:25 2022 Iñigo Serna <inigoserna@gmx.com>
Add functions ffap-ipv4-at-point, ffap-ipv4-p
* lisp/ffap.el (ffap-ipv4-at-point): New functions.
* lisp/ffap.el (ffap-ipv4-p):
* lisp/ffap.el (ffap-string-at-point-mode-alist): Add ipv4
mode.
* test/lisp/ffap-tests.el (ffap-ipv4-at-point): Add tests.
* etc/NEWS: Document new functions.
* lisp/net/net-utils.el (dns-lookup-host): try to use
ffap-ipv4-at-point if hostname is not found first.
##################################################
Anyway, I don't have commit rights so some other one should
perform the
commit and add the message.
On 22 July 2022 at 13:20 +02, Eli Zaretskii <eliz@gnu.org> wrote:
IPv4 or IPv6 addresses? or both? This should be stated in the
doc
string.
It's only for IPv4 addresses. I'll add this information to the doc
string.
I renamed the functions to 'ffap-ipv4-at-point' and 'ffap-ipv4-p'.
This also needs a NEWS entry.
Added. Please check it, as my English is not good.
+(defun ffap-ip-at-point ()
+ "Return IP address at point if it exists, or nil."
"If it exists" is ambiguous for an IP address, so please try
coming up
with a better wording.
Sorry. What about "if it is found at point"?
[...]
Leftover from debugging?
Glub! Removed, sorry.
Finally, can you add a couple of tests for this facility?
Added.
I've attached a new version of the patch. Hope you like it better.
Thanks,
--
Iñigo Serna
ffap-ip-at-point__dns-host-lookup-v2.diff
Description: Text Data
- PROPOSAL: New function ffap-ip-at-point, Iñigo Serna, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point, Robert Pluim, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point, Eli Zaretskii, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point,
Iñigo Serna <=
- Re: PROPOSAL: New function ffap-ip-at-point, Lars Ingebrigtsen, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point, Iñigo Serna, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point, Robert Pluim, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point, Lars Ingebrigtsen, 2022/07/22
- Re: PROPOSAL: New function ffap-ip-at-point, Robert Pluim, 2022/07/23
- Re: PROPOSAL: New function ffap-ip-at-point, Lars Ingebrigtsen, 2022/07/23
- Re: PROPOSAL: New function ffap-ip-at-point, Robert Pluim, 2022/07/23