all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Marcin Borkowski <mbork@mbork.pl>
To: help-gnu-emacs@gnu.org
Subject: Re: Emacs Book Vs Emacs Manuals
Date: Sat, 27 Jun 2015 10:25:38 +0200	[thread overview]
Message-ID: <87wpypblrx.fsf@mbork.pl> (raw)
In-Reply-To: <20150626221204690538460@bob.proulx.com>


On 2015-06-27, at 07:02, Bob Proulx <bob@proulx.com> wrote:

> Rusi wrote:
>> Emanuel Berg wrote:
>> > %% (replace-regexp "^\\(.*&.*&\\).*&\\(.*\\)" "\\1\\2")
>>
>> 51 chars (ignoring that things like ^& are shift chords)
>> 
>> F3
>> C-s & RET C-SPC C-s C-s RET C-w C-a C-n
>> F4
>> 
>> 16 keystrokes counting each chord as 1 1/2 keys
>
> I don't think keyboard golf is the best justification for something.
> It helps.  But for me keyboard macros are simply more interactive.
> They are a way to quickly multiply one keystroke into many.
>
> But the above does make me realize that I often use keyboard macros
> when the "shape" of the text is a factor in the editing of it.  Such
> as when I need to make edits around something both above and below
> it.  I might need to move a chunk of text up or down or otherwise
> mutate it in unusual ways while editing.  During the keyboard macro I
> can search for something, then search for something different, perhaps
> several times to land on the right starting point.  Then I can move up
> or down spatially to be where I want to be.  That is much harder to do
> with regular expression.  I grew up with regular expressions and use
> them all of the time.  But I use different tools at different times.

Exactly.

Macros are especially nice in that they mimic the way you edit text.
You can do that in Elisp, too, or sometimes regexen, but Elisp requires
a lot of typing and regexen require a lot of thinking; both are energy-
and time-consuming.  OTOH, there are cases when macros won't do
(conditional expressions, loops – they are doable in macros – see Calc
manual – but much less intuitive, at least for me).

> Here is a contrived example.  Split the buffer into two windows.

Nice!


> Regular expressions are awesome.  But keyboard macros are awesome too.

Yes.

> Bob

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



  reply	other threads:[~2015-06-27  8:25 UTC|newest]

Thread overview: 137+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-08 10:06 Emacs Book Vs Emacs Manuals Vaidheeswaran C
2015-05-08 10:36 ` Shakthi Kannan
2015-05-08 10:43   ` Vaidheeswaran C
2015-05-08 11:08     ` tomas
2015-05-08 11:18     ` Shakthi Kannan
2015-05-08 19:10     ` Bob Proulx
2015-05-08 19:35       ` Marcin Borkowski
2015-05-10  2:48         ` Bob Proulx
     [not found]         ` <mailman.2686.1431226098.904.help-gnu-emacs@gnu.org>
2015-05-10  3:22           ` Emanuel Berg
2015-05-10 14:01           ` Rusi
2015-05-10 14:05             ` Pascal J. Bourguignon
2015-05-11 11:17               ` Phillip Lord
     [not found]               ` <mailman.2758.1431343034.904.help-gnu-emacs@gnu.org>
2015-05-11 11:27                 ` Pascal J. Bourguignon
2015-05-10 15:31             ` Drew Adams
2015-05-11 11:08             ` Phillip Lord
2015-05-15 16:15             ` MBR
2015-05-15 18:45               ` Doug Lewan
     [not found]               ` <mailman.3085.1431715560.904.help-gnu-emacs@gnu.org>
2015-05-15 20:18                 ` Emanuel Berg
2015-05-16  4:31                   ` Yuri Khan
2015-05-18 20:57                     ` Bob Proulx
2015-06-25 14:22                   ` Ken Goldman
2015-06-26 15:03                     ` Emanuel Berg
2015-06-26 20:21                       ` Marcin Borkowski
2015-06-26 22:42                         ` Emanuel Berg
2015-06-27 19:29                           ` MBR
2015-06-27 22:48                             ` Emanuel Berg
     [not found]                             ` <mailman.5813.1435445379.904.help-gnu-emacs@gnu.org>
2015-06-28  3:45                               ` Rusi
2015-06-28 14:34                                 ` Marcin Borkowski
2015-06-28 15:31                                   ` Emanuel Berg
2015-06-28 15:36                                     ` Marcin Borkowski
2015-06-28 15:53                                       ` Emanuel Berg
     [not found]                         ` <mailman.5747.1435358641.904.help-gnu-emacs@gnu.org>
2015-06-27  3:15                           ` Rusi
2015-06-27  5:02                             ` Bob Proulx
2015-06-27  8:25                               ` Marcin Borkowski [this message]
2015-06-27 11:56                                 ` Robert Thorpe
     [not found]                                 ` <mailman.5780.1435406221.904.help-gnu-emacs@gnu.org>
