From unknown Fri Jun 20 07:09:32 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#60717 <60717@debbugs.gnu.org> To: bug#60717 <60717@debbugs.gnu.org> Subject: Status: 28.2; Add option to preserve column after kill-whole-line Reply-To: bug#60717 <60717@debbugs.gnu.org> Date: Fri, 20 Jun 2025 14:09:32 +0000 retitle 60717 28.2; Add option to preserve column after kill-whole-line reassign 60717 emacs submitter 60717 Sean Devlin severity 60717 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 10 16:37:13 2023 Received: (at submit) by debbugs.gnu.org; 10 Jan 2023 21:37:13 +0000 Received: from localhost ([127.0.0.1]:41301 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFMIy-0004Fz-TH for submit@debbugs.gnu.org; Tue, 10 Jan 2023 16:37:13 -0500 Received: from lists.gnu.org ([209.51.188.17]:60178) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pFMIx-0004Fr-5Z for submit@debbugs.gnu.org; Tue, 10 Jan 2023 16:37:11 -0500 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 1pFMIw-0001To-N9 for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 16:37:10 -0500 Received: from mail-ot1-x32b.google.com ([2607:f8b0:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pFMIt-0008Vw-3F for bug-gnu-emacs@gnu.org; Tue, 10 Jan 2023 16:37:10 -0500 Received: by mail-ot1-x32b.google.com with SMTP id k7-20020a056830168700b0067832816190so7785278otr.1 for ; Tue, 10 Jan 2023 13:37:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20210112.gappssmtp.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=uTPghbnsJUPVNrETQdHyn/Y2Tn0Z5UVDUW1Xx00Is0U=; b=1RPaaU3e6ngOgJf5cN8Z8OGmAeor2n7fGCiL97ueiEi/pIJQjiRVCHD9TjZmebp4t7 q3eXeGwyEGZ1RzSTvZX7oev8fTZ/SBKDcqoiiRsUmtFXGsBDJPTfkNytAYDx7gIB2xlX D5QDqYigW1bhtHrRyFOiH4mPcX6PEk8xIcQOlpOHT8ssa9aBYqZh+ZZdyG7/L9H0NgSr xSFAIJpPwhQptVuUt+o+va5dkuB6jsISWVjI9iUflV80QWwtOTq1hnzlZMSCBxdnOKLo WeFvEY8rpc5lDUjr5KdEh8bF5wq+L0eMm6GvPviwiL4f9lPLuBMk0qiSyieXonfs1ten DJyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=uTPghbnsJUPVNrETQdHyn/Y2Tn0Z5UVDUW1Xx00Is0U=; b=kMkAbB3XmvilChY4vl0xFAEr3ceSZqmZdInZ85/5CyOTvXKeTaxB1ntV2QfMxcObJC 0qZF2S4Zu6LJGBJf2bTXaQK/0vsozGZw7/38GlGJujhVAOkTIaO0hZiSi4/M6rDEDQx7 FDkjsDsUDiyJnapIfNmnpD22dN9MsivB7bNgPuJC5BUnXxPl1I6ZbeuJLncuO/34NsNh vTSPJrrW0uRNNmEmsLXRbDf/Q2JUYDtftL5k5cRAe2pOUxlv20EAVIyEkOiecZbU4220 X30j5JIf1AU/isT5Y3itiqLK1kF2tG2NtoGNKbPFXK823u64ajh0OIeCfkt/lq8ypiG8 At9Q== X-Gm-Message-State: AFqh2koE85pwHx+/TmabJ7rvU+WXZPacdY6u5hf7v6ewY3esm1BlX4hS faaXc/Splv2xdJGkYeEtHAyAdR83H6trmGXt X-Google-Smtp-Source: AMrXdXuysDGssgvbBMK+wpKsuRCogdpk4+j/4tjfG5nIO/DALuOIU6JLHldi9/RFHmxfKW+qK54oZA== X-Received: by 2002:a9d:404a:0:b0:670:92b7:366b with SMTP id o10-20020a9d404a000000b0067092b7366bmr58532oti.2.1673386624852; Tue, 10 Jan 2023 13:37:04 -0800 (PST) Received: from smtpclient.apple ([2620:149:af:2020:8567:fce7:72ba:ebd1]) by smtp.gmail.com with ESMTPSA id g26-20020a9d621a000000b0066ca9001e68sm6627646otj.5.2023.01.10.13.37.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 10 Jan 2023 13:37:04 -0800 (PST) From: Sean Devlin Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51\)) Subject: 28.2; Add option to preserve column after kill-whole-line Message-Id: <9565C8F5-88B6-4007-B33A-33569A686893@toadstyle.org> Date: Tue, 10 Jan 2023 16:36:45 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3731.400.51) Received-SPF: pass client-ip=2607:f8b0:4864:20::32b; envelope-from=spd@toadstyle.org; helo=mail-ot1-x32b.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi folks, The kill-whole-line command kills the entire line surrounding point, including the trailing newline. After running this command, the point is left in the first column of the following line (which is now the current line). I think there should be an option to try to preserve the point's original column. This is somewhat similar to setting a goal column before calling next-line, except in this case the goal column is implicit based on the starting position. Here's a recipe to demonstrate the current behavior: 1. Emacs -Q 2. C-u 30 A RET 3. C-u 5 B RET 4. C-u 30 C RET 5. C-p C-p C-p C-u 15 C-f 6. M-x kill-whole-line 7. M-x kill-whole-line At the end of step 5, the point is in column 15. After both of steps 6 and 7, the point is left in column 0 of the next (now current) line. The behavior I would like to have with the hypothetical option set is: 1. We start in column 15 at the end of step 5. 2. At the end of step 6, we should be in column 5, since the new line is too short to accommodate our goal. 3. At the end of step 7, we should be in column 15, since the new line is long enough. In other words, in a sequence of consecutive kill-whole-line calls, the goal column should be set during the first call, and each subsequent call should attempt to honor that original goal. Calling some other command would clear the kill-whole-line goal column. Thanks! In GNU Emacs 28.2 System Description: macOS 13 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS TOOLKIT_SCROLL_BARS ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 50726 6790) (symbols 48 6552 1) (strings 32 18282 2240) (string-bytes 1 632208) (vectors 16 13824) (vector-slots 8 191484 11565) (floats 8 21 38) (intervals 56 202 0) (buffers 992 10))