From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gamename Newsgroups: gmane.emacs.help Subject: Re: Execute In Multiple Shells? Date: Thu, 21 Jan 2010 08:27:50 -0800 (PST) Organization: http://groups.google.com Message-ID: References: <62546fac-b9c5-4eaa-a75f-f2d0cedce91f@x5g2000prf.googlegroups.com> <87tywkbwzn.fsf@galatea.local> <87y6lvra58.fsf@sphinx.net.ru> <87y6lvae81.fsf@galatea.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1264092115 15331 80.91.229.12 (21 Jan 2010 16:41:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Jan 2010 16:41:55 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jan 21 17:41:47 2010 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NY06M-0005F7-OG for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 17:41:47 +0100 Original-Received: from localhost ([127.0.0.1]:44003 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NY06N-0008Al-Ln for geh-help-gnu-emacs@m.gmane.org; Thu, 21 Jan 2010 11:41:47 -0500 Original-Path: news.stanford.edu!usenet.stanford.edu!postnews.google.com!j14g2000yqm.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 40 Original-NNTP-Posting-Host: 75.101.17.80 Original-X-Trace: posting.google.com 1264091270 17448 127.0.0.1 (21 Jan 2010 16:27:50 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 21 Jan 2010 16:27:50 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: j14g2000yqm.googlegroups.com; posting-host=75.101.17.80; posting-account=RaR4ZAoAAAAWKu7drRlc9rwG-rufL47m User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20100107 Fedora/3.5.6-1.fc12 Firefox/3.5.6 FirePHP/0.3, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:176277 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:71348 Archived-At: On Nov 24 2009, 11:56=A0am, p...@informatimago.com (Pascal J. Bourguignon) wrote: > Dmitry Dzhus writes: > > Pascal J. Bourguignon wrote: > > >> (defun buffer-named (name) > >> =A0 " > >> RETURN: the buffer which has as name `name'. > >> " > >> =A0 (let ((bl (buffer-list))) > >> =A0 =A0 (unless (and buffer-list-cache buffer-name-map > >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0(equal buffer-list-cache bl)) > >> =A0 =A0 =A0 (setf buffer-list-cache (copy-seq bl)) > >> =A0 =A0 =A0 (setf buffer-name-map (make-hash-table :test (function equ= al))) > >> =A0 =A0 =A0 (dolist (buffer buffer-list-cache) > >> =A0 =A0 =A0 =A0 (let ((name (buffer-name buffer))) > >> =A0 =A0 =A0 =A0 =A0 (when name (setf (gethash name buffer-name-map) bu= ffer))) > >> =A0 =A0 =A0 =A0 (let ((name (buffer-file-name buffer))) > >> =A0 =A0 =A0 =A0 =A0 (when name (setf (gethash name buffer-name-map) bu= ffer)))))) > >> =A0 (or (gethash name buffer-name-map) > >> =A0 =A0 =A0 (gethash (truename name) buffer-name-map))) > > > How is this different from `get-buffer`? > > It uses truename, which I forgot to adjoin: > > (defun truename (filespec) > =A0 " > RETURN: =A0The absolute path name corresponding to fielspec. > " > =A0 (car (file-expand-wildcards (shell-quote-argument filespec) t))) > > -- > __Pascal Bourguignon__ Thanks guys! -T