2015-06-27 14:44                                   ` Rusi
2015-06-27 17:46                                 ` Emanuel Berg
2015-06-27 17:42                             ` Emanuel Berg
2015-06-29 13:03                               ` Filipp Gunbin
2015-06-29 23:51                                 ` Emanuel Berg
2015-06-30  4:38                                   ` Vaidheeswaran C
2015-06-30 23:26                                     ` Emanuel Berg
     [not found]                                     ` <mailman.6072.1435707010.904.help-gnu-emacs@gnu.org>
2015-07-01  0:32                                       ` Dan Espen
2015-06-30  8:10                                   ` Marcin Borkowski
2015-06-30 23:40                                     ` Emanuel Berg
2015-06-30 16:56                                   ` Filipp Gunbin
2015-07-01  0:00                                     ` Emanuel Berg
     [not found]                             ` <mailman.5799.1435427076.904.help-gnu-emacs@gnu.org>
2015-06-27 18:12                               ` Rusi
2015-06-27 21:55                                 ` Stefan Monnier
2015-06-27 22:25                                   ` Emanuel Berg
2015-06-30 10:56                                   ` keyboard-macro facility recording commands (Was: Emacs Book Vs Emacs Manuals) Steinar Bang
     [not found]                                 ` <mailman.5809.1435442174.904.help-gnu-emacs@gnu.org>
2015-06-27 22:06                                   ` Emacs Book Vs Emacs Manuals Pascal J. Bourguignon
2015-06-27 22:40                                 ` Emanuel Berg
2015-06-28 14:55                                   ` Marcin Borkowski
2015-06-28 15:47                                     ` Emanuel Berg
2015-06-25 14:16               ` Ken Goldman
     [not found]             ` <mailman.3077.1431706537.904.help-gnu-emacs@gnu.org>
2015-05-15 20:15               ` Emanuel Berg
2015-05-08 10:53 ` Tassilo Horn
2015-05-08 13:39   ` Phillip Lord
2015-05-08 14:34     ` Eli Zaretskii
2015-05-08 14:38     ` Tassilo Horn
2015-05-08 15:09       ` Phillip Lord
2015-05-08 15:41         ` Tassilo Horn
2015-05-08 21:54           ` Stefan Monnier
2015-05-09 10:00           ` Vaidheeswaran C
2015-05-10 14:31         ` Steinar Bang
     [not found]     ` <mailman.2604.1431095644.904.help-gnu-emacs@gnu.org>
2015-05-08 14:50       ` Barry Margolin
2015-05-08 15:01         ` Eli Zaretskii
2015-05-08 22:06           ` Stefan Monnier
2015-05-09  9:06             ` Eli Zaretskii
2015-05-09  9:18             ` Vaidheeswaran C
2015-05-09 10:38               ` Eli Zaretskii
2015-05-10  6:47                 ` Vaidheeswaran C
2015-05-10 15:01                   ` Eli Zaretskii
2015-05-11  5:30                     ` Vaidheeswaran C
2015-05-11 16:06                       ` Eli Zaretskii
2015-05-16  5:50                         ` Vaidheeswaran C
2015-05-16  7:32                           ` Eli Zaretskii
2015-05-17 15:35                             ` Vaidheeswaran C
2015-05-17 14:47                               ` Eli Zaretskii
2015-05-18  2:49                                 ` Vaidheeswaran C
2015-05-18 14:15                                   ` Eli Zaretskii
2015-05-19  5:50                                     ` Vaidheeswaran C
2015-05-19 15:07                                       ` Eli Zaretskii
2015-05-19 16:41                                       ` Filipp Gunbin
     [not found]                                     ` <mailman.3246.1432014638.904.help-gnu-emacs@gnu.org>
