all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Skip Montanaro <skip.montanaro@gmail.com>
To: Help GNU Emacs <help-gnu-emacs@gnu.org>
Subject: You learn something every day...
Date: Thu, 12 Apr 2018 14:26:05 -0500	[thread overview]
Message-ID: <CANc-5UyLL+r0z4y7dN1dt9juhSG37HnZM1A1YiTmnn6Kg=2sng@mail.gmail.com> (raw)

I've been using some version of Emacs since 1981, when I installed
Gosling Emacs from a DECUS tape on VMS. (I had gotten used to a "full
screen" editor on the PR1ME computers we used at school, and
complained about what was effectively an ed(1)-style editor on VMS.
Not sure EDT was available yet.) So though I long ago stopped messing
with Emacs at the Lisp level other than to define some keys in my init
file, I have used many versions of Emacs, plumbed the depths of its
user interface and have tried any number of packages.

Still, there is always something new under the sun. Today I learned
about M-n and M-p in the minibuffer. I pass this along in case there
are any other Emacs users as apparently oblivious as I've been all
these years.

For the past couple days, I have been monitoring the logfile from an
uncooperative server process using occur to match and highlight
interesting bits. A simple keyboard macro looks like this:

* revisit the log file
* return to the top
* execute occur, accepting the default pattern
* scroll the *Occur* buffer to the end
* return point to the log file

This all goes swimmingly, unless I need to tweak the pattern or use
occur for some other task. The pattern grows and shrinks over time,
but basically looks like this:

subpat1 \| subpat2 \| ... \| subpatN

where N is generally five or less and the various subpatterns aren't
too complex, often just simple strings.

It was getting to be a royal PITA to have to retype the pattern from
scratch any time I wanted to alter it. As I went looking for how to
load the last regular expression into the minibuffer to edit it, I
stumbled on the Minibuf menu and its M-n and M-p bindings. I almost
*never* use the graphical menu (remember how long I've been using
Emacs, old habits die hard - I used to suppress it altogether as a
waste of screen space). I don't know what possessed me to glance at
the menu bar at just the right time, but that glance saved me a trip
down a deep, dark rabbit hole.

M-p-is-your-friend-ly, y'rs,

Skip

Yo, Adam...



             reply	other threads:[~2018-04-12 19:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 19:26 Skip Montanaro [this message]
2018-04-13 14:41 ` You learn something every day Marcin Borkowski
     [not found] <mailman.12203.1523561201.27995.help-gnu-emacs@gnu.org>
2018-04-13  6:17 ` Loris Bennett
2018-04-13  7:56   ` Eli Zaretskii
     [not found]   ` <mailman.12247.1523606180.27995.help-gnu-emacs@gnu.org>
2018-04-13  8:29     ` Loris Bennett
2018-04-13  8:41       ` tomas
2018-04-13  8:58         ` Eli Zaretskii
2018-04-13  8:58       ` Eli Zaretskii
2018-04-15 17:00       ` Gene
2018-04-15 17:15         ` Eli Zaretskii
2018-04-15 21:48         ` Skip Montanaro

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='CANc-5UyLL+r0z4y7dN1dt9juhSG37HnZM1A1YiTmnn6Kg=2sng@mail.gmail.com' \
    --to=skip.montanaro@gmail.com \
    --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.