unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* You learn something every day...
@ 2018-04-12 19:26 Skip Montanaro
  2018-04-13 14:41 ` Marcin Borkowski
  0 siblings, 1 reply; 11+ messages in thread
From: Skip Montanaro @ 2018-04-12 19:26 UTC (permalink / raw)
  To: Help GNU Emacs

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...



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
       [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>
  0 siblings, 2 replies; 11+ messages in thread
From: Loris Bennett @ 2018-04-13  6:17 UTC (permalink / raw)
  To: help-gnu-emacs

Skip Montanaro <skip.montanaro@gmail.com> writes:

> 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,

I probably first came across the bindings in shell-like buffers when I
was trying to access the history and realised that the arrows keys
weren't the way to go ... 

However, being a relative newbie, having only used Emacs since the late
'80s, I have never come across the "Minibuf menu".  What's that?

Cheers,

Loris

-- 
This signature is currently under construction.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-13  6:17 ` You learn something every day Loris Bennett
@ 2018-04-13  7:56   ` Eli Zaretskii
       [not found]   ` <mailman.12247.1523606180.27995.help-gnu-emacs@gnu.org>
  1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2018-04-13  7:56 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Loris Bennett" <loris.bennett@fu-berlin.de>
> Date: Fri, 13 Apr 2018 08:17:45 +0200
> 
> However, being a relative newbie, having only used Emacs since the late
> '80s, I have never come across the "Minibuf menu".  What's that?

Assuming you didn't disable the menu bar, type "M-x" and look at the
menu bar: you will find a "Minibuf" item there.  Clicking it with the
mouse will show some minibuffer-related commands.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
       [not found]   ` <mailman.12247.1523606180.27995.help-gnu-emacs@gnu.org>
@ 2018-04-13  8:29     ` Loris Bennett
  2018-04-13  8:41       ` tomas
                         ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Loris Bennett @ 2018-04-13  8:29 UTC (permalink / raw)
  To: help-gnu-emacs

Eli Zaretskii <eliz@gnu.org> writes:

>> From: "Loris Bennett" <loris.bennett@fu-berlin.de>
>> Date: Fri, 13 Apr 2018 08:17:45 +0200
>> 
>> However, being a relative newbie, having only used Emacs since the late
>> '80s, I have never come across the "Minibuf menu".  What's that?
>
> Assuming you didn't disable the menu bar, type "M-x" and look at the
> menu bar: you will find a "Minibuf" item there.  Clicking it with the
> mouse will show some minibuffer-related commands.

Ah, yes, thanks.  Actually, I probably have seen that before, albeit
fairly subliminally (since I'm usually looking at the minibuffer at the
bottom of the screen while the "Minibuf" item is active at the top of
the screen).

I see that there is an menu item "Enter".  Under what circumstances
might it be advantageous to use this rather than hitting the Enter key?

Cheers,

Loris

-- 
This signature is currently under construction.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  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
  2 siblings, 1 reply; 11+ messages in thread
From: tomas @ 2018-04-13  8:41 UTC (permalink / raw)
  To: help-gnu-emacs

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Apr 13, 2018 at 10:29:47AM +0200, Loris Bennett wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: "Loris Bennett" <loris.bennett@fu-berlin.de>
> >> Date: Fri, 13 Apr 2018 08:17:45 +0200
> >> 
> >> However, being a relative newbie, having only used Emacs since the late
> >> '80s, I have never come across the "Minibuf menu".  What's that?
> >
> > Assuming you didn't disable the menu bar, type "M-x" and look at the
> > menu bar: you will find a "Minibuf" item there.  Clicking it with the
> > mouse will show some minibuffer-related commands.
> 
> Ah, yes, thanks.  Actually, I probably have seen that before, albeit
> fairly subliminally (since I'm usually looking at the minibuffer at the
> bottom of the screen while the "Minibuf" item is active at the top of
> the screen).
> 
> I see that there is an menu item "Enter".  Under what circumstances
> might it be advantageous to use this rather than hitting the Enter key?

There's a trick for that: just when you are in the minibuffer, type
C-h k ("describe-key") and then click on the menu point "enter".
You'll see that this menu entry is bound to (exit-minibuffer).

Likewise, if you "C-h k", then <ENTER>, you'll see that this is bound
to minibuffer-complete-and-exit.

Now I can't say what the exact difference is and why it is there,
but that's a way to start the research :-)

Cheers
- -- t
   (quickly running away to not fall into *that* rabbit hole ;-)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlrQbSsACgkQBcgs9XrR2kaGcACcC/76KITyqnlRReJFJRr5oGLS
uVwAnRjyQBCcX2Vn5M5JT/BLy84uLQlv
=IFwl
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-13  8:29     ` Loris Bennett
  2018-04-13  8:41       ` tomas
@ 2018-04-13  8:58       ` Eli Zaretskii
  2018-04-15 17:00       ` Gene
  2 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2018-04-13  8:58 UTC (permalink / raw)
  To: help-gnu-emacs

> From: "Loris Bennett" <loris.bennett@fu-berlin.de>
> Date: Fri, 13 Apr 2018 10:29:47 +0200
> 
> I see that there is an menu item "Enter".  Under what circumstances
> might it be advantageous to use this rather than hitting the Enter key?

That menu item invokes a command that is different from what RET
invokes, you can see that if you use "C-h c" and then click that menu
item.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-13  8:41       ` tomas
@ 2018-04-13  8:58         ` Eli Zaretskii
  0 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2018-04-13  8:58 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Fri, 13 Apr 2018 10:41:15 +0200
> From: <tomas@tuxteam.de>
> 
> There's a trick for that: just when you are in the minibuffer, type
> C-h k ("describe-key") and then click on the menu point "enter".
> You'll see that this menu entry is bound to (exit-minibuffer).
> 
> Likewise, if you "C-h k", then <ENTER>, you'll see that this is bound
> to minibuffer-complete-and-exit.
> 
> Now I can't say what the exact difference is and why it is there,
> but that's a way to start the research :-)

The completion part is the difference.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-12 19:26 Skip Montanaro
@ 2018-04-13 14:41 ` Marcin Borkowski
  0 siblings, 0 replies; 11+ messages in thread
