From unknown Sun Aug 17 22:11:54 2025 X-Loop: help-debbugs@gnu.org Subject: bug#10549: 24.0.92; eshell-read-hosts-file - does not skip comment lines Resent-From: Mike Lamb Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 18 Jan 2012 21:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10549 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 10549@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.132692299625801 (code B ref -1); Wed, 18 Jan 2012 21:44:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jan 2012 21:43:16 +0000 Received: from localhost ([127.0.0.1]:34800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RndHn-0006i4-Mt for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:43:16 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48718) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RndHk-0006hx-WA for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RndGd-0001Go-9d for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:42:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:57339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RndGd-0001Gk-86 for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:42:03 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RndGb-0001KU-VN for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2012 16:42:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RndGa-0001GY-Kw for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2012 16:42:01 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:62462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RndGa-0001GU-FI for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2012 16:42:00 -0500 Received: by yenm10 with SMTP id m10so2874918yen.0 for ; Wed, 18 Jan 2012 13:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; bh=aaW2K3AUDtAsCPhataS2FvtrjcpJg4F8d13g9X6afu4=; b=K/XjLWq7nV6nZtgJCA2sCUUwngeaTjis7+SpjpDi6gVIiXVrXysSaZ2l7oCrpYT+E2 bKyoboiB9EhnFnq3EBiWH1JmMgR4f8Ic6Oh0hp/ASxBkVXLhimjCg3Q1dAaqwex9Pm4Z KPw7fQ9xuYUPaNvfDOLcQvJNTw7qde0OywTHM= Received: by 10.236.121.168 with SMTP id r28mr35748230yhh.51.1326922919890; Wed, 18 Jan 2012 13:41:59 -0800 (PST) Received: from anvil.home ([199.233.87.102]) by mx.google.com with ESMTPS id n5sm44983926yhk.1.2012.01.18.13.41.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jan 2012 13:41:59 -0800 (PST) From: Mike Lamb Date: Wed, 18 Jan 2012 16:41:56 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.4 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) This patch modifies the regex in eshell-read-hosts-file to skip comment lines: *** old/lisp/eshell/esh-util.el 2012-01-05 04:46:05.000000000 -0500 --- /Users/mrl/proj/emacs_trunk/lisp/eshell/esh-util.el 2012-01-18 14:23:31.000000000 -0500 *************** *** 483,489 **** (insert-file-contents eshell-hosts-file) (goto-char (point-min)) (while (re-search-forward ! "^\\(\\S-+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) (if (match-string 1) (add-to-list 'hosts (match-string 1))) (if (match-string 2) --- 483,489 ---- (insert-file-contents eshell-hosts-file) (goto-char (point-min)) (while (re-search-forward ! "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) (if (match-string 1) (add-to-list 'hosts (match-string 1))) (if (match-string 2) In GNU Emacs 24.0.92.1 (x86_64-apple-darwin11.2.0, NS apple-appkit-1138.23) of 2012-01-18 on anvil.home Windowing system distributor `Apple', version 10.3.1138 configured using `configure '--with-ns' '--without-x'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: EShell Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x k M-x r e p o r t - Recent messages: Decrypting /Users/mrl/.authinfo.gpg...done 235 2.7.0 Accepted 250 2.1.0 OK 17sm465789ang.11 250 2.1.5 OK 17sm465789ang.11 354 Go ahead 17sm465789ang.11 Sending email Sending email done 250 2.0.0 OK 1326921581 17sm465789ang.11 221 2.0.0 closing connection 17sm465789ang.11 Sending...done Load-path shadows: None found. Features: (epa-file epa derived epg epg-config gnutls network-stream starttls tls mailalias multi-isearch newcomment shadow sort mail-extr message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader emacsbug help-mode view pcmpl-unix ansi-color em-unix pcomplete comint em-term term disp-table ehelp electric em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias ring esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc help-fns esh-groups eshell esh-module esh-mode esh-util server smtpmail auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util password-cache sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-x easymenu dired regexp-opt edmacro kmacro time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind ns multi-tty emacs) From unknown Sun Aug 17 22:11:54 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Mike Lamb Subject: bug#10549: closed (Re: bug#10549: 24.0.92; eshell-read-hosts-file - does not skip comment lines) Message-ID: References: X-Gnu-PR-Message: they-closed 10549 X-Gnu-PR-Package: emacs Reply-To: 10549@debbugs.gnu.org Date: Mon, 23 Jan 2012 08:13:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1327306382-22445-1" This is a multi-part message in MIME format... ------------=_1327306382-22445-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #10549: 24.0.92; eshell-read-hosts-file - does not skip comment lines which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 10549@debbugs.gnu.org. --=20 10549: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D10549 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1327306382-22445-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 10549-done) by debbugs.gnu.org; 23 Jan 2012 08:12:50 +0000 Received: from localhost ([127.0.0.1]:40453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpF1F-0005pe-Lf for submit@debbugs.gnu.org; Mon, 23 Jan 2012 03:12:49 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:40994 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RpF1D-0005pX-I0 for 10549-done@debbugs.gnu.org; Mon, 23 Jan 2012 03:12:48 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RpF0w-0008FC-1d; Mon, 23 Jan 2012 03:12:30 -0500 From: Glenn Morris To: 10549-done@debbugs.gnu.org Subject: Re: bug#10549: 24.0.92; eshell-read-hosts-file - does not skip comment lines References: X-Spook: RSA AIMSX president brigand smuggle ammunition terrorist X-Ran: u(x-l6{2/I[dW%{AiY#1m49Ci].tecOUM|u>UNv7](8Qt_:^E7j~(0?`;hdOP~DQ:%>FQE X-Hue: blue X-Debbugs-No-Ack: yes X-Attribution: GM Date: Mon, 23 Jan 2012 03:12:29 -0500 In-Reply-To: (Mike Lamb's message of "Wed, 18 Jan 2012 16:41:56 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10549-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Version: 24.0.93 Thanks; applied. ------------=_1327306382-22445-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 18 Jan 2012 21:43:16 +0000 Received: from localhost ([127.0.0.1]:34800 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RndHn-0006i4-Mt for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:43:16 -0500 Received: from eggs.gnu.org ([140.186.70.92]:48718) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RndHk-0006hx-WA for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:43:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RndGd-0001Go-9d for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:42:05 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:57339) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RndGd-0001Gk-86 for submit@debbugs.gnu.org; Wed, 18 Jan 2012 16:42:03 -0500 Received: from eggs.gnu.org ([140.186.70.92]:52578) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RndGb-0001KU-VN for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2012 16:42:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RndGa-0001GY-Kw for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2012 16:42:01 -0500 Received: from mail-yx0-f169.google.com ([209.85.213.169]:62462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RndGa-0001GU-FI for bug-gnu-emacs@gnu.org; Wed, 18 Jan 2012 16:42:00 -0500 Received: by yenm10 with SMTP id m10so2874918yen.0 for ; Wed, 18 Jan 2012 13:42:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type; bh=aaW2K3AUDtAsCPhataS2FvtrjcpJg4F8d13g9X6afu4=; b=K/XjLWq7nV6nZtgJCA2sCUUwngeaTjis7+SpjpDi6gVIiXVrXysSaZ2l7oCrpYT+E2 bKyoboiB9EhnFnq3EBiWH1JmMgR4f8Ic6Oh0hp/ASxBkVXLhimjCg3Q1dAaqwex9Pm4Z KPw7fQ9xuYUPaNvfDOLcQvJNTw7qde0OywTHM= Received: by 10.236.121.168 with SMTP id r28mr35748230yhh.51.1326922919890; Wed, 18 Jan 2012 13:41:59 -0800 (PST) Received: from anvil.home ([199.233.87.102]) by mx.google.com with ESMTPS id n5sm44983926yhk.1.2012.01.18.13.41.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 18 Jan 2012 13:41:59 -0800 (PST) From: Mike Lamb To: bug-gnu-emacs@gnu.org Subject: 24.0.92; eshell-read-hosts-file - does not skip comment lines Date: Wed, 18 Jan 2012 16:41:56 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -3.4 (---) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.4 (---) This patch modifies the regex in eshell-read-hosts-file to skip comment lines: *** old/lisp/eshell/esh-util.el 2012-01-05 04:46:05.000000000 -0500 --- /Users/mrl/proj/emacs_trunk/lisp/eshell/esh-util.el 2012-01-18 14:23:31.000000000 -0500 *************** *** 483,489 **** (insert-file-contents eshell-hosts-file) (goto-char (point-min)) (while (re-search-forward ! "^\\(\\S-+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) (if (match-string 1) (add-to-list 'hosts (match-string 1))) (if (match-string 2) --- 483,489 ---- (insert-file-contents eshell-hosts-file) (goto-char (point-min)) (while (re-search-forward ! "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) (if (match-string 1) (add-to-list 'hosts (match-string 1))) (if (match-string 2) In GNU Emacs 24.0.92.1 (x86_64-apple-darwin11.2.0, NS apple-appkit-1138.23) of 2012-01-18 on anvil.home Windowing system distributor `Apple', version 10.3.1138 configured using `configure '--with-ns' '--without-x'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: EShell Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-x k M-x r e p o r t - Recent messages: Decrypting /Users/mrl/.authinfo.gpg...done 235 2.7.0 Accepted 250 2.1.0 OK 17sm465789ang.11 250 2.1.5 OK 17sm465789ang.11 354 Go ahead 17sm465789ang.11 Sending email Sending email done 250 2.0.0 OK 1326921581 17sm465789ang.11 221 2.0.0 closing connection 17sm465789ang.11 Sending...done Load-path shadows: None found. Features: (epa-file epa derived epg epg-config gnutls network-stream starttls tls mailalias multi-isearch newcomment shadow sort mail-extr message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader emacsbug help-mode view pcmpl-unix ansi-color em-unix pcomplete comint em-term term disp-table ehelp electric em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias ring esh-var esh-io esh-cmd esh-ext esh-proc esh-arg eldoc help-fns esh-groups eshell esh-module esh-mode esh-util server smtpmail auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc gnus-util password-cache sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils dired-x easymenu dired regexp-opt edmacro kmacro time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind ns multi-tty emacs) ------------=_1327306382-22445-1--