From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Bruce Ingalls Newsgroups: gmane.emacs.help Subject: Re: extract regexp Date: Tue, 22 Apr 2003 17:31:19 GMT Organization: Road Runner - NYC Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <2vAna.20416$TR5.13296@twister.nyc.rr.com> <3E9EE4FF.7060902@yahoo.com><3EA56DB8.3090909@yahoo.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1051033150 2203 80.91.224.249 (22 Apr 2003 17:39:10 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 22 Apr 2003 17:39:10 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Tue Apr 22 19:39:03 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1981iQ-0000Ss-00 for ; Tue, 22 Apr 2003 19:37:58 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1981g2-00064v-03 for gnu-help-gnu-emacs@m.gmane.org; Tue, 22 Apr 2003 13:35:30 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!canoe.uoregon.edu!arclight.uoregon.edu!enews.sgi.com!news-out.spamkiller.net!propagator2-maxim!propagator3-maxim!news-in.superfeed.net!news-west.rr.com!news-server.columbus.rr.com!cyclone.rdc-nyc.rr.com!news-out.nyc.rr.com!twister.nyc.rr.com.POSTED!53ab2750!not-for-mail User-Agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3) Gecko/20030314 X-Accept-Language: en-us, en Original-Newsgroups: gnu.emacs.help In-Reply-To: <3EA56DB8.3090909@yahoo.com> Original-Lines: 53 Original-NNTP-Posting-Host: 24.168.135.82 Original-X-Complaints-To: abuse@rr.com Original-X-Trace: twister.nyc.rr.com 1051032679 24.168.135.82 (Tue, 22 Apr 2003 13:31:19 EDT) Original-NNTP-Posting-Date: Tue, 22 Apr 2003 13:31:19 EDT Original-Xref: shelby.stanford.edu gnu.emacs.help:112187 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:8686 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:8686 Kevin Rodgers wrote: > Bruce Ingalls wrote: >> Unfortunately, it gets a little more tricky, as I should check that >> mail.server.server*.type >> is pop3 or imap, and not nntp, but this is good enough. > > Is that information in the prefs.js file, or do you have to querey the > server? It's in prefs.js. I didn't say everything about how I was using this code, and I suspect that your correction (while appreciated) is not appropriate. There is one nonstandard regex that I pass in, but otherwise, I can use a normal string for the key, and concat it. I'm sure the previous line sounds like rambling, and I likely need to explain myself in code. You can see how I am actually using it, in the EMacro 2.7 beta at in the files e-config.el and e-functions.el I also use this function to import (the first possible) nntp news server, as well as login IDs, etc. Here are excerpts from my prefs.js file, with names slightly altered for protection: user_pref("mail.server.server1.directory", "/home/bingalls/.mozilla/default/mo3abcd.slt/Mail/pop-server.aol.com"); user_pref("mail.server.server1.download_on_biff", true); user_pref("mail.server.server1.empty_trash_on_exit", true); user_pref("mail.server.server1.hostname", "pop-server.aol.com"); user_pref("mail.server.server1.spamLoggingEnabled", true); user_pref("mail.server.server1.type", "pop3"); //... user_pref("mail.server.server3.directory", "/home/bingalls/.mozilla/default/mo3abcd.slt/News/news-server.aol.com"); user_pref("mail.server.server3.hostname", "news-server.aol.com"); user_pref("mail.server.server3.max_cached_connections", 2); user_pref("mail.server.server3.name", "news-server.aol.com"); user_pref("mail.server.server3.newsrc.file", "/home/bingalls/.mozilla/default/mo3abcd.slt/News/newsrc-news-server.aol.com"); user_pref("mail.server.server3.type", "nntp"); Thus, the mail.server.server?.type in prefs.js tells me that I have a POP3, IMAP, NNTP or local folder. The '*.type' follows the server name, by a variable number of lines.