GNU bug report logs - #25426
[PATCH] in net-utils.el several DNS query functions now take optional name server argument; also, `dig-program-options' added

Previous Next

Package: emacs;

Reported by: Andrew Robbins <contact <at> andrewrobbins.info>

Date: Thu, 12 Jan 2017 16:11:01 UTC

Severity: wishlist

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


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

From: npostavs <at> users.sourceforge.net
To: Andrew Robbins <contact <at> andrewrobbins.info>
Cc: 25426 <at> debbugs.gnu.org
Subject: Re: bug#25426: [PATCH] in net-utils.el several DNS query functions
 now take optional name server argument; also, `dig-program-options' added
Date: Sat, 06 May 2017 08:04:01 -0400
Andrew Robbins <contact <at> andrewrobbins.info> writes:

> -   (list (read-from-minibuffer "Lookup host: " (net-utils-machine-at-point))))
> +   (if current-prefix-arg
> +       (list
> +        (read-from-minibuffer "Look up host: " (net-utils-machine-at-point))
> +        (read-from-minibuffer "Name server: "))
> +     (list
> +      (read-from-minibuffer "Look up host: " (net-utils-machine-at-point)))))

You could avoid repeating the "Look up host" code like this:

    (list (read-from-minibuffer "Look up host: " (net-utils-machine-at-point))
          (if current-prefix-arg (read-from-minibuffer "Name server: ")))

> -	 (if nslookup-program-options
> -	     (append nslookup-program-options (list host))
> -	   (list host))))
> +	 (if name-server
> +	     (append nslookup-program-options (list host name-server))
> +	   (append nslookup-program-options (list host)))))

Similarly

    (append nslookup-program-options (list host)
            (if name-sever (list name-server)))

> -      (mapconcat 'identity
> -		(list "Nslookup" host nslookup-program)
> -		" ** "))
> +	     (mapconcat 'identity
> +		        (list "Nslookup" host nslookup-program)
> +		        " ** "))

This is just a whitespace change, right?


Same comments again for dns-lookup-host and run-dig changes.




This bug report was last modified 8 years and 8 days ago.

Previous Next


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