all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Move the point to the end of current buffer with the whole buffer selected.
@ 2023-05-26  2:15 Hongyi Zhao
  2023-05-26  3:40 ` Michael Heerdegen
  0 siblings, 1 reply; 8+ messages in thread
From: Hongyi Zhao @ 2023-05-26  2:15 UTC (permalink / raw)
  To: help-gnu-emacs

Hi here,

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. But I don't know how to achieve that quickly. Any tips will
be appreciated.

Regards,
Zhao
-- 
Assoc. Prof. Hongsheng Zhao <hongyi.zhao@gmail.com>
Theory and Simulation of Materials
Hebei Vocational University of Technology and Engineering
No. 473, Quannan West Street, Xindu District, Xingtai, Hebei province



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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  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
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Heerdegen @ 2023-05-26  3:40 UTC (permalink / raw)
  To: help-gnu-emacs

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.

Michael.




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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  2023-05-26  3:40 ` Michael Heerdegen
@ 2023-05-26  6:44   ` Eli Zaretskii
  2023-05-26  7:21     ` Hongyi Zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-05-26  6:44 UTC (permalink / raw)
  To: help-gnu-emacs

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



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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  2023-05-26  6:44   ` Eli Zaretskii
@ 2023-05-26  7:21     ` Hongyi Zhao
  2023-05-26  8:21       ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Hongyi Zhao @ 2023-05-26  7:21 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

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



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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  2023-05-26  7:21     ` Hongyi Zhao
@ 2023-05-26  8:21       ` Eli Zaretskii
  2023-05-26  9:35         ` Hongyi Zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-05-26  8:21 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Fri, 26 May 2023 15:21:50 +0800
> Cc: help-gnu-emacs@gnu.org
> 
> On Fri, May 26, 2023 at 2:44 PM Eli Zaretskii <eliz@gnu.org> wrote:
> >
> 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.

You are missing the "shift-select" feature, which the Shift key in
C-S-<END> activates.



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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  2023-05-26  8:21       ` Eli Zaretskii
@ 2023-05-26  9:35         ` Hongyi Zhao
  2023-05-26 10:34           ` Eli Zaretskii
  0 siblings, 1 reply; 8+ messages in thread
From: Hongyi Zhao @ 2023-05-26  9:35 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

On Fri, May 26, 2023 at 4:21 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Fri, 26 May 2023 15:21:50 +0800
> > Cc: help-gnu-emacs@gnu.org
> >
> > On Fri, May 26, 2023 at 2:44 PM Eli Zaretskii <eliz@gnu.org> wrote:
> > >
> > 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.
>
> You are missing the "shift-select" feature, which the Shift key in
> C-S-<END> activates.

How to find the detailed expansion on this feature from the built-in document?

Regards,
Zhao



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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  2023-05-26  9:35         ` Hongyi Zhao
@ 2023-05-26 10:34           ` Eli Zaretskii
  2023-05-26 12:37             ` Hongyi Zhao
  0 siblings, 1 reply; 8+ messages in thread
From: Eli Zaretskii @ 2023-05-26 10:34 UTC (permalink / raw)
  To: help-gnu-emacs

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Fri, 26 May 2023 17:35:29 +0800
> Cc: help-gnu-emacs@gnu.org
> 
> > You are missing the "shift-select" feature, which the Shift key in
> > C-S-<END> activates.
> 
> How to find the detailed expansion on this feature from the built-in document?

As usual: "C-h R emacs RET", then "i shift-select RET".



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

* Re: Move the point to the end of current buffer with the whole buffer selected.
  2023-05-26 10:34           ` Eli Zaretskii
@ 2023-05-26 12:37             ` Hongyi Zhao
  0 siblings, 0 replies; 8+ messages in thread
From: Hongyi Zhao @ 2023-05-26 12:37 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 524 bytes --]

On Fri, May 26, 2023 at 6:34 PM Eli Zaretskii <eliz@gnu.org> wrote:
>
> > From: Hongyi Zhao <hongyi.zhao@gmail.com>
> > Date: Fri, 26 May 2023 17:35:29 +0800
> > Cc: help-gnu-emacs@gnu.org
> >
> > > You are missing the "shift-select" feature, which the Shift key in
> > > C-S-<END> activates.
> >
> > How to find the detailed expansion on this feature from the built-in document?
>
> As usual: "C-h R emacs RET", then "i shift-select RET".

Thank you for the tip. Got it, as shown in the attachment.

Zhao

[-- Attachment #2: image.png --]
[-- Type: image/png, Size: 38528 bytes --]

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

end of thread, other threads:[~2023-05-26 12:37 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
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

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.