2015-05-19 23:58                                       ` Emanuel Berg
2015-05-10  2:45             ` Bob Proulx
2015-05-11 10:53           ` Phillip Lord
2015-05-11 15:58             ` Eli Zaretskii
2015-05-11 16:12               ` Stefan Monnier
2015-05-11 16:23                 ` Eli Zaretskii
2015-05-11 16:30                   ` Eli Zaretskii
2015-05-11 18:01                     ` Stefan Monnier
2015-05-11 20:38                     ` Marcin Borkowski
     [not found]                     ` <mailman.2820.1431376739.904.help-gnu-emacs@gnu.org>
2015-05-12  3:22                       ` Rusi
     [not found]                   ` <<83y4kvkrf5.fsf@gnu.org>
2015-05-11 17:12                     ` Drew Adams
2015-05-11 17:11                 ` Drew Adams
2015-05-11 18:06                   ` Stefan Monnier
2015-05-11 18:38                     ` Drew Adams
     [not found]                   ` <mailman.2806.1431367811.904.help-gnu-emacs@gnu.org>
2015-05-12  4:07                     ` Rusi
2015-05-12  8:15                       ` Rasmus
2015-05-12 16:11                       ` Eli Zaretskii
     [not found]                       ` <mailman.2872.1431447128.904.help-gnu-emacs@gnu.org>
2015-05-12 16:55                         ` Rusi
2015-05-12 17:45                           ` Eli Zaretskii
2015-05-13  7:47                             ` tomas
2015-05-13 12:10                               ` Filipp Gunbin
2015-05-13 12:32                                 ` tomas
2015-05-13 15:24                                   ` Filipp Gunbin
2015-05-13 16:37                               ` Eli Zaretskii
     [not found]                               ` <mailman.2958.1431535075.904.help-gnu-emacs@gnu.org>
2015-05-15  2:56                                 ` Rusi
2015-05-15  7:31                                   ` Eli Zaretskii
     [not found]                                   ` <mailman.3052.1431675095.904.help-gnu-emacs@gnu.org>
2015-05-15 11:12                                     ` Rusi
2015-05-15 13:09                                       ` Eli Zaretskii
2015-05-15 13:44                                         ` Phillip Lord
     [not found]                                         ` <mailman.3067.1431697490.904.help-gnu-emacs@gnu.org>
2015-05-15 14:01                                           ` Rusi
2015-05-15 14:36                                             ` Eli Zaretskii
     [not found]                           ` <mailman.2887.1431452758.904.help-gnu-emacs@gnu.org>
2015-05-13  1:09                             ` Rusi
2015-05-13  2:20                               ` Drew Adams
     [not found]                 ` <mailman.2797.1431364316.904.help-gnu-emacs@gnu.org>
2015-05-11 17:27                   ` Rusi
2015-05-20  0:21                 ` Robert Thorpe
2015-05-08 16:35     ` Sivaram Neelakantan
2015-05-09 10:14     ` Vaidheeswaran C
     [not found] ` <mailman.2592.1431081398.904.help-gnu-emacs@gnu.org>
2015-05-08 13:34   ` notbob
2015-05-08 15:50 ` Drew Adams
2015-05-09  9:49   ` Vaidheeswaran C
2015-05-09 14:21     ` Jude DaShiell
2015-05-08 19:10 ` Marcin Borkowski
2015-05-09  7:47   ` Eli Zaretskii
2015-05-09  8:07     ` Marcin Borkowski
2015-05-09  8:27       ` Eli Zaretskii
2015-05-09 17:34         ` Marcin Borkowski
2015-05-11 11:02     ` Phillip Lord
2015-05-11 16:03       ` Eli Zaretskii
2015-05-11 17:20         ` Phillip Lord
2015-05-11 18:04           ` Eli Zaretskii
     [not found]     ` <<87k2wfl6mo.fsf@newcastle.ac.uk>
     [not found]       ` <<83617zm78t.fsf@gnu.org>
2015-05-11 17:11         ` Drew Adams
     [not found] <mailman.2591.1431080443.904.help-gnu-emacs@gnu.org>
2015-05-09 22:59 ` Emanuel Berg
     [not found] <<mii1p5$ho1$1@ger.gmane.org>

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wpypblrx.fsf@mbork.pl \
    --to=mbork@mbork.pl \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.