unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mike Lamb <mrlamb@gmail.com>
To: 10549@debbugs.gnu.org
Subject: bug#10549: 24.0.92; eshell-read-hosts-file - does not skip comment lines
Date: Wed, 18 Jan 2012 16:41:56 -0500	[thread overview]
Message-ID: <m2pqegy9gb.fsf@anvil.home> (raw)

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:
<return> C-x k <return> M-x r e p o r t - <tab> <r
eturn>

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)





             reply	other threads:[~2012-01-18 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 21:41 Mike Lamb [this message]
2012-01-23  8:12 ` bug#10549: 24.0.92; eshell-read-hosts-file - does not skip comment lines Glenn Morris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2pqegy9gb.fsf@anvil.home \
    --to=mrlamb@gmail.com \
    --cc=10549@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).