[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invisible buffer is it possible?

From: Carsten Dominik
Subject: Re: invisible buffer is it possible?
Date: 26 Nov 2002 14:13:00 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

How about starting the buffer name with a space?

>From the elisp documentation:

   Buffers that are ephemeral and generally uninteresting to the user
have names starting with a space, so that the `list-buffers' and
`buffer-menu' commands don't mention them.  A name starting with space
also initially disables recording undo information; see *Note Undo::.

- Carsten

>>>>> "PL" == Phillip Lord <> writes:

PL> I'm just wondering whether I can create an invisible buffer, or
PL> something similar? That is one which does not appear in the buffer
PL> menu list, and you can't accidentally change to. 

PL> The reason for this is that I have use this little hack....

PL> (add-hook 'xml-mode-hook
PL>           'phil-psgml-hook)
PL> (defun phil-psgml-hook()
PL>   "Does various checks and sets up various variables
PL>  1) Checks to see if the file being loaded is one which needs a fake 
PL>  That is I don't want to have the doctype in the buffer but want psgml mode 
PL>  think that there is one. 
PL>  2) Sets up default validate command"
PL>   (interactive)
PL>   (if (string= "build.xml"
PL>                (file-name-nondirectory (buffer-file-name)))
PL>       (setq sgml-parent-document '( "~/emacs/anthead.xml" "" "project"
PL>       ))))

PL> What this does is allow me to use a DTD for editing ant build files,
PL> without having to put the doctype declaration into the build file
PL> itself, which goes into the anthead.xml file. 

PL> However it results in the anthead.xml file being opened into a buffer,
PL> and it's just an annoyance. 

PL> Is there someway that I can mark it invisible?

PL> Cheers

PL> Phil

reply via email to

[Prev in Thread] Current Thread [Next in Thread]