From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 12:41:56 2020 Received: (at submit) by debbugs.gnu.org; 18 Jun 2020 16:41:56 +0000 Received: from localhost ([127.0.0.1]:54208 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlxbw-0002P0-Aj for submit@debbugs.gnu.org; Thu, 18 Jun 2020 12:41:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:43112) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlxbs-0002Oq-He for submit@debbugs.gnu.org; Thu, 18 Jun 2020 12:41:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:52904) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlxbr-0000G9-Jw for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2020 12:41:51 -0400 Received: from mail-ot1-x32f.google.com ([2607:f8b0:4864:20::32f]:36431) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlxbp-0004PW-BW for bug-gnu-emacs@gnu.org; Thu, 18 Jun 2020 12:41:51 -0400 Received: by mail-ot1-x32f.google.com with SMTP id 97so5045327otg.3 for ; Thu, 18 Jun 2020 09:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=oc0MiIHqbXqGtMnEmNYz11lVQRQ0aTo48xfRZqF04JQ=; b=VGXzf2AEGFMYtgzQWylnkTOyCxsgRoDKy3M8wB+h2/awXGS6b8Wz1sSiKdu65vjVuE 5bXu6K3yeuaBcw03n03x+8QrmJWN08s32c4q41zyNkQZNzPDDpfxE7boPzXSujaoPGy1 5I29QzWvxH4VrMGMNzQFaogwAbrZyFjn1JrMRHwtJNkWk4j5IfCGlzg0M76+0ffIAYgy yXaV8bWCduy60zofe3JmXd9cC02sx0nFJbfwqFfoUnPGRpSe56DTjCAhQmIZbJKkuOoV KJyzV9Hg9R6OlzS/QJlzbPuXqFbr6v1C66FD5WqRlmzeIuRFly2tpMEIRWavqpLD87Uk TEUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=oc0MiIHqbXqGtMnEmNYz11lVQRQ0aTo48xfRZqF04JQ=; b=q+egktlNOGg93aWMnZiA09aJQQPyNfM8PtPnK0FCpQHqrt391Ahuc0L/zK9TTkUWOF V6tbJv16bzFx7SPsOSFPeWRyR+BKQLXliSUVi/uK7ng9m4tyjqZmVmBhqzrGrK1p5vMf X3NOX8A0OsaVWa6dSC19DaEr7//rJIsUbbZ5SBaRxIaLgHJUEDhw2gVzhNBg+JsHnSOW dkxOcEVoc0fQqgAQmiQOHnittBfTBwCe8KZBT17hEUpoV7nT1jAKavbabgxw30wQWowx n97v8EqwkPOaSnyN50ACudb+ZXFFLDIR6WsJTGHvhB9/YtOlIxbLiwOhe/JIeqVUvN5C dZXQ== X-Gm-Message-State: AOAM531BUJepeXKyO1vbS0Fmx9uwTbLEE2RNgz/wehRz58ohApnVYY6u +plAsPqqfO7WE98Y3ZorUQi3aoZ5bKq5YKYwVvvlyDz0 X-Google-Smtp-Source: ABdhPJw69xQtqVNNDK1cdPYmXqXu+x2KbCqBbdfVs3+b7E81eQ6PAYlkV77VakeLGSq56WeEy9EBjTG/gtRYtisgLKE= X-Received: by 2002:a05:6830:3104:: with SMTP id b4mr4396386ots.192.1592498506365; Thu, 18 Jun 2020 09:41:46 -0700 (PDT) MIME-Version: 1.0 From: Richard Copley Date: Thu, 18 Jun 2020 17:41:19 +0100 Message-ID: Subject: reverse-region no longer works To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::32f; envelope-from=rcopley@gmail.com; helo=mail-ot1-x32f.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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 autolearn=_AUTOLEARN X-Spam_action: no action 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: -2.3 (--) Recipe: Insert text in a buffer: abc def ghi Position the mark before the 'a' and point before the 'g'. Do 'M-x reverse-region'. An error is signalled, 'There are no full lines in the region'. See #39376. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 13:42:50 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 17:42:51 +0000 Received: from localhost ([127.0.0.1]:54320 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlyYs-0006BZ-O5 for submit@debbugs.gnu.org; Thu, 18 Jun 2020 13:42:50 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57418) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlyYr-0006BN-MH for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 13:42:49 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:44678) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlyYl-00085o-Qt; Thu, 18 Jun 2020 13:42:44 -0400 Received: from [176.228.60.248] (port=2069 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jlyYk-0004kj-IJ; Thu, 18 Jun 2020 13:42:43 -0400 Date: Thu, 18 Jun 2020 20:42:28 +0300 Message-Id: <83lfkkz2wr.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-Reply-To: (message from Richard Copley on Thu, 18 Jun 2020 17:41:19 +0100) Subject: Re: bug#41934: reverse-region no longer works References: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41934 Cc: 41934@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: -3.3 (---) > From: Richard Copley > Date: Thu, 18 Jun 2020 17:41:19 +0100 > > Insert text in a buffer: > > abc > def > ghi > > Position the mark before the 'a' and point before the 'g'. > Do 'M-x reverse-region'. > > An error is signalled, 'There are no full lines in the region'. Thanks. Does the patch below look good? diff --git a/lisp/sort.el b/lisp/sort.el index de0e1b9..6640c8f 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -554,8 +554,8 @@ reverse-region (if (> beg end) (let (mid) (setq mid end end beg beg mid))) (save-excursion - (when (or (< (line-beginning-position) beg) - (< end (line-end-position))) + (when (< (- end beg) + (- (line-end-position) (line-beginning-position))) (user-error "There are no full lines in the region")) ;; Put beg at the start of a line and end and the end of one -- ;; the largest possible region which fits this criteria. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 13:53:22 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 17:53:22 +0000 Received: from localhost ([127.0.0.1]:54345 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlyj4-0006SE-45 for submit@debbugs.gnu.org; Thu, 18 Jun 2020 13:53:22 -0400 Received: from mail-ot1-f50.google.com ([209.85.210.50]:41984) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlyj2-0006S1-Dp for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 13:53:20 -0400 Received: by mail-ot1-f50.google.com with SMTP id t6so5211724otk.9 for <41934@debbugs.gnu.org>; Thu, 18 Jun 2020 10:53:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Wa6/0FOt1HqB6BfxDjh5xYfvrqQrhIbI9yOMgemacUM=; b=J2l31dLTsW003GAAa0x15IbcbsZwL9vx4xRRAj2+u+cI96DX/7Rtgl+1ONy6qxk/2L fbjKWLsXlpeJsJmGOz7YKeGjggzczGO8U72+r7ZhVr69KWhqJpkvFy4GAgC2oYcVwm1T IzzMl7maxFjKPNZR2E8BFXAbRCjHobX/T/814KYRcE7sazYq/Kj8ee+ZkesDoUYrllv8 AOZzPdL/dfFMRw3a0BVtdiGHWWw+beCZCB0RuZJqU/f05p0KNxHRyCvfqdGfQ2NV6HpK vUnp7v5wcKNhAsHdxzJHCAyqim6CYw/p1NQL/rytC2Oi9FnTvS+Lop2wvktLEnBpUZOU 5GQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Wa6/0FOt1HqB6BfxDjh5xYfvrqQrhIbI9yOMgemacUM=; b=Y6sDXUzqaZXeEoY1tUiCPtI67o6aY6+/Q8MD0B2AN4P31xxTFfyNRVW3lQD9QNbLwH LETh1EZTfgR/ZlRJLvcJakEx/Fr9PeXSi2biJ7uM5qUkiNyV/is0cJ115hmCbb66eXHB tjJG3+g7sr+WnPtyP+IIiU1tKix2fL0NRecb3kdIaBju5QbPm7xbBzrWOV/qYW2GI920 tyPwQztbRFzxalB3oxkHdNjv2gDK2njYkqY216nhZoSynnOEY0tcYxOZR8qQdlx5sPRA OB4kTGVvU9FCfceiUSPCDFv83pTKVwTtm50QgO4V0H2cZmKfFLBJ4S9tiFR6Pt0zV75r t9Kw== X-Gm-Message-State: AOAM531dPIwV5+lrLnTqLVEaqbdJVo2n5+slGX9YYbSFO5o6OJzXzHzp CFhKcgs1P1uImskDo0wV4dMPBa9A4PaUVEHJBcY= X-Google-Smtp-Source: ABdhPJzEVZi7Jox85Km8/Zw5CfLXYB/tVi4YC2EZOyu2hste9jXiHltQPvcuQfydEwy4B4wCryWDuHcKCYfoOSlALBc= X-Received: by 2002:a05:6830:3104:: with SMTP id b4mr4696051ots.192.1592502794690; Thu, 18 Jun 2020 10:53:14 -0700 (PDT) MIME-Version: 1.0 References: <83lfkkz2wr.fsf@gnu.org> In-Reply-To: <83lfkkz2wr.fsf@gnu.org> From: Richard Copley Date: Thu, 18 Jun 2020 18:52:48 +0100 Message-ID: Subject: Re: bug#41934: reverse-region no longer works To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41934 Cc: 41934@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 Thu, 18 Jun 2020 at 18:42, Eli Zaretskii wrote: > diff --git a/lisp/sort.el b/lisp/sort.el > index de0e1b9..6640c8f 100644 > --- a/lisp/sort.el > +++ b/lisp/sort.el > @@ -554,8 +554,8 @@ reverse-region > (if (> beg end) > (let (mid) (setq mid end end beg beg mid))) > (save-excursion > - (when (or (< (line-beginning-position) beg) > - (< end (line-end-position))) > + (when (< (- end beg) > + (- (line-end-position) (line-beginning-position))) > (user-error "There are no full lines in the region")) > ;; Put beg at the start of a line and end and the end of one -- > ;; the largest possible region which fits this criteria. Thanks, No, that fails on this example: [mark]abc def [point]abcdefghi From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 13:59:56 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 17:59:56 +0000 Received: from localhost ([127.0.0.1]:54349 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlypP-0006bW-Pe for submit@debbugs.gnu.org; Thu, 18 Jun 2020 13:59:56 -0400 Received: from mail-oi1-f171.google.com ([209.85.167.171]:37292) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlypN-0006bI-A1 for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 13:59:54 -0400 Received: by mail-oi1-f171.google.com with SMTP id a3so5910909oid.4 for <41934@debbugs.gnu.org>; Thu, 18 Jun 2020 10:59:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=xPNmThfehWpYRCU0MsDcmcXs81cQl0ZZ46UnyC83xOc=; b=Y1lwo94gCTzBHKq6n8UiCXND68LUiB+MCE5Nvl8mV0EgGpX2V33b/M4ct6rKra4SJf SKUMWw6LxTfBpHjSoPe96QqWPI4Wtjh0THUSFfmSlwQih0PA+c4LQ+5s55OIPE+sk7Ie vmN3LUgL0rgu5pBwZtku0ftn8Hihm/ujfxfK5H5+6HyxcB4x14VwPjLcB4Hwp//eXHbt n4mCZP3Y/BeS6frLB1d1vEZEKcCpQJtuxwB/7ROIWXRWGXBJCEi3kTk56PWP+xM9V1Mc upLWqqtRBJ18iBJ7P25TmWbAue0GTPJfukiuaLlRoYp6EaaqIVfvSA33FqyHwTj1aZcS H0Fg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xPNmThfehWpYRCU0MsDcmcXs81cQl0ZZ46UnyC83xOc=; b=XIIhE9BRfCVlKJtE/z+Y/h4Kok1XPgZlUw9AUgCj7iSpgFSgBcx1aihE25k/fNTJuw ufLet/BNq3YUbvLdM7xjfQIKEpvbyRnAcpZV4+UN7DNo8C9rfxlSE6gH7VwAf2dngfBL +RTIDYBpDYvrg19nYBDjrC9dWFBSAKqFHWSLb6dfI5Yt6Fv8h7+4gwSC1SwXD3IC8rQU VxjKjFVoW6jgAVeKzai74y1/p3PZgfkrZjGXY24aBvzgxGv6OC1z7LaB+099c2Zp5Z7d 8feIzhD4C9R6oYF4MUE5/IJ0u3dgoKDWG6eCXsk2vFdG+hSGZkKGIExlzZJrB46Wj1xK vJJg== X-Gm-Message-State: AOAM531C+tdh3s0d5HKCT5vrXyaNzuAVj8/+JJ00li6XxDO3c9vZ/+Ld MCWdz4zytvff968bnIe6tKlt6AigiUzCmIVBUQQ7lpPN X-Google-Smtp-Source: ABdhPJxDK+Fbu+ynH+anubQiGtoqgXkMVRF7BL5hB11QOCcKcQ3nE6JRs92jvZBeNoxGqyqR378lMC+H0QaWjb9PrB0= X-Received: by 2002:aca:f255:: with SMTP id q82mr3863195oih.153.1592503187652; Thu, 18 Jun 2020 10:59:47 -0700 (PDT) MIME-Version: 1.0 References: <83lfkkz2wr.fsf@gnu.org> In-Reply-To: From: Richard Copley Date: Thu, 18 Jun 2020 18:59:21 +0100 Message-ID: Subject: Re: bug#41934: reverse-region no longer works To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41934 Cc: 41934@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 Thu, 18 Jun 2020 at 18:52, Richard Copley wrote: > On Thu, 18 Jun 2020 at 18:42, Eli Zaretskii wrote: > Thanks, > No, that fails on this example [...] How's this? diff --git a/lisp/sort.el b/lisp/sort.el index de0e1b9519..f878db24a3 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -554,9 +554,6 @@ is the one that ends before END." (if (> beg end) (let (mid) (setq mid end end beg beg mid))) (save-excursion - (when (or (< (line-beginning-position) beg) - (< end (line-end-position))) - (user-error "There are no full lines in the region")) ;; Put beg at the start of a line and end and the end of one -- ;; the largest possible region which fits this criteria. (goto-char beg) @@ -568,6 +565,8 @@ is the one that ends before END." ;; reversal; it isn't difficult to add it afterward. (or (and (eolp) (not (bolp))) (progn (forward-line -1) (end-of-line))) (setq end (point-marker)) + (when (<= end beg) + (user-error "There are no full lines in the region")) ;; The real work. This thing cranks through memory on large regions. (let (ll (do t)) (while do From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 14:20:48 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 18:20:48 +0000 Received: from localhost ([127.0.0.1]:54385 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlz9c-00078c-MC for submit@debbugs.gnu.org; Thu, 18 Jun 2020 14:20:48 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlz9Z-00078O-VO for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 14:20:47 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45567) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlz9U-0007Ke-FK; Thu, 18 Jun 2020 14:20:40 -0400 Received: from [176.228.60.248] (port=4387 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jlz9T-0001h7-Sh; Thu, 18 Jun 2020 14:20:40 -0400 Date: Thu, 18 Jun 2020 21:20:26 +0300 Message-Id: <83imfoz15h.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-Reply-To: (message from Richard Copley on Thu, 18 Jun 2020 18:52:48 +0100) Subject: Re: bug#41934: reverse-region no longer works References: <83lfkkz2wr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41934 Cc: 41934@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: -3.3 (---) > From: Richard Copley > Date: Thu, 18 Jun 2020 18:52:48 +0100 > Cc: 41934@debbugs.gnu.org > > No, that fails on this example: > > [mark]abc > def > [point]abcdefghi How about this: diff --git a/lisp/sort.el b/lisp/sort.el index de0e1b9..8a4a56c 100644 --- a/lisp/sort.el +++ b/lisp/sort.el @@ -554,9 +554,18 @@ reverse-region (if (> beg end) (let (mid) (setq mid end end beg beg mid))) (save-excursion - (when (or (< (line-beginning-position) beg) - (< end (line-end-position))) - (user-error "There are no full lines in the region")) + (let ((lbeg (save-excursion + (goto-char beg) + (if (bolp) + beg + (line-beginning-position 2)))) + (lend (save-excursion + (goto-char end) + (if (bolp) + end + (line-beginning-position))))) + (when (>= lbeg lend) + (user-error "There are no full lines in the region"))) ;; Put beg at the start of a line and end and the end of one -- ;; the largest possible region which fits this criteria. (goto-char beg) From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 14:28:40 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 18:28:40 +0000 Received: from localhost ([127.0.0.1]:54393 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlzHD-0007KE-Mb for submit@debbugs.gnu.org; Thu, 18 Jun 2020 14:28:40 -0400 Received: from eggs.gnu.org ([209.51.188.92]:42170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlzHB-0007Jz-Ru for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 14:28:38 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45643) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlzH6-0000EX-Jj; Thu, 18 Jun 2020 14:28:32 -0400 Received: from [176.228.60.248] (port=4862 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jlzH5-0007RJ-KZ; Thu, 18 Jun 2020 14:28:32 -0400 Date: Thu, 18 Jun 2020 21:28:18 +0300 Message-Id: <83h7v8z0sd.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-Reply-To: (message from Richard Copley on Thu, 18 Jun 2020 18:59:21 +0100) Subject: Re: bug#41934: reverse-region no longer works References: <83lfkkz2wr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41934 Cc: 41934@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: -3.3 (---) > From: Richard Copley > Date: Thu, 18 Jun 2020 18:59:21 +0100 > Cc: 41934@debbugs.gnu.org > > On Thu, 18 Jun 2020 at 18:52, Richard Copley wrote: > > On Thu, 18 Jun 2020 at 18:42, Eli Zaretskii wrote: > > Thanks, > > No, that fails on this example [...] > > How's this? Looks good, but what if beg and end are on the same line (at the point where you added the test)? Does that not warrant the error message? From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 14:34:31 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 18:34:31 +0000 Received: from localhost ([127.0.0.1]:54398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlzMt-0007Tp-06 for submit@debbugs.gnu.org; Thu, 18 Jun 2020 14:34:31 -0400 Received: from mail-oi1-f182.google.com ([209.85.167.182]:34504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlzMq-0007Tb-NQ for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 14:34:30 -0400 Received: by mail-oi1-f182.google.com with SMTP id b8so6026470oic.1 for <41934@debbugs.gnu.org>; Thu, 18 Jun 2020 11:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=kraMVz2ekQR4Wq4gtJ3U9ZTkdgGVNlLexUwQbqyuDMc=; b=fFEilkcMJOr3Rn6075E4Aoy1n5qEVnCmRtCTmbiaC/G9FvRztmdX1QBsUdQx5Txbqq gBBgYrHzvOjRHDp4Ywf8bcLACFm22mw7AqcSx+NqrTHhVfjJoNhrkU3diazQPg0RIpmT qia19vTKonZURACYl+Ard7FwNx1B0iw5pEFCyLfTQqfd9f5707GZJAe0py5TWcxpmQKI y6p2swrR/5kLqpO4to4A5q+ZP/sp+Z/Rzlin87Bf2aPZKO1pa5+vvaIn8MgdnlcbfCKX L5M8tCvkV4eIKINmTtYLQUysglbCZVBESrYYleK3Du0yMPzjgO1iFbSDwBy7G8/W7oZa U7tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=kraMVz2ekQR4Wq4gtJ3U9ZTkdgGVNlLexUwQbqyuDMc=; b=B9VLVaBEk2BlNqRHygxtGngQ8Ba24lW96xrfUHXy38G8T61Pn6YVV5pnFkVKgOA61E g9NzHsp2tN84zKZSooE5bVYeclcWIZdQgyQ0gn8iic9uyUFtUPSqbSJv9uUO52HRxSbn k0LOL3ZgyuzQwxw9dBSbxKORM2qWIaMASLIMNXyWpR5heX/XvAs+hcZBwAj3AuWoePX7 Al9jLyjHTk8ExvpaPwWh3NPBzXEyuKjQgYsB75IO1SHteXWPiqxqx5yMqYRfmjZTiC5m hZBFf74Sd8BvK6ofoXgauTgaV9XT0O/WFhiPZj6MG1F0GUfZKMhVDe+VS1v8qEq6OGTC m9Kg== X-Gm-Message-State: AOAM532Zj2jm1BGAIBGEZTLpOkv3F23qDCuAG3m47rewtfw4t2m70SDK ZZU1dd/wQb8uahD/I5KY9x3tkqx5Ot31aWa4/34/ag== X-Google-Smtp-Source: ABdhPJxi0oGkQbbTHgmt8fkIw1wXQfHknz+rsiqEViW44ZVlFiOr7OJ+OO9iD3Ft/6ZtK2yu1/kUMbRhwxH13a1U6Xg= X-Received: by 2002:aca:cdc4:: with SMTP id d187mr109230oig.117.1592505263007; Thu, 18 Jun 2020 11:34:23 -0700 (PDT) MIME-Version: 1.0 References: <83lfkkz2wr.fsf@gnu.org> <83h7v8z0sd.fsf@gnu.org> In-Reply-To: <83h7v8z0sd.fsf@gnu.org> From: Richard Copley Date: Thu, 18 Jun 2020 19:33:57 +0100 Message-ID: Subject: Re: bug#41934: reverse-region no longer works To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41934 Cc: 41934@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 Thu, 18 Jun 2020 at 19:28, Eli Zaretskii wrote: > > > From: Richard Copley > > Date: Thu, 18 Jun 2020 18:59:21 +0100 > > Cc: 41934@debbugs.gnu.org > > > > On Thu, 18 Jun 2020 at 18:52, Richard Copley wrote: > > > On Thu, 18 Jun 2020 at 18:42, Eli Zaretskii wrote: > > > Thanks, > > > No, that fails on this example [...] > > > > How's this? > > Looks good, but what if beg and end are on the same line (at the point > where you added the test)? Does that not warrant the error message? Not that error message, no, but rather something like "There are fewer than two lines in the region". I don't see the point of this error at all: if there are fewer than two lines in the region-to-be-reversed at that point, in my opinion the command should have no effect. From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 18 14:45:17 2020 Received: (at 41934) by debbugs.gnu.org; 18 Jun 2020 18:45:17 +0000 Received: from localhost ([127.0.0.1]:54406 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlzXJ-0007jc-9G for submit@debbugs.gnu.org; Thu, 18 Jun 2020 14:45:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46348) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jlzXH-0007jP-GY for 41934@debbugs.gnu.org; Thu, 18 Jun 2020 14:45:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45888) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlzXC-0003kM-7P; Thu, 18 Jun 2020 14:45:10 -0400 Received: from [176.228.60.248] (port=1905 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jlzXB-0006dS-10; Thu, 18 Jun 2020 14:45:09 -0400 Date: Thu, 18 Jun 2020 21:44:56 +0300 Message-Id: <83eeqcz00n.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-Reply-To: (message from Richard Copley on Thu, 18 Jun 2020 19:33:57 +0100) Subject: Re: bug#41934: reverse-region no longer works References: <83lfkkz2wr.fsf@gnu.org> <83h7v8z0sd.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41934 Cc: 41934@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: -3.3 (---) > From: Richard Copley > Date: Thu, 18 Jun 2020 19:33:57 +0100 > Cc: 41934@debbugs.gnu.org > > > Looks good, but what if beg and end are on the same line (at the point > > where you added the test)? Does that not warrant the error message? > > Not that error message, no, but rather something like "There are fewer > than two lines in the region". The original message says "lines", plural, so I think it kinda hints on that. We could make it say something that will cover both cases. > I don't see the point of this error at all: if there are fewer than > two lines in the region-to-be-reversed at that point, in my opinion > the command should have no effect. Indeed, it doesn't have any effect. I'm asking whether this should be flagged, since doing that makes no sense. From debbugs-submit-bounces@debbugs.gnu.org Fri Jun 19 07:31:46 2020 Received: (at 41934) by debbugs.gnu.org; 19 Jun 2020 11:31:47 +0000 Received: from localhost ([127.0.0.1]:55247 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmFFK-0002sK-Mp for submit@debbugs.gnu.org; Fri, 19 Jun 2020 07:31:46 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58936) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmFFH-0002mH-MF for 41934@debbugs.gnu.org; Fri, 19 Jun 2020 07:31:45 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41046) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jmFFC-0001ez-4R; Fri, 19 Jun 2020 07:31:38 -0400 Received: from [176.228.60.248] (port=3894 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jmFFA-0002nL-Vh; Fri, 19 Jun 2020 07:31:37 -0400 Date: Fri, 19 Jun 2020 14:31:25 +0300 Message-Id: <83zh8zxpf6.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-Reply-To: (message from Richard Copley on Thu, 18 Jun 2020 20:28:15 +0100) Subject: Re: bug#41934: reverse-region no longer works References: <83lfkkz2wr.fsf@gnu.org> <83h7v8z0sd.fsf@gnu.org> <83eeqcz00n.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41934 Cc: 41934@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: -3.3 (---) > From: Richard Copley > Date: Thu, 18 Jun 2020 20:28:15 +0100 > > My opinion is: > > (a) no, it doesn't make sense to complain 'user-error: There are no > full lines in the region' when there is one full line. > > (b) although we could still throw an error in that case (with a more > appropriate message), I don't think it would help any users. > > And indeed, I don't think raising the error is helpful even when there > are zero lines to be reversed. It's probably harmless, but conceivably > it could complicate somebody's hypothetical keyboard macro, for little > gain. Fair enough. Here's the conundrum: I'd like to install your proposed change, but the sum total of your contributions to Emacs already exceeds the amount we can accept without legal papers. So, unless you are willing to sign the papers now, we cannot install your change. From debbugs-submit-bounces@debbugs.gnu.org Sat Jun 20 06:04:09 2020 Received: (at 41934) by debbugs.gnu.org; 20 Jun 2020 10:04:09 +0000 Received: from localhost ([127.0.0.1]:57356 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmaM5-0000cD-He for submit@debbugs.gnu.org; Sat, 20 Jun 2020 06:04:09 -0400 Received: from mail-oi1-f169.google.com ([209.85.167.169]:33864) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jmaM2-0000bo-Oz for 41934@debbugs.gnu.org; Sat, 20 Jun 2020 06:04:07 -0400 Received: by mail-oi1-f169.google.com with SMTP id p82so86815oif.1 for <41934@debbugs.gnu.org>; Sat, 20 Jun 2020 03:04:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1wca71zXCKj8u7tfjGvbkrNtHPC474zcRXjgIKHoiJ4=; b=qiJje/mE9UyOWcJTTNEzVRgQWAG02KgBPqQFYY7VwN0mwlHWdotzFdf2oqglTJNzyQ bgDWMIDbfeohisPBBnf2qssFk7xAnbKCqZD4FA4a7wOyLtNKW3ES0Z3RnMa94gIf3HTr 9EggyJ6LInK2034w4R0qWJ3Cymm1LnrZpkEPFspvIMN9xfSMPesF65wGSQ3nIdj/WyGg DNgVFfSjb/cVAL6uMKG/QO8HQV08F+MbVJgfKU3bq26/RzfDY3f8NktdiQ4gi+Ya6EZ/ C0SXI3a0jQOTGSYKJc8jJrz+OX1+PzNkE7gVT+Q3mH7k0b+moy4F0eXJf7JLcSsW5sa5 KCHw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1wca71zXCKj8u7tfjGvbkrNtHPC474zcRXjgIKHoiJ4=; b=Kt/zrpjgah2gzyLBqd2uW1li8Nx6K5k7W0IoBFVWkLXUpttcIHFpyN4mVU3cG3URXL d+t/CdroXbNeGg0I+GJb7r5FpUbU3DjxvYbM+noON4VsCQW3VASMElcc2TErZ0o4bkuY HIY8CdTRV2lvCTOqd85wjc/iYUwaCKI02N4pfVPDR1P9UeWHiZnw75BAXmADMU5LS85r LDxDhQlGpdh6ZqyDT9IHagE/wb7HH+ngJ1aw2OiSwloE47K7FzF2jflv+kLiFys8IJcO tuJG606J83wZWFUTIxfI7m2LSCneCb4XZ9AoZWX5E/fZJZEbW8fkrkRJxR4E4Vccb5// UVKw== X-Gm-Message-State: AOAM530HIsuav3FMXTfjCYlBSPXXvzWC/s5QiOUBrg6T1G11oeM8eAmf E+fSpaTlBTLe9iUOCdNK4f8AflM0rTp5oQPTz/8= X-Google-Smtp-Source: ABdhPJzl//8sdKPz5SQJn6cCCEVI4XSNfQDAWW78qYp4V3JCSlI8ZkH1GNqJyr/cFmmRejoNX0dFqVKsQFGC5k3BeC0= X-Received: by 2002:aca:cdc4:: with SMTP id d187mr6034872oig.117.1592647441197; Sat, 20 Jun 2020 03:04:01 -0700 (PDT) MIME-Version: 1.0 References: <83lfkkz2wr.fsf@gnu.org> <83h7v8z0sd.fsf@gnu.org> <83eeqcz00n.fsf@gnu.org> <83zh8zxpf6.fsf@gnu.org> In-Reply-To: <83zh8zxpf6.fsf@gnu.org> From: Richard Copley Date: Sat, 20 Jun 2020 11:03:34 +0100 Message-ID: Subject: Re: bug#41934: reverse-region no longer works To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 41934 Cc: 41934@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 Fri, 19 Jun 2020 at 12:31, Eli Zaretskii wrote: > > > From: Richard Copley > > Date: Thu, 18 Jun 2020 20:28:15 +0100 > > > > My opinion is: > > > > (a) no, it doesn't make sense to complain 'user-error: There are no > > full lines in the region' when there is one full line. > > > > (b) although we could still throw an error in that case (with a more > > appropriate message), I don't think it would help any users. > > > > And indeed, I don't think raising the error is helpful even when there > > are zero lines to be reversed. It's probably harmless, but conceivably > > it could complicate somebody's hypothetical keyboard macro, for little > > gain. > > Fair enough. > > Here's the conundrum: I'd like to install your proposed change, but > the sum total of your contributions to Emacs already exceeds the > amount we can accept without legal papers. Damn, sorry about that. You told me otherwise last time the question came up[1]. > So, unless you are willing > to sign the papers now, we cannot install your change. It's entirely your decision. I won't be signing the papers any time soon. [1] https://lists.gnu.org/archive/html/emacs-devel/2018-03/msg00637.html From debbugs-submit-bounces@debbugs.gnu.org Mon Jun 22 11:44:08 2020 Received: (at 41934-done) by debbugs.gnu.org; 22 Jun 2020 15:44:08 +0000 Received: from localhost ([127.0.0.1]:34346 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnOcC-0002i7-JB for submit@debbugs.gnu.org; Mon, 22 Jun 2020 11:44:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45394) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jnOc8-0002hU-Uf for 41934-done@debbugs.gnu.org; Mon, 22 Jun 2020 11:44:08 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:43830) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jnOc3-0004PE-KF; Mon, 22 Jun 2020 11:43:59 -0400 Received: from [176.228.60.248] (port=2201 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jnOc2-0008Db-Ly; Mon, 22 Jun 2020 11:43:59 -0400 Date: Mon, 22 Jun 2020 18:43:55 +0300 Message-Id: <83r1u7t8as.fsf@gnu.org> From: Eli Zaretskii To: Richard Copley In-Reply-To: (message from Richard Copley on Sat, 20 Jun 2020 11:03:34 +0100) Subject: Re: bug#41934: reverse-region no longer works References: <83lfkkz2wr.fsf@gnu.org> <83h7v8z0sd.fsf@gnu.org> <83eeqcz00n.fsf@gnu.org> <83zh8zxpf6.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 41934-done Cc: 41934-done@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: -3.3 (---) > From: Richard Copley > Date: Sat, 20 Jun 2020 11:03:34 +0100 > Cc: 41934@debbugs.gnu.org > > > Here's the conundrum: I'd like to install your proposed change, but > > the sum total of your contributions to Emacs already exceeds the > > amount we can accept without legal papers. > > Damn, sorry about that. You told me otherwise last time the question came up[1]. That was before that additional contribution. Anyway, I asked RMS, and he said we can accept this patch, since most of your substantial contribution in the past is now superseded. So I installed your patch, and I'm closing the bug. Thanks! From unknown Sun Jun 22 08:04:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 21 Jul 2020 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