From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Newsgroups: gmane.emacs.bugs Subject: bug#49194: kill-whole-line 'plus-newline-even-if-none-in-reality Date: Wed, 23 Jun 2021 23:34:29 +0800 Message-ID: <87tuloegsa.5.fsf@jidanni.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="28534"; mail-complaints-to="usenet@ciao.gmane.io" To: 49194@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 23 19:49:10 2021 Return-path: Envelope-to: geb-bug-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 1lw6zu-0007Fq-Bp for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Jun 2021 19:49:10 +0200 Original-Received: from localhost ([::1]:51392 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lw6zt-0003vd-Cx for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 23 Jun 2021 13:49:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lw6zm-0003vU-UQ for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 13:49:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58526) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lw6zm-0003fD-N8 for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 13:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lw6zm-0000k9-MK for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 13:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 23 Jun 2021 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49194 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16244704852775 (code B ref -1); Wed, 23 Jun 2021 17:49:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 23 Jun 2021 17:48:05 +0000 Original-Received: from localhost ([127.0.0.1]:41837 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lw6yq-0000ih-PA for submit@debbugs.gnu.org; Wed, 23 Jun 2021 13:48:05 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:38894) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lw6yn-0000iF-Ne for submit@debbugs.gnu.org; Wed, 23 Jun 2021 13:48:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37814) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lw6yn-0003tJ-Fd for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 13:48:01 -0400 Original-Received: from quail.birch.relay.mailchannels.net ([23.83.209.151]:63850) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lw6yl-0002uI-2G for bug-gnu-emacs@gnu.org; Wed, 23 Jun 2021 13:48:01 -0400 X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id B1D82701ED5 for ; Wed, 23 Jun 2021 17:47:52 +0000 (UTC) Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (100-96-16-83.trex.outbound.svc.cluster.local [100.96.16.83]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4B390701A9C for ; Wed, 23 Jun 2021 17:47:52 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|jidanni@jidanni.org Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.83 (trex/6.3.3); Wed, 23 Jun 2021 17:47:52 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|jidanni@jidanni.org X-MailChannels-Auth-Id: dreamhost X-Arch-Trail: 5f400a1868f1e292_1624470472518_513074436 X-MC-Loop-Signature: 1624470472518:3715333241 X-MC-Ingress-Time: 1624470472518 Original-Received: from pdx1-sub0-mail-a17.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTP id 0440F8342E for ; Wed, 23 Jun 2021 10:47:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=jidanni.org; h=from:to :subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=jidanni.org; bh=uM5X0ia/HWn/Xtl4v4 lg7MHaOvs=; b=RvCgZQEvx2/VMIrO+qAFzpnBPMfxOttBiuWaSVbIv/PmMRsX+h 50eUtJvdv7F/BJEtgCsOsesXjnJzoL5wm/SDYyxO7lZuFB9SMrvuS6F3XqQsvZZ+ ZWnlURgfnrsLsAQEru9omhvnkHc8BQZq16EXLO9s+fV7/lshs3lC3veZA= Original-Received: from jidanni.org (220-140-1-205.dynamic-ip.hinet.net [220.140.1.205]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: jidanni@jidanni.org) by pdx1-sub0-mail-a17.g.dreamhost.com (Postfix) with ESMTPSA id 8E4AE83488 for ; Wed, 23 Jun 2021 10:47:51 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a17 Received-SPF: pass client-ip=23.83.209.151; envelope-from=jidanni@jidanni.org; helo=quail.birch.relay.mailchannels.net 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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:208908 Archived-At: The kill-whole-line variable is great, but not great enough. (info "(emacs) Killing by Lines") says: If the variable =E2=80=98kill-whole-line=E2=80=99 is non-=E2=80=98ni= l=E2=80=99, =E2=80=98C-k=E2=80=99 at the very beginning of a line kills the entire line including the following newline. This variable is normally =E2=80=98nil=E2=80=99. So setting it to non-nil allows us to get newlines, 99% of the time. I hereby propose an additional value, call it one of: 'always 'no-matter-what 'plus-newline-even-at-eof 'plus-newline-even-if-none-in-reality > See (info "(emacs) Customize Save") for require-final-newline. Bye. Wait! Who says I even want the file to end in a newline? I just want kill-whole-line to have a setting to consistently get a newline at the end, and not 99% of the time. > Then add a newline there yourself and remove it when you are finished. = Bye. Wait! The file might even be a readonly file owned by someone else. I can't just "add one there myself." > Well then copy the file first. Bye. Seems like overkill, just to kill (copy) one line. Anyway 'plus-newline-even-if-none-in-reality etc., being non-nil, would also be 99% backwards compatible too!