[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Emacs Book Vs Emacs Manuals
From: |
Marcin Borkowski |
Subject: |
Re: Emacs Book Vs Emacs Manuals |
Date: |
Sun, 28 Jun 2015 16:55:01 +0200 |
On 2015-06-28, at 00:40, Emanuel Berg <embe8573@student.uu.se> wrote:
> Rusi <rustompmody@gmail.com> writes:
>
> I actually think both keyboard macros and regexps as
> a method of editing code are bad (both almost as bad,
> but regexps are still a bit better because they can be
> read, and the skills you get are usable elsewhere).
Emanuel, are you aware of C-x C-k RET?
> But both are bad in the sense they solve problems by
> rearranging code according to patterns which almost
> turn the code into something graphical! Or to be
> precise, the methods are not bad but good but my code
> never looks like that. If there are patterns to the
> code those should be expressed by other means - not as
> ASCII art!
If you edit text, which is somehow “graphical”, why shouldn’t the code
reflect the problem? Not that it has to, but IMHO there’s nothing wrong
if it does.
Note that my Emacs usage is somewhat atypical: while I do edit code
often, I edit texts in natural languages (usually marked up in LaTeX or
Org-mode) even more often.
> So I ask again, next time you use this with real
> technology like Lisp, C, C++, zsh, SQL, even groff,
> LaTeX, just about anything that I know that would be
> interesting to see.
Admittedly, I don’t think I’ve ever used macros when editing Elisp, for
instance. OTOH, I have Oleh Krehel’s Lispy for that (have you seen
that? Some commands, e.g., the xc/xi pair, look almost like magic.).
> I have only seen one example so far and there
> I disagree: I think the Elisp one-liner is the best
> solution by far.
I disagree (not surprising), and when I next use a kbd macro, I'll try
to remember to show it here.
(One other case I like keyboard macros is rearranging things, e.g.,
paragraphs, in a buffer; I open two windows with the same buffer, but
with the point in different places, and record a macro which kills
something in one window and yanks in the other one. Very handy.)
Best,
--
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University
- Re: Emacs Book Vs Emacs Manuals, (continued)
- Re: Emacs Book Vs Emacs Manuals, Filipp Gunbin, 2015/06/30
- Re: Emacs Book Vs Emacs Manuals, Emanuel Berg, 2015/06/30
- Message not available
- Re: Emacs Book Vs Emacs Manuals, Rusi, 2015/06/27
- Re: Emacs Book Vs Emacs Manuals, Stefan Monnier, 2015/06/27
- Re: Emacs Book Vs Emacs Manuals, Emanuel Berg, 2015/06/27
- keyboard-macro facility recording commands (Was: Emacs Book Vs Emacs Manuals), Steinar Bang, 2015/06/30
- Message not available
- Re: Emacs Book Vs Emacs Manuals, Pascal J. Bourguignon, 2015/06/27
- Re: Emacs Book Vs Emacs Manuals, Emanuel Berg, 2015/06/27
- Re: Emacs Book Vs Emacs Manuals,
Marcin Borkowski <=
- Re: Emacs Book Vs Emacs Manuals, Emanuel Berg, 2015/06/28