unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Hongyi Zhao <hongyi.zhao@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: help-gnu-emacs@gnu.org
Subject: Re: Move the point to the end of current buffer with the whole buffer selected.
Date: Fri, 26 May 2023 15:21:50 +0800	[thread overview]
Message-ID: <CAGP6POJJ8j1GTpeAaJB9W6J4pAv1y16G_aG3UGZVApO=33_F0w@mail.gmail.com> (raw)
In-Reply-To: <83o7m7lhgf.fsf@gnu.org>

On Fri, May 26, 2023 at 2:44 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Michael Heerdegen <michael_heerdegen@web.de>
> > Date: Fri, 26 May 2023 05:40:17 +0200
> >
> > Hongyi Zhao <hongyi.zhao@gmail.com> writes:
> >
> > > In order to execute `query-replace-regexp' on current buffer, it needs
> > > to move the point to the end of current buffer with the whole buffer
> > > selected.
> >
> > Does it?  Doesn't moving to the beginning of the buffer (M-<) suffice?
> >
> > Anyway, there is `mark-whole-buffer' on C-x h.
>
> Or C-S-<END> (assuming you have the <END> function key on your
> keyboard).

Based on my tries, the following keystroke sequence does the trick:

C-x h
C-S-<END>

On the other hand, `C-h k C-S-<END> RET` reveals the following:

``` begin quote
C-<end> (translated from C-S-<end>) runs the command end-of-buffer
(found in global-map), which is an interactive byte-compiled Lisp
function in ‘simple.el’.

It is bound to C-<end> and M->.
It can also be invoked from the menu: Edit → Go To → Goto End of
Buffer

(end-of-buffer &optional ARG)

Move point to the end of the buffer.
With numeric arg N, put point N/10 of the way from the end.
If the buffer is narrowed, this command uses the end of the
accessible part of the buffer.

Push mark at previous position, unless either a C-u prefix
is supplied, or Transient Mark mode is enabled and the mark is active.

  This function is for interactive use only;
  in Lisp code use `(goto-char (point-max))' instead.
  Probably introduced at or before Emacs version 22.1.
``` end quote

But based on my testing, C-<end> and M->. can only select the last
line when issued after C-x h.

Regards,
Zhao



  reply	other threads:[~2023-05-26  7:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26  2:15 Move the point to the end of current buffer with the whole buffer selected Hongyi Zhao
2023-05-26  3:40 ` Michael Heerdegen
2023-05-26  6:44   ` Eli Zaretskii
2023-05-26  7:21     ` Hongyi Zhao [this message]
2023-05-26  8:21       ` Eli Zaretskii
2023-05-26  9:35         ` Hongyi Zhao
2023-05-26 10:34           ` Eli Zaretskii
2023-05-26 12:37             ` Hongyi Zhao

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='CAGP6POJJ8j1GTpeAaJB9W6J4pAv1y16G_aG3UGZVApO=33_F0w@mail.gmail.com' \
    --to=hongyi.zhao@gmail.com \
    --cc=eliz@gnu.org \
    --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.
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).