From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help Subject: Use regex in ~/.emacs.d/init.el to match no_proxy. Date: Tue, 6 Apr 2021 16:22:47 +0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32205"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 06 10:23:28 2021 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTgzg-0008Fo-DX for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 06 Apr 2021 10:23:28 +0200 Original-Received: from localhost ([::1]:38306 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lTgzf-0001lk-EG for geh-help-gnu-emacs@m.gmane-mx.org; Tue, 06 Apr 2021 04:23:27 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33022) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lTgzG-0001kQ-UO for help-gnu-emacs@gnu.org; Tue, 06 Apr 2021 04:23:02 -0400 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:41821) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lTgzF-0000Gy-2C for help-gnu-emacs@gnu.org; Tue, 06 Apr 2021 04:23:02 -0400 Original-Received: by mail-lf1-x12e.google.com with SMTP id b14so21341500lfv.8 for ; Tue, 06 Apr 2021 01:23:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=v0KQPE0QYeOJlA/keeJWACmdvP3SGBAiLMkg4rdJM1Y=; b=tE9th1bR6fSREMgHRaAbk3x60mYIwgqrQbKsxL+EoF21W9CCoTRdM03jASPRokxSqO PK2AnkUNXT4rYciG148uo0HiL/WbLM5sJZy1C1HGPPf4jXOsiq+Gp2ayCtnRaQI6n9v9 eJcNC5qy3mjVzyibYPBTfbEUGV4GJdPSyppJN1tpsxP0TZuzLy2GmGHJu33hM9W8C7Bu f389e+JDvWy0zON07rZS+/Fk0qi88tJDGPiAZv8HaJTsa7VQMs5ARpfqa+L222jimBT7 PboLAUYCA+2J0QAhNIKOZOPbzHFmNWSuK3dT14aYoUfoCk5Xo1NLjfHCCc9gsjP9YuMn Ldmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=v0KQPE0QYeOJlA/keeJWACmdvP3SGBAiLMkg4rdJM1Y=; b=nkJuNy8BfcK8hiA6exjX0Y8X1M42ZLav18Rapt0m2IZCwq7OADmTL4quIoqLep7CJ6 XRljW757PbvXAUqdO5M+sG1P/S8AH1As4OTFmVXF+voFXqWbV04Fuq7BTk+hlk4+G1kM LqtHvnIMiAk3GB1snSZpZClAcI+qOpXXqTH7uc6uDHWpeabQy/tK7onuosQvN7G4Sb1o iDbpSMelyNoI75pVnt0TapJtVveEcedQEUh43DG/m/LAhuCQc+kGF9L/RDRdFMiHBBbQ 2jkfvqqtE/SqQ8vLytCGIzdkUd3veG+AhSkNcrLiv6uzGr2D61gbuACbY0wYcmri462F JgBg== X-Gm-Message-State: AOAM533WdJXTMw8g4lSuLgJ8An/7BKqCRy/A2xfWAtW0k1dJYIzp0rqw VIOzRF7edgTN1tKcv5q92RFPZL36+gsiwlk54CC2zi4PaPrZ4PHC X-Google-Smtp-Source: ABdhPJzPQNbsTRFC10EaTsyBOFPVtAKBoa+DevShMeljF/pUbwwN5SeUNG4GmuA/t2TYfHKl+B8jC/BEpHothuaNuYE= X-Received: by 2002:ac2:43b8:: with SMTP id t24mr1518738lfl.545.1617697378754; Tue, 06 Apr 2021 01:22:58 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -8 X-Spam_score: -0.9 X-Spam_bar: / X-Spam_report: (-0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:128844 Archived-At: On Ubuntu 20.04, I set the following proxy settings in ~/.emacs.d/init.el, ;;; begin (setq url-proxy-services '( ("no_proxy" . "^\\(.*\\.cn\\|localhost\\|10\\..*\\|127\\..*\\|172\\.16\\..*\\|172\\.17\\..*\\|192\\.168\\..*\\)") ; "http://127.0.0.1:8080" doesn't work ("http" . "127.0.0.1:8080") ("https" . "127.0.0.1:8080") )) ;;; end As you can see, the "no_proxy" string is rather cumbersome, and I want to express the following, but I still don't know what to do: "*.cn,localhost,10.0.0.0/8,127.0.0.0/8,172.16.0.0/12,192.168.0.0/16" Any hints will be highly appreciated. Regards -- Assoc. Prof. Hongyi Zhao Theory and Simulation of Materials Hebei Polytechnic University of Science and Technology engineering NO. 552 North Gangtie Road, Xingtai, China