From: Marcin Borkowski @ 2018-04-13 14:41 UTC (permalink / raw)
  To: Skip Montanaro; +Cc: Help GNU Emacs


On 2018-04-12, at 21:26, Skip Montanaro <skip.montanaro@gmail.com> wrote:

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

On a related note: yesterday I rediscovered M-n right after the command
expecting some minibuffer input (in this case, counsel-rg).

Best,

-- 
Marcin Borkowski
http://mbork.pl



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-13  8:29     ` Loris Bennett
  2018-04-13  8:41       ` tomas
  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
  2 siblings, 2 replies; 11+ messages in thread
From: Gene @ 2018-04-15 17:00 UTC (permalink / raw)
  To: help-gnu-emacs

On Friday, April 13, 2018 at 4:29:50 AM UTC-4, Loris Bennett wrote:

> Eli Zaretski  writes:
> 

>>> From: "Loris Bennett"
>>> Date: Fri, 13 Apr 2018 08:17:45 +0200
>>> 
>>> However, being a relative newbie, having only used Emacs since the late
>>> '80s, I have never come across the "Minibuf menu".  What's that?
>>
>> Assuming you didn't disable the menu bar, type "M-x" and look at the
>> menu bar: you will find a "Minibuf" item there.  Clicking it with the
>> mouse will show some minibuffer-related commands.

> (since I'm usually looking at the minibuffer at the bottom of the screen 
> while the "Minibuf" item is active at the top of the screen).

Which kinda sets one yearning to juxtapose BOTH side-by-side, one-over-the-other to facilitate noticing these two operationally related visuals, rather than having one's visual field divided by the WHOLE HEIGHT of the intervening buffer.

If I, for one, could have the minibuffer displayed at the TOP near the menu bar via a configuration option I WOULD.

It's annoying and time consuming to have to re-register one's focus back and forth from top to bottom.

How software engineers, developers, and users can manifest AWARENESS of the time wasted in removing one's hands from the keyboard -- to use a mouse or touch pad -- due to the time of re-acquiring finger positions on the keys BUT not extend this to visual re-acquisition when one is compelled to remove ones focus from something figural at the top XOR the bottom -- or NOT, having missed it entirely due to being too far out in the peripheries of one's visual field -- then having one's eyes having to make the return trip.

Hell, I don't think I'd mind having the mini-buffer appear atop the pull-down menu ... so long as the two could be juxtaposed side-by-side.
Optional socket-plug match-ups a bonus. (read supporting text below)

"Imagine ..." -- John Lennon

Imagine a minibuffer popping up beneath the menu bar.

Now imagine the ^ character being allowed in the character string one composes in the minibuffer.

Image this `^' character pointing to an item in the menu bar.

Imagine elisp code smart enough to make the correspondences between the pointed-to and referenced-from items and then `do something useful, informative, productive, or interesting'.



Just a few thoughts on Human-Computer interface design and visual ergonomics.

Cheers!



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-15 17:00       ` Gene
@ 2018-04-15 17:15         ` Eli Zaretskii
  2018-04-15 21:48         ` Skip Montanaro
  1 sibling, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2018-04-15 17:15 UTC (permalink / raw)
  To: help-gnu-emacs

> Date: Sun, 15 Apr 2018 10:00:53 -0700 (PDT)
> From: Gene <gene.sullivan@gmail.com>
> 
> Just a few thoughts on Human-Computer interface design and visual ergonomics.

Thanks.

However, IME nothing in Emacs gets done until motivated individual(s)
step(s) forward to implement the thoughts and ideas that seem worthy.
In this case, some real code changes will be needed, because the
assumption that the minibuffer is at the bottom is hard-coded into
Emacs on the C level.

Patches to allow this to be customizable will be very welcome.  I hope
someone will feel interested enough to sit down and do it.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: You learn something every day...
  2018-04-15 17:00       ` Gene
  2018-04-15 17:15         ` Eli Zaretskii
@ 2018-04-15 21:48         ` Skip Montanaro
  1 sibling, 0 replies; 11+ messages in thread
From: Skip Montanaro @ 2018-04-15 21:48 UTC (permalink / raw)
  To: Gene; +Cc: Help GNU Emacs

> If I, for one, could have the minibuffer displayed at the TOP near the menu bar via a configuration option I WOULD.

I wonder if minibuffer-frame-alist or default-frame-alist could be
coaxed into defining the layout as you desire. The default value for
all the *-frame-alist variables) is nil. A quick mess around with
minibuffer-frame-alist didn't yield any useful results. Probably need
to poke around frame.el to see how it works (and maybe frame.c).

Skip



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2018-04-15 21:48 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.12203.1523561201.27995.help-gnu-emacs@gnu.org>
2018-04-13  6:17 ` You learn something every day 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
2018-04-12 19:26 Skip Montanaro
2018-04-13 14:41 ` Marcin Borkowski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).