[PLUG] Emacs: save marked lines to new file
Dale Snell
ddsnell at frontier.com
Thu Nov 7 20:49:47 UTC 2013
On Thu, 7 Nov 2013 12:18:48 -0800 (PST)
Rich Shepard <rshepard at appl-ecosys.com> wrote:
> On Thu, 7 Nov 2013, Dale Snell wrote:
>
> > That procedure works fine, except that it marks the buffer as modified.
>
> Well, it is modified if I delete content.
>
> > So, being terminally lazy, I created a macro in my .init.el:
> >
> > (global-set-key (kbd "C-x w") 'copy-region-as-kill)
> > I do quite a bit of copy/paste, and this command makes things more
> > convenient.
>
>
> When I want to copy a marked block I use C-x w followed by C-x y.
> Doesn't need an additional macro.
???
Do you perhaps mean C-w (kill-region)? I chose "C-x w" specifically
because that key combo was not bound to anything else. Also, while
kill-region / yank-region leaves the buffer essentially unchanged, the
buffer is still marked as modified. That's why I created that little
bit of code. I got tired of telling Emacs that yes, I know the buffer
is modified and no, I really do not want to save it.
Also, what is "C-x y"? It's not in my copy of the manual.
--Dale
--
"America believes in education: the average professor earns more
money in a year than a professional athlete earns in a whole
week." -- Evan Esar
More information about the PLUG
mailing list