[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Use regex in ~/.emacs.d/init.el to match no_proxy.
From: |
Hongyi Zhao |
Subject: |
Re: Use regex in ~/.emacs.d/init.el to match no_proxy. |
Date: |
Thu, 8 Apr 2021 09:17:31 +0800 |
On Wed, Apr 7, 2021 at 3:19 PM <tomas@tuxteam.de> wrote:
>
> On Wed, Apr 07, 2021 at 09:26:42AM +0800, Hongyi Zhao wrote:
>
> [...]
>
> > Additional Comment: I also tried to use the eshell method to call this
> > function, but failed as shown below:
> >
> > M-x eshell RET
> >
> > ~ $ regexp-opt ("*.cn" "localhost" "10.0.0.0/8" "127.0.0.0/8"
> > "172.16.0.0/12" "192.168.0.0/16")
>
> I don't know about your other points, but can give a hint on this
> one. The `eshell' takes expressions in Lisp syntax, that means
> you have to write `(function arg1 arg2 ...)' instead of the more
> customary `function (arg1 arg2 ...)'. In your case:
>
> [1] (regexp-opt "*.cn" "localhost" "10.0.0.0/8" "127.0.0.0/8"
> "172.16.0.0/12" "192.168.0.0/16")
>
> will lead to the desired result. That's why:
>
> > Wrong type argument: list-or-vector-p, "Invalid function: \"*.cn\""
>
> eshell complains here: it is trying to apply a function `".cn"' to the
> rest of the arguments. But there is no function with such a funny
> name (quotes and all).
>
> Eshell allows you to leave out the outermost parentheses, so instead
> of [1] you can also write
>
> [2] regexp-opt "*.cn" "localhost" "10.0.0.0/8" "127.0.0.0/8" "172.16.0.0/12"
> "192.168.0.0/16"
Still failed, as shown below:
~ $ regexp-opt "*.cn" "localhost" "10.0.0.0/8" "127.0.0.0/8"
"172.16.0.0/12" "192.168.0.0/16"
Wrong number of arguments: (1 . 2), 6
>
> as a convenience.
>
> Cheers
> - t
--
Assoc. Prof. Hongyi Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Polytechnic University of Science and Technology engineering
NO. 552 North Gangtie Road, Xingtai, China
- Use regex in ~/.emacs.d/init.el to match no_proxy., Hongyi Zhao, 2021/04/06
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Leo Butler, 2021/04/06
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Hongyi Zhao, 2021/04/06
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Gregory Heytings, 2021/04/06
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Hongyi Zhao, 2021/04/06
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., tomas, 2021/04/07
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy.,
Hongyi Zhao <=
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Joost Kremers, 2021/04/08
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Hongyi Zhao, 2021/04/10
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Joost Kremers, 2021/04/10
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Hongyi Zhao, 2021/04/10
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Joost Kremers, 2021/04/11
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Tim Landscheidt, 2021/04/11
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Hongyi Zhao, 2021/04/11
- Re: Use regex in ~/.emacs.d/init.el to match no_proxy., tomas, 2021/04/11
- RE: [External] : Re: Use regex in ~/.emacs.d/init.el to match no_proxy., Drew Adams, 2021/04/11
- Re: [External] : Re: Use regex in ~/.emacs.d/init.el to match no_proxy., tomas, 2021/04/12