From unknown Sat Jun 14 23:19:24 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#35021 <35021@debbugs.gnu.org> To: bug#35021 <35021@debbugs.gnu.org> Subject: Status: M-^ (delete-indentation) doesn't work without a mark present Reply-To: bug#35021 <35021@debbugs.gnu.org> Date: Sun, 15 Jun 2025 06:19:24 +0000 retitle 35021 M-^ (delete-indentation) doesn't work without a mark present reassign 35021 emacs submitter 35021 Jon Irving severity 35021 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 27 10:19:31 2019 Received: (at submit) by debbugs.gnu.org; 27 Mar 2019 14:19:31 +0000 Received: from localhost ([127.0.0.1]:33468 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h99Os-0004ny-Qx for submit@debbugs.gnu.org; Wed, 27 Mar 2019 10:19:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47506) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h99Or-0004nm-LZ for submit@debbugs.gnu.org; Wed, 27 Mar 2019 10:19:30 -0400 Received: from lists.gnu.org ([209.51.188.17]:51906) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h99Om-0003Dt-9m for submit@debbugs.gnu.org; Wed, 27 Mar 2019 10:19:24 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33653) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h99Ok-0005vl-Ue for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 10:19:24 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_50,RCVD_IN_DNSWL_LOW, URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h99Oj-0003DJ-Nr for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 10:19:22 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:54875) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h99Oj-0003CW-4Y for bug-gnu-emacs@gnu.org; Wed, 27 Mar 2019 10:19:21 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 087C121B5A for ; Wed, 27 Mar 2019 10:19:19 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 27 Mar 2019 10:19:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lollyshouse.ca; h=date:from:to:subject:message-id:mime-version:content-type :content-transfer-encoding; s=fm2; bh=mmJiVuyRTgsxCmwu6m6ZJJpvKd J84r+xjMxrxDw8iFM=; b=Sqmqv4MwmKdvnrH+mnHYIYwdXjwKlJ4+TZ7d0fcEOt +a86EC/OC33TgFnqlUfMNERQnzg+QqbgNPr8OzzxFh9VHFq6yappV1w7Ud3Ibg24 7dEDQfj7Xqi/qRC3vMZpoeK/S7/IcYMQzUhOh8Ar4d9T8sCd98QhWA+/xfjhgOCx LhRRsQanj1v7TlSA9/OB22+rrVr6sIKzdjJ8YOrgLjHk1IEWoiHZn3JC87zt/bh0 yo+tj67P7wrJLsNxHjDpbDaEh7hFqaU7q6t+zATjTi1dtR1RhNWfQt4+SmL/gq8o MaZsqv6KRbsUCIs1XsjWtAF1HXTTV+6wbEoKl5k10m2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mmJiVu yRTgsxCmwu6m6ZJJpvKdJ84r+xjMxrxDw8iFM=; b=y3UVm3aGEVlkYd08JA3qEu jokOMyfETjXCCjds+qNgZ9CKSJx2m+fumFPI002CzOPnDkrou1HGIKBehf6JCUEY 3julY3JjENwZsf9YTJn2C/1QY5Ffwi2nWTtSYu1oEvgweR4gHcuyFLZLx12YBHUL aJrAPnvEiooZR7RBZ73r/gFVJIN0WDKVaAy1o5EIDO8ShZnBBZjvrGGm3PiHfdrR WOO0Mq3yv9kqsoiAYhQWBcvThYtUE3ubTtTZKcrdaNh64yuC0PPIo6qnOx7XH4Fe fuChf/YCmWk99z+9+TPK52rZzWt/J8wC19c87RxkPseHkmDJGeF6cI7VDofAkAfQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedvgdehkecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfggtggugfgfsehtqhertd dtredvnecuhfhrohhmpeflohhnucfkrhhvihhnghcuoehjsehlohhllhihshhhohhushgv rdgtrgeqnecukfhppeejtddrheehrdeggedrfedvnecurfgrrhgrmhepmhgrihhlfhhroh hmpehjsehlohhllhihshhhohhushgvrdgtrgenucevlhhushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (toroon0411w-lp140-01-70-55-44-32.dsl.bell.ca [70.55.44.32]) by mail.messagingengine.com (Postfix) with ESMTPA id F02CE10316 for ; Wed, 27 Mar 2019 10:19:17 -0400 (EDT) Date: Wed, 27 Mar 2019 10:19:17 -0400 From: Jon Irving To: bug-gnu-emacs@gnu.org Subject: M-^ (delete-indentation) doesn't work without a mark present Message-ID: <20190327141917.GA7614@odo.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Mutt/1.11.4 (2019-03-13) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 66.111.4.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Spam-Score: 0.7 (/) 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: -0.3 (/) I believe this is related to the following commits: b515edb985 Fix bug in delete-indentation when region is inactive 09c220a5cf Minor fixes for the last change 8fa94a1ecc If the region is active, join all the lines it spans =46rom a clean `emacs -Q` start: 1. Move point up to the bottom line of the *scratch* buffer comments 2. Type M-^ (or M-x delete-indentation) 3. Observe the following message in the minibuffer: The mark is not set now, so there is no region In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.7) of 2019-03-26 built on odo Repository revision: c8ec3108a3d0bd1955d21f40b3c0c3b36d55b20d Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 System Description: Arch Linux Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD JSON PDUMPER LCMS2 GMP Important settings: value of $LC_MESSAGES:=20 value of $LC_MONETARY: en_CA.UTF-8 value of $LC_NUMERIC: en_CA.UTF-8 value of $LC_TIME: en_CA.UTF-8 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 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 transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date 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 elec-pair mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame 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 charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 44928 6804) (symbols 48 5888 1) (strings 32 15000 1709) (string-bytes 1 494536) (vectors 16 9510) (vector-slots 8 117542 10312) (floats 8 17 47) (intervals 56 189 0) (buffers 992 11)) From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 27 12:09:25 2019 Received: (at 35021) by debbugs.gnu.org; 27 Mar 2019 16:09:25 +0000 Received: from localhost ([127.0.0.1]:33510 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9B7F-0007Pi-Ak for submit@debbugs.gnu.org; Wed, 27 Mar 2019 12:09:25 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:37007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9B7C-0007PS-On for 35021@debbugs.gnu.org; Wed, 27 Mar 2019 12:09:24 -0400 Received: by mail-ed1-f49.google.com with SMTP id v21so14527636edq.4 for <35021@debbugs.gnu.org>; Wed, 27 Mar 2019 09:09:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=osyhRWtbXZRs3ON1O3WGGGF1x1+56i6MRsVO9ZPbpAo=; b=WZtVuRQpdAC5R2MzCjdu+Z9ld9jefnlU6ov9A4nRLwwcgOaaFNLcrJ1wrx8NPWqhB3 LGAUltKpVU6NgQMDTVWjXM/x8a7rd+YIpADJ+i8nJtTvJsR0Ppc9cIWqIiYo+1XTX3Nk vGa725sMFVE1MS3JQD5ZY5aB+RdPnguabf2AYSWr3fuowatX/+MzlvVPXPkbop1mqqhx Wk0MEvkZTt7y440pUD5K3EDurIdAsohs0T76+vBX3tQqaAVHiCQ5TBpkIKp8Ia2xz3Wp kCOexay7cxWUmzWeGBB/6VeIcTfLl7//QGu1FgQU0l4G/Sf17sGRlutQq9/nff1VQ75p Z9OQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=osyhRWtbXZRs3ON1O3WGGGF1x1+56i6MRsVO9ZPbpAo=; b=N5x9hdiv9oeAfmFrRJF7LBdSXSQK6GI4lqwV6omdhaes0ghjEHcvHgNbeRNbDGJ97n ioc/078SxbUnjB9MsCBfXM4cS9O1vMQxT8XiP0Vpmus55fRX4zdH+JbCl/orvSHQlRe9 Ojna3Xsv2qlCf8Oton1Z4g6dX8jW10OKsJ+MOu4F1OczR/w44P+ZmuelsbvHY2vuJPtC oOb53ZENgazyxxlcuoApBUbmTPnZhqJQ7UESQJr2BHksWzdr+P3CZApYxzk/aXHCOTSy Sj2i3aLALVcKeIweSM54ciLxsvj699ou6Q2HXofa4+qMPaDQsMmOPzfiiL42KwyOSgfK EuKQ== X-Gm-Message-State: APjAAAXizueq/0AqZ+e5OYlvG/w+sVno4SapJweEZ1HjCMVG6Napsq1K 4o+6mVz1SgOsX3PFZxq9CFjDHw== X-Google-Smtp-Source: APXvYqwVLlRfN11p5txu2qybjuCCtDQTWDDc4+BKOcta6yIOhaeBWKbkbxIDORHVa9OwmXLgL2LsPQ== X-Received: by 2002:a17:906:18a1:: with SMTP id c1mr15582718ejf.116.1553702956980; Wed, 27 Mar 2019 09:09:16 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f786:805d:f4ab:1006]) by smtp.gmail.com with ESMTPSA id h10sm4754783ejl.51.2019.03.27.09.09.15 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 27 Mar 2019 09:09:15 -0700 (PDT) From: "Basil L. Contovounesios" To: Jon Irving Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> Date: Wed, 27 Mar 2019 16:09:14 +0000 In-Reply-To: <20190327141917.GA7614@odo.localdomain> (Jon Irving's message of "Wed, 27 Mar 2019 10:19:17 -0400") Message-ID: <874l7o47v9.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35021 Cc: Stephen Leake , 35021@debbugs.gnu.org, =?utf-8?Q?=C5=81ukasz?= Stelmach 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: -1.0 (-) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-delete-indentation-when-region-is-inactive.patch >From 80cde7b9e392e81d70dc338a4dfa4bfc12f54103 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 27 Mar 2019 15:13:25 +0000 Subject: [PATCH] Fix delete-indentation when region is inactive * lisp/simple.el (delete-indentation): Do not barf if called interactively when region is inactive. (bug#35021) * test/lisp/simple-tests.el (simple-delete-indentation-no-region): (simple-delete-indentation-inactive-region): Update commentary. Call delete-indentation interactively when testing for behavior with inactive region and region is not explicitly defined. * doc/lispref/text.texi (User-Level Deletion): Document new optional arguments of delete-indentation. --- doc/lispref/text.texi | 10 ++++++-- lisp/simple.el | 36 ++++++++++++++-------------- test/lisp/simple-tests.el | 50 +++++++++++++++++---------------------- 3 files changed, 48 insertions(+), 48 deletions(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 21c5a73f88..b430adf597 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -723,12 +723,18 @@ User-Level Deletion @end example @end deffn -@deffn Command delete-indentation &optional join-following-p +@deffn Command delete-indentation &optional join-following-p beg end This function joins the line point is on to the previous line, deleting any whitespace at the join and in some cases replacing it with one space. If @var{join-following-p} is non-@code{nil}, @code{delete-indentation} joins this line to the following line -instead. The function returns @code{nil}. +instead. Otherwise, if @var{beg} and @var{end} are non-@code{nil}, +this function joins all lines in the region they define. + +In an interactive call, @var{join-following-p} is the prefix argument, +and @var{beg} and @var{end} are, respectively, the start and end of +the region if it is active, else @code{nil}. The function returns +@code{nil}. If there is a fill prefix, and the second of the lines being joined starts with the prefix, then @code{delete-indentation} deletes the diff --git a/lisp/simple.el b/lisp/simple.el index f76f31ad14..6738df3cb9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -598,29 +598,29 @@ delete-indentation If there is a fill prefix, delete it from the beginning of this line. With prefix ARG, join the current line to the following line. -If the region is active, join all the lines in the region. (The -region is ignored if prefix argument is given.)" - (interactive "*P\nr") - (if arg (forward-line 1) - (if (use-region-p) - (goto-char end))) +When BEG and END are non-nil, join all lines in the region they +define. Interactively, BEG and END are, respectively, the start +and end of the region if it is active, else nil. (The region is +ignored if prefix ARG is given.)" + (interactive + (progn (barf-if-buffer-read-only) + (cons current-prefix-arg + (and (use-region-p) + (list (region-beginning) (region-end)))))) + (cond (arg (forward-line 1)) + (end (goto-char end))) (beginning-of-line) - (while (eq (preceding-char) ?\n) - (progn - (delete-region (point) (1- (point))) + (let ((prefix (and fill-prefix (regexp-quote fill-prefix)))) + (while (= (preceding-char) ?\n) + (delete-char -1) ;; If the second line started with the fill prefix, ;; delete the prefix. - (if (and fill-prefix - (<= (+ (point) (length fill-prefix)) (point-max)) - (string= fill-prefix - (buffer-substring (point) - (+ (point) (length fill-prefix))))) - (delete-region (point) (+ (point) (length fill-prefix)))) + (if (and prefix (looking-at prefix)) + (replace-match "" t t)) (fixup-whitespace) - (if (and (use-region-p) - beg + (if (and beg (not arg) - (< beg (point-at-bol))) + (< beg (line-beginning-position))) (beginning-of-line))))) (defalias 'join-line #'delete-indentation) ; easier to find diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index d9f059c8fc..f80578c673 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -216,36 +216,30 @@ simple-test--transpositions ;;; `delete-indentation' (ert-deftest simple-delete-indentation-no-region () - "delete-indentation works when no mark is set." - ;; interactive \r returns nil for BEG END args - (unwind-protect - (with-temp-buffer - (insert (concat "zero line \n" - "first line \n" - "second line")) - (delete-indentation) - (should (string-equal - (buffer-string) - (concat "zero line \n" - "first line second line"))) - ))) + "`delete-indentation' works when no mark is set." + (with-temp-buffer + (insert "first line \n" + "second line \n" + "third line") + (call-interactively #'delete-indentation) + (should (string-equal + (buffer-string) + (concat "first line \n" + "second line third line"))))) (ert-deftest simple-delete-indentation-inactive-region () - "delete-indentation ignores inactive region." - ;; interactive \r returns non-nil for BEG END args - (unwind-protect - (with-temp-buffer - (insert (concat "zero line \n" - "first line \n" - "second line")) - (push-mark (point-min) t t) - (deactivate-mark) - (delete-indentation) - (should (string-equal - (buffer-string) - (concat "zero line \n" - "first line second line"))) - ))) + "`delete-indentation' ignores inactive region." + (with-temp-buffer + (insert "first line \n" + "second line \n" + "third line") + (push-mark (point-min) t t) + (deactivate-mark) + (call-interactively #'delete-indentation) + (should (string-equal + (buffer-string) + (concat "first line \n" + "second line third line"))))) ;;; `delete-trailing-whitespace' -- 2.20.1 --=-=-= Content-Type: text/plain Jon Irving writes: > I believe this is related to the following commits: > > b515edb985 Fix bug in delete-indentation when region is inactive > 09c220a5cf Minor fixes for the last change > 8fa94a1ecc If the region is active, join all the lines it spans > > From a clean `emacs -Q` start: > > 1. Move point up to the bottom line of the *scratch* buffer comments > 2. Type M-^ (or M-x delete-indentation) > 3. Observe the following message in the minibuffer: > The mark is not set now, so there is no region This is because delete-indentation is currently using the 'r' interactive code, which barfs if the region is inactive. I attach a patch which fixes this and also updates the entry for delete-indentation in the Elisp manual. Is it acceptable? Stephen, what is the difference between the two tests simple-delete-indentation-no-region and simple-delete-indentation-inactive-region? Can they be merged? Thanks, -- Basil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 27 13:32:58 2019 Received: (at 35021) by debbugs.gnu.org; 27 Mar 2019 17:32:58 +0000 Received: from localhost ([127.0.0.1]:33524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9CQ5-0000w6-PV for submit@debbugs.gnu.org; Wed, 27 Mar 2019 13:32:58 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:50953) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9CQ0-0000vm-Va for 35021@debbugs.gnu.org; Wed, 27 Mar 2019 13:32:55 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 7FC24243A8; Wed, 27 Mar 2019 13:32:47 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Wed, 27 Mar 2019 13:32:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lollyshouse.ca; h=references:from:to:cc:subject:in-reply-to:date:message-id :mime-version:content-type; s=fm2; bh=h0Ls2ba5Q0cdFEVcAIIQ+sbhyP sJ78ajDnRAzRVDC7A=; b=QBkHDFEKUw+5JdjvkpqssPEVdmv0d1099Qpvax27ln 0cflWqBWLi+K2iqHABpzDWHCLnzhg/guKrkp7+hKpPvJH/etAVOw9juDphTchpGi xdDynCsLmWaZb/tCS+xf3jT95NjK3eitMK0Ml2tW2jwcEnDbi3NMlKa8XxEuXbC4 sw1stPNtZctZxRDfuh7DzQcDdx0hh4ji68hbDDir0T96RP60RgsbFO+bw7YPHKGn 2rT9gSGpknKlO5vtwxA3X49ih12Bx+ndQD2cNE6wrBDQi34rvAhGjoGY/eoMKAqY H0vvdosQRLvsSdOvVk74iHuGwhQ+zK+NLexOjxuTUthg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=h0Ls2b a5Q0cdFEVcAIIQ+sbhyPsJ78ajDnRAzRVDC7A=; b=IEWHAOvTXwHrehRgoOJ6PW M2Rzwc7BsC+vvC5TWPmy8HvXohIcZo3n9e5c7ccKdnIQumyTV/lv/znSp4ujOgb0 O9C7ezBei+lUnMh2KcOyb/ozw/pfI7mBlsPO9KNYvLyLb/OGaWylaR1rssGfGO33 vK9dCwUGSmDIpvIO1TP20Q3WgznV+mvR43OVUSQWcbt8CVX8oUUkCkzOG4U7JrA6 aPZ/mpElOiJDBhwBKABz+dECBTeSM9P63QcX93wkM9HLdZT9Xeg6N+vKgkuBK2Hd Nf1eO9zoLRd6W50nVZn4RDJbMZIDxx04IbUJbMBjFMKgYpcVyqLCw1UQXRFBB2ag == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkedvgdeljecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpehffgfhvffujgffkfggtgesthdtredttdertdenucfhrhhomheplfhonhcukfhr vhhinhhguceojheslhholhhlhihshhhouhhsvgdrtggrqeenucffohhmrghinhepjhdtnh hirdgtrgdpkhgvhigsrghsvgdrihhonecukfhppeelledrvdefjedruddvgedrieejnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehjsehlohhllhihshhhohhushgvrdgtrgenucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from localhost (cpe00fc8d073e83-cm00fc8d073e80.cpe.net.cable.rogers.com [99.237.124.67]) by mail.messagingengine.com (Postfix) with ESMTPA id 9665A10393; Wed, 27 Mar 2019 13:32:46 -0400 (EDT) References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Jon Irving To: "Basil L. Contovounesios" Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present In-reply-to: <874l7o47v9.fsf@tcd.ie> Date: Wed, 27 Mar 2019 13:32:45 -0400 Message-ID: <87lg106x4y.fsf@lollyshouse.ca> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 35021 Cc: 35021@debbugs.gnu.org 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: -1.7 (-) Hi Basil >>>>>> Basil L. Contovounesios at 2019-03-27T12:09:14-0400: > I attach a patch which fixes this and also updates the entry for > delete-indentation in the Elisp manual. Is it acceptable? I just installed this patch on a freshly updated clone of master, and can confirm the bug is no longer evident. So from my perspective this is definitely acceptable. Thanks for taking care of this so quickly! cheers, Jon -- Jonathan Irving https://j0ni.ca https://keybase.io/j0ni From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 27 14:49:48 2019 Received: (at 35021) by debbugs.gnu.org; 27 Mar 2019 18:49:48 +0000 Received: from localhost ([127.0.0.1]:33542 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9DcS-0002ip-CH for submit@debbugs.gnu.org; Wed, 27 Mar 2019 14:49:48 -0400 Received: from mail-ed1-f46.google.com ([209.85.208.46]:46132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9DcQ-0002iQ-3v for 35021@debbugs.gnu.org; Wed, 27 Mar 2019 14:49:47 -0400 Received: by mail-ed1-f46.google.com with SMTP id d1so14955982edd.13 for <35021@debbugs.gnu.org>; Wed, 27 Mar 2019 11:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=t6XNjbYMCYgU8Ftjrs2Yc5MwlIp1n5oW2K5kRnfyvE8=; b=kPployZmDSfgEbpJPcKm6JNtEjuwm6arQhMBoIJ6I0GVTVnkTeGL4XuLcAKCU8nCnN ox6h2sz4Sab5xPrbqZ5NUFs1qSovqJ3nZXNtBSpLlmKzDXZwn1NsRsZFHquZIgkG9mHi fnEMVWXKgFqjUjJ3is7UI0S3CyWTIF/l/HbBVwOf7Kro+gbF0WoHOZiSP9wwl22P9WyH QJWgDHEPvxGQSeqA/mCEITW5UcqfqvlGwFk4nlNwiQ3lCAy2yGiZRVQJ8Aw+BKE8HgRh YrBzPEN9vHKjRSr7KG675siPnctmr6SmM0/Cr+K8juWIeL/86wPJiHlLXLlvS7t57z3e e+rA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=t6XNjbYMCYgU8Ftjrs2Yc5MwlIp1n5oW2K5kRnfyvE8=; b=SC2emGpIcxk4sx71uz97AZ9F3oKGpIbGrui2Tx9qcroPRodjKyjk90LCi+Dm6VLD6S hcAmNRUi1R0aRSl9AXTCfWdQiS3c0P+1QYJNZyN1S6Syif9jNOetYla6OzdIRn4fUvnn d+6VDSFKHQYWE35W/Dv+tyAdiWpuqnNw8lfyh4eLFpd/FokjVGw4uB9BGPj08YAtHSUs T6dzL+UfZ/M1FrPZwmaEi1NSTq6aLpeLTsgEzEzeTjhMTGz4/F2EHU51Au8ObQ474NM1 +7ZBEnoVtQ8jbQbnVzlGJTVvMXNHklh5Qwwnto7VhCquKgGin3KxcihEomJGI2P3/MG0 tFUA== X-Gm-Message-State: APjAAAVpWig7TXQgjpTFEoHXC7YoN26lNJLbxfU+x8jDN93jNBsaQhrt hZjsDEwiLC4RN161xsO0mJCsAnenWnQ= X-Google-Smtp-Source: APXvYqwTZj/OdTPKsvQDPeaGdgeseCOGvQRPmbOFwY41mAT3H+hMkf3dq9cvIz9ne6AaJu/TUXiMFg== X-Received: by 2002:a50:8854:: with SMTP id c20mr24845914edc.167.1553712580043; Wed, 27 Mar 2019 11:49:40 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f786:805d:f4ab:1006]) by smtp.gmail.com with ESMTPSA id g6sm4378257edp.4.2019.03.27.11.49.39 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 27 Mar 2019 11:49:39 -0700 (PDT) From: "Basil L. Contovounesios" To: Jon Irving Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> <87lg106x4y.fsf@lollyshouse.ca> Date: Wed, 27 Mar 2019 18:49:38 +0000 In-Reply-To: <87lg106x4y.fsf@lollyshouse.ca> (Jon Irving's message of "Wed, 27 Mar 2019 13:32:45 -0400") Message-ID: <87bm1w9mpp.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35021 Cc: 35021@debbugs.gnu.org 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: -1.0 (-) Jon Irving writes: >>>>>>> Basil L. Contovounesios at 2019-03-27T12:09:14-0400: > > > I attach a patch which fixes this and also updates the entry for > > delete-indentation in the Elisp manual. Is it acceptable? > > I just installed this patch on a freshly updated clone of master, and > can confirm the bug is no longer evident. So from my perspective this is > definitely acceptable. > > Thanks for taking care of this so quickly! No worries, thanks for the report and confirming the fix! -- Basil From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 29 04:56:51 2019 Received: (at control) by debbugs.gnu.org; 29 Mar 2019 08:56:52 +0000 Received: from localhost ([127.0.0.1]:35038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9nJj-0005ww-LR for submit@debbugs.gnu.org; Fri, 29 Mar 2019 04:56:51 -0400 Received: from eggs.gnu.org ([209.51.188.92]:35639) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1h9nJi-0005wh-EM; Fri, 29 Mar 2019 04:56:50 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:53929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h9nJd-00023F-2y; Fri, 29 Mar 2019 04:56:45 -0400 Received: from [176.228.60.248] (port=4121 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1h9nJc-0003Bn-H2; Fri, 29 Mar 2019 04:56:44 -0400 Date: Fri, 29 Mar 2019 11:56:45 +0300 Message-Id: <83a7hejbxu.fsf@gnu.org> From: Eli Zaretskii To: Alex Branham In-reply-to: <87y34y7l49.fsf@gmail.com> (message from Alex Branham on Thu, 28 Mar 2019 16:19:18 -0500) Subject: Re: bug#35036: 27.0.50; delete-indentation removes all blank lines References: <87y34y7l49.fsf@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: control Cc: 35036@debbugs.gnu.org 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: -1.0 (-) merge 35036 35021 thanks > From: Alex Branham > Date: Thu, 28 Mar 2019 16:19:18 -0500 > > After 8fa94a1ecc18a41ca2738f438b3fbc817c9fdc82, delete-indentation > removes all blank lines so that a buffer: > > one > > > two| > > > with | as point, M-x delete-indentation results in: > > one two > > whereas before it would result in: > > one > > two > > This seems contrary to the documentation, which states, "Join this line > to previous and fix up whitespace at join." and also the NEWS entry, > "When there's no active region, the command works on the current and the > previous or the next line, as before." But you did have a region, albeit not active, right? Because if mark wasn't set, you'd have an error message. So I believe this is a duplicate of sorts of bug#35021, and should be fixed together with that bug. > Also, is the patch in Bug#35021 going to get applied soonish? If so I'll > hold off in order not to create conflicts... Soonish, yes. Stay tuned. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 30 06:15:25 2019 Received: (at 35021) by debbugs.gnu.org; 30 Mar 2019 10:15:25 +0000 Received: from localhost ([127.0.0.1]:36260 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAB1J-0002vX-6F for submit@debbugs.gnu.org; Sat, 30 Mar 2019 06:15:25 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33161) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAB1G-0002vH-LZ for 35021@debbugs.gnu.org; Sat, 30 Mar 2019 06:15:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:36986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAB1A-0006FV-Jq; Sat, 30 Mar 2019 06:15:16 -0400 Received: from [176.228.60.248] (port=2692 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hAB0x-0000fe-OW; Sat, 30 Mar 2019 06:15:09 -0400 Date: Sat, 30 Mar 2019 13:15:07 +0300 Message-Id: <83lg0wis7o.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" , Alex Branham In-reply-to: <874l7o47v9.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 35021 Cc: stephen_leake@stephe-leake.org, stlman@poczta.fm, 35021@debbugs.gnu.org, j@lollyshouse.ca 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: -0.3 (/) > From: "Basil L. Contovounesios" > Date: Wed, 27 Mar 2019 16:09:14 +0000 > Cc: 35021@debbugs.gnu.org, Stephen Leake , > Ɓukasz Stelmach > > > From a clean `emacs -Q` start: > > > > 1. Move point up to the bottom line of the *scratch* buffer comments > > 2. Type M-^ (or M-x delete-indentation) > > 3. Observe the following message in the minibuffer: > > The mark is not set now, so there is no region > > This is because delete-indentation is currently using the 'r' > interactive code, which barfs if the region is inactive. > > I attach a patch which fixes this and also updates the entry for > delete-indentation in the Elisp manual. Is it acceptable? Looks OK to me, please push. Alex, this will also solve your bug report, right? If now, why not? Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 30 22:42:07 2019 Received: (at 35021) by debbugs.gnu.org; 31 Mar 2019 02:42:07 +0000 Received: from localhost ([127.0.0.1]:37707 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAQQA-00033C-DC for submit@debbugs.gnu.org; Sat, 30 Mar 2019 22:42:07 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:38438) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAQQ7-00032h-Ug for 35021@debbugs.gnu.org; Sat, 30 Mar 2019 22:42:05 -0400 Received: by mail-ed1-f49.google.com with SMTP id q14so5211194edr.5 for <35021@debbugs.gnu.org>; Sat, 30 Mar 2019 19:42:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=MOssqoWImb6UwGzAGHxDJ5EP8mPzNp2HeqCinX9eDJ8=; b=V4sISVTto906VzFgRkcjaySMJjkXKMHVfchD9gXzRZGakbo4HtsyZn7U8+PxE/2sO0 cnZyGU8LYvD3yJIMmEHcJOOYZdCQLC1Skve2/pH+nSCerJRIZkGpQr1yciGBIg+PjLCd ncLiFX12CG8gtMHyzeWasVINmQ+WjrbCTnYpysiZw2p3GP5qbV82Ez9dyYp/In3dKeQ0 kPV+44zcHAnVWsC97xFwGzsajk6PsCpK+/jQuPa/VOGSCtRhqNTglhp6ZY+Y0bfaSqnV 9T2489J+y9oKq3njHW9xnmXKTwflHkFQQBpEI60vlgsuRnQ1zTUQSMf1ueBNuRIP0F+V Ojig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=MOssqoWImb6UwGzAGHxDJ5EP8mPzNp2HeqCinX9eDJ8=; b=cUtNjiLXceEfGZ8R9rlKw4ru2+8HgxhK36tyPMsRdVw0BXpiilrPl5Q7yyhEsBy79w r5KBGTAGQTrn8Um16dH3jL7AHbkhm7FY7utiSJzd/ZidchP2+Y3xbXm29PLsXnoTgc60 VbX4RDr2jp2NN9/9QIVSL7aA1i2jHABMWuoBvCdvPaQ/bgS9rqKcovBbUl5omuNAkE68 UhPJJ74+zDaN3/nqgJ5UhWlWRYjP204XpfMKBdQzt4RQ0IDE+vxJo+oYq//zpnDnyqnt OyuYqbtuWY1uWnd1bXGe93SOXQaRc757Pw9DwVbD++ci7qizmTcUX/BHq36MKeQ3eWb1 6knQ== X-Gm-Message-State: APjAAAVxwzDMrkLnC0Cw4CnXhAH6JGf+pMchx+VHJVFTUGnGjwpP4dm8 uTBxJAuPTlkA1015pXCkTcV0DA== X-Google-Smtp-Source: APXvYqz0GL6qegzI+dizf8uFE0ZtLVQ1XiRGU2Ja2GreRE7FOKRHV2+lv6Kf0Y8U5HDQKSkAWB3dNQ== X-Received: by 2002:a17:906:15db:: with SMTP id l27mr30416463ejd.242.1554000118014; Sat, 30 Mar 2019 19:41:58 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:20c2:134e:4f3a:683a]) by smtp.gmail.com with ESMTPSA id q3sm1899098edr.31.2019.03.30.19.41.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 30 Mar 2019 19:41:56 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> <83lg0wis7o.fsf@gnu.org> Date: Sun, 31 Mar 2019 03:41:47 +0100 In-Reply-To: <83lg0wis7o.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 30 Mar 2019 13:15:07 +0300") Message-ID: <87tvfju5n8.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 35021 Cc: stephen_leake@stephe-leake.org, Alex Branham , stlman@poczta.fm, 35021@debbugs.gnu.org, j@lollyshouse.ca 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: -0.3 (/) --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Fix-recently-extended-delete-indentation-behavior.patch >From f0bead89007c102754d49305c9669ffe1bcc25d0 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Wed, 27 Mar 2019 15:13:25 +0000 Subject: [PATCH] Fix recently extended delete-indentation behavior * doc/lispref/text.texi (User-Level Deletion): Document new optional arguments of delete-indentation. * lisp/simple.el (delete-indentation): Do not barf if called interactively when region is inactive. (bug#35021) Do not skip blank lines. (bug#35036) Consistently deactivate mark even when no text was changed. Handle active region spanning a single line. * test/lisp/simple-tests.el (simple-test--buffer-substrings): New convenience function. (simple-test--dummy-buffer, simple-test--transpositions): Use it. (simple-delete-indentation-no-region) (simple-delete-indentation-inactive-region): Update commentary. Call delete-indentation interactively when testing for behavior with inactive region and region is not explicitly defined. (simple-delete-indentation-blank-line) (simple-delete-indentation-boundaries) (simple-delete-indentation-region) (simple-delete-indentation-prefix): New tests. --- doc/lispref/text.texi | 10 ++- lisp/simple.el | 54 +++++++----- test/lisp/simple-tests.el | 176 ++++++++++++++++++++++++++++++-------- 3 files changed, 181 insertions(+), 59 deletions(-) diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 21c5a73f88..b430adf597 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -723,12 +723,18 @@ User-Level Deletion @end example @end deffn -@deffn Command delete-indentation &optional join-following-p +@deffn Command delete-indentation &optional join-following-p beg end This function joins the line point is on to the previous line, deleting any whitespace at the join and in some cases replacing it with one space. If @var{join-following-p} is non-@code{nil}, @code{delete-indentation} joins this line to the following line -instead. The function returns @code{nil}. +instead. Otherwise, if @var{beg} and @var{end} are non-@code{nil}, +this function joins all lines in the region they define. + +In an interactive call, @var{join-following-p} is the prefix argument, +and @var{beg} and @var{end} are, respectively, the start and end of +the region if it is active, else @code{nil}. The function returns +@code{nil}. If there is a fill prefix, and the second of the lines being joined starts with the prefix, then @code{delete-indentation} deletes the diff --git a/lisp/simple.el b/lisp/simple.el index f76f31ad14..b87c6ef052 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -598,30 +598,38 @@ delete-indentation If there is a fill prefix, delete it from the beginning of this line. With prefix ARG, join the current line to the following line. -If the region is active, join all the lines in the region. (The -region is ignored if prefix argument is given.)" - (interactive "*P\nr") - (if arg (forward-line 1) - (if (use-region-p) - (goto-char end))) - (beginning-of-line) - (while (eq (preceding-char) ?\n) - (progn - (delete-region (point) (1- (point))) - ;; If the second line started with the fill prefix, +When BEG and END are non-nil, join all lines in the region they +define. Interactively, BEG and END are, respectively, the start +and end of the region if it is active, else nil. (The region is +ignored if prefix ARG is given.)" + (interactive + (progn (barf-if-buffer-read-only) + (cons current-prefix-arg + (and (use-region-p) + (list (region-beginning) (region-end)))))) + ;; Consistently deactivate mark even when no text was changed. + (setq deactivate-mark t) + (if (and beg (not arg)) + ;; Region is active. Go to END, but only if region spans + ;; multiple lines. + (and (goto-char beg) + (> end (line-end-position)) + (goto-char end)) + ;; Region is inactive. Set a loop sentinel + ;; (subtracting 1 in order to compare less than BOB). + (setq beg (1- (line-beginning-position (and arg 2)))) + (when arg (forward-line))) + (let ((prefix (and (> (length fill-prefix) 0) + (regexp-quote fill-prefix)))) + (while (and (< beg (line-beginning-position)) + (forward-line 0) + (= (preceding-char) ?\n)) + (delete-char -1) + ;; If the appended line started with the fill prefix, ;; delete the prefix. - (if (and fill-prefix - (<= (+ (point) (length fill-prefix)) (point-max)) - (string= fill-prefix - (buffer-substring (point) - (+ (point) (length fill-prefix))))) - (delete-region (point) (+ (point) (length fill-prefix)))) - (fixup-whitespace) - (if (and (use-region-p) - beg - (not arg) - (< beg (point-at-bol))) - (beginning-of-line))))) + (if (and prefix (looking-at prefix)) + (replace-match "" t t)) + (fixup-whitespace)))) (defalias 'join-line #'delete-indentation) ; easier to find diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index d9f059c8fc..cc2feebbef 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -22,6 +22,11 @@ (require 'ert) (eval-when-compile (require 'cl-lib)) +(defun simple-test--buffer-substrings () + "Return cons of buffer substrings before and after point." + (cons (buffer-substring (point-min) (point)) + (buffer-substring (point) (point-max)))) + (defmacro simple-test--dummy-buffer (&rest body) (declare (indent 0) (debug t)) @@ -31,10 +36,7 @@ simple-test--dummy-buffer (insert "(a b") (save-excursion (insert " c d)")) ,@body - (with-no-warnings - (cons (buffer-substring (point-min) (point)) - (buffer-substring (point) (point-max)))))) - + (with-no-warnings (simple-test--buffer-substrings)))) ;;; `transpose-sexps' @@ -46,8 +48,7 @@ simple-test--transpositions (insert "(s1) (s2) (s3) (s4) (s5)") (backward-sexp 1) ,@body - (cons (buffer-substring (point-min) (point)) - (buffer-substring (point) (point-max))))) + (simple-test--buffer-substrings))) ;;; Transposition with negative args (bug#20698, bug#21885) (ert-deftest simple-transpose-subr () @@ -215,37 +216,144 @@ simple-test--transpositions ;;; `delete-indentation' + (ert-deftest simple-delete-indentation-no-region () - "delete-indentation works when no mark is set." - ;; interactive \r returns nil for BEG END args - (unwind-protect - (with-temp-buffer - (insert (concat "zero line \n" - "first line \n" - "second line")) - (delete-indentation) - (should (string-equal - (buffer-string) - (concat "zero line \n" - "first line second line"))) - ))) + "Test `delete-indentation' when no mark is set; see bug#35021." + (with-temp-buffer + (insert " first \n second \n third \n fourth ") + (should-not (mark t)) + ;; Without prefix argument. + (should-not (call-interactively #'delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '(" first \n second \n third" . " fourth "))) + (should-not (call-interactively #'delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '(" first \n second" . " third fourth "))) + ;; With prefix argument. + (goto-char (point-min)) + (let ((current-prefix-arg '(4))) + (should-not (call-interactively #'delete-indentation))) + (should (equal (simple-test--buffer-substrings) + '(" first" . " second third fourth "))))) (ert-deftest simple-delete-indentation-inactive-region () - "delete-indentation ignores inactive region." - ;; interactive \r returns non-nil for BEG END args - (unwind-protect - (with-temp-buffer - (insert (concat "zero line \n" - "first line \n" - "second line")) - (push-mark (point-min) t t) - (deactivate-mark) - (delete-indentation) - (should (string-equal - (buffer-string) - (concat "zero line \n" - "first line second line"))) - ))) + "Test `delete-indentation' with an inactive region." + (with-temp-buffer + (insert " first \n second \n third ") + (set-marker (mark-marker) (point-min)) + (should (mark t)) + (should-not (call-interactively #'delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '(" first \n second" . " third "))))) + +(ert-deftest simple-delete-indentation-blank-line () + "Test `delete-indentation' does not skip blank lines. +See bug#35036." + (with-temp-buffer + (insert "\n\n third \n \n \n sixth \n\n") + ;; Without prefix argument. + (should-not (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("\n\n third \n \n \n sixth \n" . ""))) + (should-not (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("\n\n third \n \n \n sixth" . ""))) + (should-not (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("\n\n third \n \n" . "sixth"))) + ;; With prefix argument. + (goto-char (point-min)) + (should-not (delete-indentation t)) + (should (equal (simple-test--buffer-substrings) + '("" . "\n third \n \nsixth"))) + (should-not (delete-indentation t)) + (should (equal (simple-test--buffer-substrings) + '("" . "third \n \nsixth"))) + (should-not (delete-indentation t)) + (should (equal (simple-test--buffer-substrings) + '("third" . "\nsixth"))) + (should-not (delete-indentation t)) + (should (equal (simple-test--buffer-substrings) + '("third" . " sixth"))))) + +(ert-deftest simple-delete-indentation-boundaries () + "Test `delete-indentation' motion at buffer boundaries." + (with-temp-buffer + (insert " first \n second \n third ") + ;; Stay at EOB. + (should-not (delete-indentation t)) + (should (equal (simple-test--buffer-substrings) + '(" first \n second \n third " . ""))) + ;; Stay at BOB. + (forward-line -1) + (save-restriction + (narrow-to-region (point) (line-end-position)) + (should-not (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("" . " second "))) + ;; Go to EOB. + (should-not (delete-indentation t)) + (should (equal (simple-test--buffer-substrings) + '(" second " . "")))) + ;; Go to BOB. + (end-of-line 0) + (should-not (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("" . " first \n second \n third "))))) + +(ert-deftest simple-delete-indentation-region () + "Test `delete-indentation' with an active region." + (with-temp-buffer + ;; Empty region. + (insert " first ") + (should-not (delete-indentation nil (point) (point))) + (should (equal (simple-test--buffer-substrings) + '(" first " . ""))) + ;; Single line. + (should-not (delete-indentation + nil (line-beginning-position) (1- (point)))) + (should (equal (simple-test--buffer-substrings) + '("" . " first "))) + (should-not (delete-indentation nil (1+ (point)) (line-end-position))) + (should (equal (simple-test--buffer-substrings) + '(" " . "first "))) + (should-not (delete-indentation + nil (line-beginning-position) (line-end-position))) + (should (equal (simple-test--buffer-substrings) + '("" . " first "))) + ;; Multiple lines. + (goto-char (point-max)) + (insert "\n second \n third \n fourth ") + (goto-char (point-min)) + (should-not (delete-indentation + nil (line-end-position) (line-beginning-position 2))) + (should (equal (simple-test--buffer-substrings) + '(" first" . " second \n third \n fourth "))) + (should-not (delete-indentation + nil (point) (1+ (line-beginning-position 2)))) + (should (equal (simple-test--buffer-substrings) + '(" first second" . " third \n fourth "))) + ;; Prefix argument overrides region. + (should-not (delete-indentation t (point-min) (point))) + (should (equal (simple-test--buffer-substrings) + '(" first second third" . " fourth "))))) + +(ert-deftest simple-delete-indentation-prefix () + "Test `delete-indentation' with a fill prefix." + (with-temp-buffer + (insert "> first \n> second \n> third \n> fourth ") + (let ((fill-prefix "")) + (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("> first \n> second \n> third" . " > fourth "))) + (let ((fill-prefix "<")) + (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("> first \n> second" . " > third > fourth "))) + (let ((fill-prefix ">")) + (delete-indentation)) + (should (equal (simple-test--buffer-substrings) + '("> first" . " second > third > fourth "))))) ;;; `delete-trailing-whitespace' -- 2.20.1 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Date: Wed, 27 Mar 2019 16:09:14 +0000 >> Cc: 35021@debbugs.gnu.org, Stephen Leake , >> =C5=81ukasz Stelmach >>=20 >> > From a clean `emacs -Q` start: >> > >> > 1. Move point up to the bottom line of the *scratch* buffer comments >> > 2. Type M-^ (or M-x delete-indentation) >> > 3. Observe the following message in the minibuffer: >> > The mark is not set now, so there is no region >>=20 >> This is because delete-indentation is currently using the 'r' >> interactive code, which barfs if the region is inactive. >>=20 >> I attach a patch which fixes this and also updates the entry for >> delete-indentation in the Elisp manual. Is it acceptable? > > Looks OK to me, please push. Thanks, but my last patch only fixed the bug with the interactive spec, and I have since discovered and fixed a few more edge-cases (including that reported by Alex in bug#35036). I attach the updated patch. Can I push this one instead? > Alex, this will also solve your bug report, right? If now, why not? My last patch didn't address bug#35036. Whereas bug#35021 is caused by a wrong interactive spec, bug#35036 is caused by a wrong loop condition. The attached patch should fix both issues (and a couple more). Thanks, --=20 Basil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 10:23:48 2019 Received: (at 35021) by debbugs.gnu.org; 31 Mar 2019 14:23:48 +0000 Received: from localhost ([127.0.0.1]:38376 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAbND-0007eS-VE for submit@debbugs.gnu.org; Sun, 31 Mar 2019 10:23:48 -0400 Received: from mail-oi1-f179.google.com ([209.85.167.179]:34457) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAbNB-0007eE-GL for 35021@debbugs.gnu.org; Sun, 31 Mar 2019 10:23:46 -0400 Received: by mail-oi1-f179.google.com with SMTP id v10so5219596oib.1 for <35021@debbugs.gnu.org>; Sun, 31 Mar 2019 07:23:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=rujrOm14cfu5MPhVfQingQlUedirEUOTDR+S5g0bkxw=; b=XaYTvL1yRjndaB/pfhHU7kxioCL4XeD+m00+fRJvktqH62XsADFx7DpFQjzkdEJjNM q+tLlRNHMPuqnqwhCg/UvPiXjx0CiGe2eWY1iHK2ur56kcCGupoFcp3J6MyDAm9+AT90 rW87l7gW/jPZs1B2PcgXs2oEidmaCYZuwuLp8K6Tavl5QLYEoQQQ5GAeIa0NxnFCR5x2 DrYmPodN95ya9jFxXy7U0fPkaBZudKVmj20jpAMAljbtvmFchqKtaNlgXII5yo6WeWCY ZjAoS5anMKTh53yXhqjvQ9WWLfXrDnc0gjzY1WxLMPzapv4zmGuIcR8poFCn6oBbUdmy g+2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=rujrOm14cfu5MPhVfQingQlUedirEUOTDR+S5g0bkxw=; b=dYLM63FMYr09/QxZgpv44v6izki/6iZyFsDI989bue1bWi0jPFvw8kkzcYbCN0fvJp VolJUEg4Y0V5kOR6UbC3WgFnV+j3P4tKuz1Rg8nDDlCgy2jNfaQEe0zO1JpLvO9Jtdxk Le+VWXU4jZ5jAs8MYGCEQ4kDL6FYq/4oJPp4vLM1QkMDOt6ZRRNEm0YKK/vAZUONt26t 1ObJg57PzkgCyQ7Xh0UDlFeYs74AA4kkrd9H1shjBZO13K17urGJS6aZ+rk+gs4d77Jj aPn+jC6fosy7MCoTBzdMkLbKo9TG6XE7HQo6SwG8bSwejiT/jXTZqfsvpnYufs7rcAqB CPcg== X-Gm-Message-State: APjAAAXQSuTVQm/NfoqLigWT4CcPUitCadJp4yqvectLzEXElAlgDkPm KeG+QF/SqbNe6boRKbiudiwY5x60 X-Google-Smtp-Source: APXvYqzcunOkLL8M+imwJZcscTvftj6TUb7ngucdkPmu3Xa7Vc2Qi410NKu2fBZmw/qmDy9wucp3tQ== X-Received: by 2002:aca:43d5:: with SMTP id q204mr5030780oia.13.1554042219670; Sun, 31 Mar 2019 07:23:39 -0700 (PDT) Received: from mars (cpe-70-114-192-208.austin.res.rr.com. [70.114.192.208]) by smtp.gmail.com with ESMTPSA id y129sm2936766oig.27.2019.03.31.07.23.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 31 Mar 2019 07:23:38 -0700 (PDT) References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> <83lg0wis7o.fsf@gnu.org> <87tvfju5n8.fsf@tcd.ie> User-agent: mu4e 1.1.0; emacs 27.0.50 From: Alex Branham To: "Basil L. Contovounesios" Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present In-reply-to: <87tvfju5n8.fsf@tcd.ie> Date: Sun, 31 Mar 2019 09:23:36 -0500 Message-ID: <87wokff7h3.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35021 Cc: Eli Zaretskii , 35021@debbugs.gnu.org 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: -1.0 (-) On Sat 30 Mar 2019 at 21:41, Basil L. Contovounesios wrote: > The attached patch should fix both issues (and a couple more). This does indeed seem to fix my issue, thanks for working on it! Alex From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 11:05:43 2019 Received: (at 35021) by debbugs.gnu.org; 31 Mar 2019 15:05:44 +0000 Received: from localhost ([127.0.0.1]:38403 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAc1j-0004Ic-Ss for submit@debbugs.gnu.org; Sun, 31 Mar 2019 11:05:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:38962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAc1h-0004IN-Ve for 35021@debbugs.gnu.org; Sun, 31 Mar 2019 11:05:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:57166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hAc1b-0007do-Br; Sun, 31 Mar 2019 11:05:31 -0400 Received: from [176.228.60.248] (port=2574 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hAc1Z-0007l6-LK; Sun, 31 Mar 2019 11:05:30 -0400 Date: Sun, 31 Mar 2019 18:05:36 +0300 Message-Id: <83zhpbgk3j.fsf@gnu.org> From: Eli Zaretskii To: "Basil L. Contovounesios" In-reply-to: <87tvfju5n8.fsf@tcd.ie> (contovob@tcd.ie) Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> <83lg0wis7o.fsf@gnu.org> <87tvfju5n8.fsf@tcd.ie> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 35021 Cc: stephen_leake@stephe-leake.org, alex.branham@gmail.com, stlman@poczta.fm, 35021@debbugs.gnu.org, j@lollyshouse.ca 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: -0.3 (/) > From: "Basil L. Contovounesios" > Cc: Alex Branham , , <35021@debbugs.gnu.org>, , > Date: Sun, 31 Mar 2019 03:41:47 +0100 > > > Looks OK to me, please push. > > Thanks, but my last patch only fixed the bug with the interactive spec, > and I have since discovered and fixed a few more edge-cases (including > that reported by Alex in bug#35036). > > I attach the updated patch. Can I push this one instead? Yes, this LGTM as well. > > Alex, this will also solve your bug report, right? If now, why not? > > My last patch didn't address bug#35036. Whereas bug#35021 is caused by > a wrong interactive spec, bug#35036 is caused by a wrong loop condition. > > The attached patch should fix both issues (and a couple more). Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 12:42:56 2019 Received: (at 35021-done) by debbugs.gnu.org; 31 Mar 2019 16:42:57 +0000 Received: from localhost ([127.0.0.1]:38443 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAdXp-0006bV-Ep for submit@debbugs.gnu.org; Sun, 31 Mar 2019 12:42:56 -0400 Received: from mail-ed1-f42.google.com ([209.85.208.42]:46630) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAdXn-0006bH-CD for 35021-done@debbugs.gnu.org; Sun, 31 Mar 2019 12:42:51 -0400 Received: by mail-ed1-f42.google.com with SMTP id d1so6023031edd.13 for <35021-done@debbugs.gnu.org>; Sun, 31 Mar 2019 09:42:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=GdsuKi1MjwndAOoN1yd7izE4Nl9QuIPZXon7KBar8nM=; b=YCGdgg0bdAT0+3BnOla2hvvoNwfhYbBliBQbmtmjm3uGaS9cdi2RwxbO5wGETwTTD2 wHeTBFtAMxbSNYtnVEgj6voR84VXrGwCrVMLkcKQepNftdXUyuuJlbPH5aZGLNjHsesJ 9BoSbnAZB2JtDV9jFSgKgSc1b+Gaho5av3wmasR7Xvb2fUAWxFeRpPu+k2itM9uM+2yU ja+GmtlFzqnver2BeOHY8ElVaWAUelXD/ppCcKCjrUnxEUr3W7PHqF69/3+GUt7+wvdq Y9M91jrSDOWPuTwchXWPgDF+wO4Sxt0KrOxj3zm9+wKEjdH1KGbrDpGZvz0CQbJH50Yc CdGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=GdsuKi1MjwndAOoN1yd7izE4Nl9QuIPZXon7KBar8nM=; b=bJBRf9LiM/3Gfu4XvhOU3LykrMDj5Tlho6Vh+eZM5TI1MVICB/YBqD2Y6cxtuZYQda QMpf2ttBolwDgUH6s1RE/HsDCvaDqjybB5Inup7gYI8tgXaqSLdtf/5MYa6K7lnzee7V m3HETh7m/YE0NJ6CVocB2UYrgiz9XBw/DHe1CsIK2aT5/PV68pJE279mdcgZaXZJev+m 2glmMK9fPKTGL9+X1diuWMqUnptaeCkOEOGTKlvC2ElDLzzOpyhF03l9BCeo+cgPn7K9 ccx4bmtH26NFGYmElTRCgu+oaMKRuWuEvOLJBOgx/Gm0q5Q9HKEg5ae1L9noiM45QPLx KWvg== X-Gm-Message-State: APjAAAX+c9ElZhCnM6g/IAnGFQaX8aE5WDKT/VQoLoRH7v6q1Rx8+ISw NkkFbk9jsivJIpGdKw0ZT5rkHw== X-Google-Smtp-Source: APXvYqxUmDvVGpp5yO2lWyxjJqEGubOEmeHnVBJYpIgjZaiYUtTMPlHT97lJ2nFV7o5eqyiassaXFA== X-Received: by 2002:a17:906:1ed7:: with SMTP id m23mr24422177ejj.198.1554050565469; Sun, 31 Mar 2019 09:42:45 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f786:805d:f4ab:1006]) by smtp.gmail.com with ESMTPSA id l18sm1595462edc.17.2019.03.31.09.42.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 31 Mar 2019 09:42:44 -0700 (PDT) From: "Basil L. Contovounesios" To: Eli Zaretskii Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> <83lg0wis7o.fsf@gnu.org> <87tvfju5n8.fsf@tcd.ie> <83zhpbgk3j.fsf@gnu.org> Date: Sun, 31 Mar 2019 17:42:43 +0100 In-Reply-To: <83zhpbgk3j.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 31 Mar 2019 18:05:36 +0300") Message-ID: <87mulb8070.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 35021-done Cc: stephen_leake@stephe-leake.org, alex.branham@gmail.com, stlman@poczta.fm, 35021-done@debbugs.gnu.org, j@lollyshouse.ca 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: -0.3 (/) Eli Zaretskii writes: >> From: "Basil L. Contovounesios" >> Cc: Alex Branham , , <35021@debbugs.gnu.org>, , >> Date: Sun, 31 Mar 2019 03:41:47 +0100 >> >> > Looks OK to me, please push. >> >> Thanks, but my last patch only fixed the bug with the interactive spec, >> and I have since discovered and fixed a few more edge-cases (including >> that reported by Alex in bug#35036). >> >> I attach the updated patch. Can I push this one instead? > > Yes, this LGTM as well. Thanks, I pushed to master and am thus closing this report. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 31 12:43:54 2019 Received: (at 35021) by debbugs.gnu.org; 31 Mar 2019 16:43:54 +0000 Received: from localhost ([127.0.0.1]:38453 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAdYn-0006di-Vh for submit@debbugs.gnu.org; Sun, 31 Mar 2019 12:43:54 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:35354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hAdYl-0006dU-OO for 35021@debbugs.gnu.org; Sun, 31 Mar 2019 12:43:52 -0400 Received: by mail-ed1-f48.google.com with SMTP id s39so6083868edb.2 for <35021@debbugs.gnu.org>; Sun, 31 Mar 2019 09:43:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd-ie.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=fugzh2iEIDkypARMWPyhyIGW5aGOskm/bt8+40DEL1o=; b=BNeHnTjcvPKttBonskHySDT5O2WTwcpC2SgXktI12QWbi3Zhbda4Ez8vnfzM0k240G duZYqLzyTKameVXjdchejjWO8zlC5G16tK69sY/H02uRON1BuhsWWrGPGu6susviYD/M JgGHhdTTEUZ4AJLaKEiNKa8dtcdisK84txDQX6NnBX5EWDtp8Scog5kBETs6kS50SHWb idnKfd4Vg2MnXEJfa5Fvw5D4oePArkTuJ98kzPD9Nlm7agtpguFIwKaTa9r6tz63+C4P evbYq5q/X1B9eyBhxxbAfqdqa7Vb5RTh2cLF19LFJ/WrQ0dqxrgbELZAtcL2xhXTSP8a 3yfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=fugzh2iEIDkypARMWPyhyIGW5aGOskm/bt8+40DEL1o=; b=PfdwkL5l2dRuoUVjPeQSnnLcx1x6lIGdQa/H0BzFRSDjYZrC1PCtiWS7o9QarKgayC zn8XYTcNky1ruPGko31JY6IMKUGepzuRPzaKfW8S8EWSvqJ31dQfBT7LirKEKri0Aeuy hXiMV1G77y1d185644K9rf4Hg7bZLYlhIiXEW0n5szX0MgsmubhyKzjyAjkQD4SGWTSz dR2nRjx71fO9kosvUoxnxmQNvaN9TEir7tOacyKSpNfOXADnhSagjywF0zPVQ4oT8krE WhmQr5HliV8WEsWnSiJ6AiQJvVHhs+hzHO8m07IPpx5qTYPssL9cEPgP2dd/jhjgjLHF IDQA== X-Gm-Message-State: APjAAAVAunKQlP4t4vHQItJABBRnOmvrqksItHSCFr8hRwFxc9wxoziu f993sMVhuXW9fl8w413fa+fx3g== X-Google-Smtp-Source: APXvYqyrZ/J1hkKSkiZ9dLIPSF2egMCg/HL0ikb06ziSK4P6UgneVn9Zb3nZSkvHkQa9FqMr5TEEUA== X-Received: by 2002:a50:91d3:: with SMTP id h19mr40365102eda.218.1554050626020; Sun, 31 Mar 2019 09:43:46 -0700 (PDT) Received: from localhost ([2a02:8084:20e2:c380:f786:805d:f4ab:1006]) by smtp.gmail.com with ESMTPSA id l44sm2459180edb.37.2019.03.31.09.43.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sun, 31 Mar 2019 09:43:45 -0700 (PDT) From: "Basil L. Contovounesios" To: Alex Branham Subject: Re: bug#35021: M-^ (delete-indentation) doesn't work without a mark present References: <20190327141917.GA7614@odo.localdomain> <874l7o47v9.fsf@tcd.ie> <83lg0wis7o.fsf@gnu.org> <87tvfju5n8.fsf@tcd.ie> <87wokff7h3.fsf@gmail.com> Date: Sun, 31 Mar 2019 17:43:44 +0100 In-Reply-To: <87wokff7h3.fsf@gmail.com> (Alex Branham's message of "Sun, 31 Mar 2019 09:23:36 -0500") Message-ID: <87k1gf805b.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 35021 Cc: Eli Zaretskii , 35021@debbugs.gnu.org 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: -1.0 (-) Alex Branham writes: > On Sat 30 Mar 2019 at 21:41, Basil L. Contovounesios wrote: > >> The attached patch should fix both issues (and a couple more). > > This does indeed seem to fix my issue, thanks for working on it! Thanks for reporting and testing! -- Basil From unknown Sat Jun 14 23:19:24 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 29 Apr 2019 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator