From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: Re: How to know is a buffer is a temporary one? Date: Mon, 29 Jul 2013 18:19:21 +0200 Message-ID: <87d2q1z6d2.fsf@gmail.com> References: <86k3k975fj.fsf@somewhere.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1375114797 8908 80.91.229.3 (29 Jul 2013 16:19:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 29 Jul 2013 16:19:57 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 29 18:19:57 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V3qAv-0006Hn-KO for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jul 2013 18:19:57 +0200 Original-Received: from localhost ([::1]:42955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3qAv-0001UT-7l for geh-help-gnu-emacs@m.gmane.org; Mon, 29 Jul 2013 12:19:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36027) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3qAe-0001UG-I9 for help-gnu-emacs@gnu.org; Mon, 29 Jul 2013 12:19:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V3qAY-0000hj-Bb for help-gnu-emacs@gnu.org; Mon, 29 Jul 2013 12:19:40 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:42806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V3qAY-0000hc-68 for help-gnu-emacs@gnu.org; Mon, 29 Jul 2013 12:19:34 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V3qAW-000660-CO for help-gnu-emacs@gnu.org; Mon, 29 Jul 2013 18:19:32 +0200 Original-Received: from g231233174.adsl.alicedsl.de ([92.231.233.174]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Jul 2013 18:19:32 +0200 Original-Received: from tjolitz by g231233174.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 29 Jul 2013 18:19:32 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 24 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: g231233174.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:AtHX52+CZM0YlyRvCs7vgvbc09g= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92514 Archived-At: "Sebastien Vauban" writes: > Hello, > > I want to attach some code on first-change-hook, but I noticed *a lot* > of temporary buffers are created (and modified), hence my code running > in many situations where it doesn't need to. > > So, is there a way for my code not to be applied for temp buffers? > Function to use in a `(when ...)' construct? Or do I have to look for > the pattern `^ *' in the name of the buffer (that is, a name beginning > with a space and a star)? #+begin_quote ...with-temp-buffer creates a buffer named ␣*temp* (note the leading whitespace)... #+end_quote maybe its enough to identify all tmp buffers created by `with-current-buffer' by their naming convention? cheers, Thorsten