From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao Newsgroups: gmane.emacs.help 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 Message-ID: References: <877csvvjz2.fsf@web.de> <83o7m7lhgf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19236"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri May 26 09:22:51 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1q2Rml-0004iY-JV for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 26 May 2023 09:22:51 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q2Rm7-0006I0-2E; Fri, 26 May 2023 03:22:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q2Rm3-0006GI-Ve for help-gnu-emacs@gnu.org; Fri, 26 May 2023 03:22:08 -0400 Original-Received: from mail-ej1-x62c.google.com ([2a00:1450:4864:20::62c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q2Rm1-0002V9-Fw; Fri, 26 May 2023 03:22:06 -0400 Original-Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-96f53c06babso70262866b.3; Fri, 26 May 2023 00:22:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685085722; x=1687677722; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=m6MvmNSxBugMUDbLz1jpm3XCIt3B1DczIwknei6mc0U=; b=fLp+NcaYWniEXNAwtwG/uWPYmNiQRX8siZgEobSda8jbt0qtNeCswXuA3QZ/OH4rm/ yLnJaQaPW75ILfYl0ItiLNoZupctqTqFoDt0HpoY1hEt27iVflYOEVIxv1Td5HVhndtK KItI6t/wBS3tA2RPRtAFY0arRsx8UAHKNKOpwS59PEK9hD2SHdwas1YQ0BDl8qdc4k1w fuigchOs1L0nQ/GrFT+tgmp+yAlSwMBBZ1iKYjeP4bgE3Lhrf4EnwqEbAeWKpvr/DbAF yUhw45LCiwKK6q24UJ22HIbHnQOoDwfUap9zrgnq0RYW5amiYRx7vZdJtHzoEHn7V6qL nHoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685085722; x=1687677722; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m6MvmNSxBugMUDbLz1jpm3XCIt3B1DczIwknei6mc0U=; b=N0/qB/1ywI4UACsuMWhBH6uY7cJ+h05VyDccR4pFOzq68VylZvuIouVyq26kI6zbk9 FlgRtHKofZKIq466jvM+8WEwBB6QYT5M1qDOtasHZjLCm+Z2yylw1s79S3euvPh0wcc8 8Bj3zh/UU3mAuMqQ2alLwkvn813N/MZkOlEsV0TYb79gt3LmKrf4Tct6gQSlJLcehixP t2mODmRM6EBB/ztZPV/+lcGEwkLbH48sHrkcMGgB0QKOvxm4KC0/9E9fFYAYKSaHzrhK FYrGqedPLUw+c85mjm+t9Ystu5NNDZZwWvNih2o67bgq8wjJYyHTX7KVdVpRXnVnsjx5 d2bg== X-Gm-Message-State: AC+VfDyQUbMIV4x1waH87hOE7DlJx72uMhah9R6rTDh0DF0vV6AAV717 zumM8yzSew38hglyuRSUcWP0WcGUOMx+9B2H1o/i5uZ/LnRgtmLy X-Google-Smtp-Source: ACHHUZ5ucuJ6IDwX3iSItmEFSBxvHDXkAIV7Zxahnv+pvGauQ9Q6a2o79yvL+ZsvVBalRUMlseoWckapxC/zkHFrWjk= X-Received: by 2002:a17:907:1c03:b0:96f:d63a:9508 with SMTP id nc3-20020a1709071c0300b0096fd63a9508mr1262070ejc.33.1685085722428; Fri, 26 May 2023 00:22:02 -0700 (PDT) In-Reply-To: <83o7m7lhgf.fsf@gnu.org> Received-SPF: pass client-ip=2a00:1450:4864:20::62c; envelope-from=hongyi.zhao@gmail.com; helo=mail-ej1-x62c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:143749 Archived-At: On Fri, May 26, 2023 at 2:44=E2=80=AFPM Eli Zaretskii wrote: > > > From: Michael Heerdegen > > Date: Fri, 26 May 2023 05:40:17 +0200 > > > > Hongyi Zhao writes: > > > > > In order to execute `query-replace-regexp' on current buffer, it need= s > > > 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- (assuming you have the function key on your > keyboard). Based on my tries, the following keystroke sequence does the trick: C-x h C-S- On the other hand, `C-h k C-S- RET` reveals the following: ``` begin quote C- (translated from C-S-) runs the command end-of-buffer (found in global-map), which is an interactive byte-compiled Lisp function in =E2=80=98simple.el=E2=80=99. It is bound to C- and M->. It can also be invoked from the menu: Edit =E2=86=92 Go To =E2=86=92 Goto E= nd 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- and M->. can only select the last line when issued after C-x h. Regards, Zhao