🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.bug
Article #99573

Re: *compilation* buffer should be read-only

#99573
From: James C Burley
Date: Sat, 14 Jul 1990 18:30
16 lines
1924 bytes
In article <1990Jul14.132501.22540@diku.dk> thorinn@skinfaxe.diku.dk (Lars Henrik Mathiesen) writes:

   Since kill-line is defined in simple.el, and uses kill-region, it is
   very simple to make a version which just copies to the kill-ring. Put
   this in your .emacs and bind it to some key (I used M-C-w, because I
   don't think I've ever used append-next-kill).

Would another reasonable approach be to rebind ^K (and any other bindings you
commonly use for erasing-to-kill-ring, like ^W) to a function that first checks
whether the buffer is read-only, then does the appropriate thing (standard
fn if not, else similar fn without erasing if so)?  I'm not a GNU EMACS expert,
but I've done things like this in other (lesser) EMACSes; thus I can't say
offhand exactly how to do it.  Perhaps a fancier way would be to put up a
query like "'Kill' to kill ring without modifying read-only buffer?" and do
the op only if answered yes, and also set a buffer-wide flag indicating that
a yes answer was given so the question need not be answered again.
Technical Details
Message-ID: <BURLEY.90Jul14143058@world.std.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!bloom-beacon!snorkelwacker!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!xylogics!world!burley
References: <9007111420.AA03222@asylum.gsfc.nasa.gov> <9007121706.AA26565@life.ai.mit.edu> <1990Jul14.132501.22540@diku.dk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fb2f1,b0cafb0dd90ced89
X-Google-Attributes: gidfb2f1,public
X-Google-ArrivalTime: 1990-07-15 04:42:05 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!bloom-beacon!snorkelwacker!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!samsung!xylogics!world!burley
From: burley@world.std.com (James C Burley)
Newsgroups: gnu.emacs.bug
Subject: Re: *compilation* buffer should be read-only
Message-ID: <BURLEY.90Jul14143058@world.std.com>
Date: 14 Jul 90 18:30:58 GMT
References: <9007111420.AA03222@asylum.gsfc.nasa.gov>
 <9007121706.AA26565@life.ai.mit.edu> <1990Jul14.132501.22540@diku.dk>
Sender: burley@world.std.com (James C Burley)
Distribution: gnu
Organization: The World
Lines: 16
Posted: Sat Jul 14 19:30:58 1990
In-Reply-To: thorinn@skinfaxe.diku.dk's message of 14 Jul 90 13:25:01 GMT