unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Readonly  File, Changable Buffer
@ 2003-02-27 18:03 Artist
  2003-02-27 18:14 ` Benjamin Rutt
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Artist @ 2003-02-27 18:03 UTC (permalink / raw)


Hi,
 I like to read a file in emacs buffer and don't want to make any
change to the file itself, but should not have any problem in changing
buffer contents.
Thus I like to dis-associate the buffer from the file.
ex.. I like to sort the data in buffer etc..
I looked at dissociated-press but doesn't make much sense.

Thanks,
artist

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Readonly  File, Changable Buffer
  2003-02-27 18:03 Readonly File, Changable Buffer Artist
@ 2003-02-27 18:14 ` Benjamin Rutt
  2003-02-27 18:33 ` Barry Margolin
  2003-02-27 20:01 ` Piet van Oostrum
  2 siblings, 0 replies; 5+ messages in thread
From: Benjamin Rutt @ 2003-02-27 18:14 UTC (permalink / raw)


googleartist@yahoo.com (Artist) writes:

>  I like to read a file in emacs buffer and don't want to make any
> change to the file itself, but should not have any problem in changing
> buffer contents.
> Thus I like to dis-associate the buffer from the file.
> ex.. I like to sort the data in buffer etc..
> I looked at dissociated-press but doesn't make much sense.

If the buffer is truly read-only according to your OS, use M-x
toggle-read-only.

Otherwise, just edit the buffer and don't save it.
-- 
Benjamin

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Readonly  File, Changable Buffer
  2003-02-27 18:03 Readonly File, Changable Buffer Artist
  2003-02-27 18:14 ` Benjamin Rutt
@ 2003-02-27 18:33 ` Barry Margolin
  2003-02-27 20:01 ` Piet van Oostrum
  2 siblings, 0 replies; 5+ messages in thread
From: Barry Margolin @ 2003-02-27 18:33 UTC (permalink / raw)


In article <de3ad953.0302271003.37eca6bd@posting.google.com>,
Artist <googleartist@yahoo.com> wrote:
>Hi,
> I like to read a file in emacs buffer and don't want to make any
>change to the file itself, but should not have any problem in changing
>buffer contents.
>Thus I like to dis-associate the buffer from the file.

What I usually do is create a new buffer with C-x b, and then use C-x i to
insert the file into that buffer.  insert-file doesn't associate the file
with the buffer.

-- 
Barry Margolin, barry.margolin@level3.com
Genuity Managed Services, Woburn, MA
*** DON'T SEND TECHNICAL QUESTIONS DIRECTLY TO ME, post them to newsgroups.
Please DON'T copy followups to me -- I'll assume it wasn't posted to the group.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Readonly  File, Changable Buffer
@ 2003-02-27 18:41 Bingham, Jay
  0 siblings, 0 replies; 5+ messages in thread
From: Bingham, Jay @ 2003-02-27 18:41 UTC (permalink / raw)


On Thursday, February 27, 2003 12:14 PM Benjamin Rutt wrote:

>googleartist@yahoo.com (Artist) writes:
>
>>  I like to read a file in emacs buffer and don't want to make any
>> change to the file itself, but should not have any problem in
changing
>> buffer contents.
>> Thus I like to dis-associate the buffer from the file.
>> ex.. I like to sort the data in buffer etc..
>> I looked at dissociated-press but doesn't make much sense.
>
>If the buffer is truly read-only according to your OS, use M-x
>toggle-read-only.
>
>Otherwise, just edit the buffer and don't save it.

Or if you are not comfortable with either of those options (perhaps
because you are afraid that you might accidentally write your changes
back to the file) you could create a buffer using the switch to buffer
command (C-x b) and insert (C-x i)the file in it.  The advantage of this
method is that there is no file associated with the buffer so it will
not overwrite the original file, and there is no file modification
overhead either.

-_
J_)
C_)ingham
.    HP - NonStop Austin Software & Services - Software Quality
Assurance
.    Austin, TX
. "Language is the apparel in which your thoughts parade in public.
.  Never clothe them in vulgar and shoddy attire."     -Dr. George W.
Crane-

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Readonly  File, Changable Buffer
  2003-02-27 18:03 Readonly File, Changable Buffer Artist
  2003-02-27 18:14 ` Benjamin Rutt
  2003-02-27 18:33 ` Barry Margolin
@ 2003-02-27 20:01 ` Piet van Oostrum
  2 siblings, 0 replies; 5+ messages in thread
From: Piet van Oostrum @ 2003-02-27 20:01 UTC (permalink / raw)


>>>>> googleartist@yahoo.com (Artist) (A) wrote:

A> Hi,
A>  I like to read a file in emacs buffer and don't want to make any
A> change to the file itself, but should not have any problem in changing
A> buffer contents.
A> Thus I like to dis-associate the buffer from the file.
A> ex.. I like to sort the data in buffer etc..
A> I looked at dissociated-press but doesn't make much sense.

(setq buffer-file-name nil)
-- 
Piet van Oostrum <piet@cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum@hccnet.nl

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-02-27 20:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-27 18:03 Readonly File, Changable Buffer Artist
2003-02-27 18:14 ` Benjamin Rutt
2003-02-27 18:33 ` Barry Margolin
2003-02-27 20:01 ` Piet van Oostrum
  -- strict thread matches above, loose matches on Subject: below --
2003-02-27 18:41 Bingham, Jay

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).