From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#13521: `sort-lines' on the empty region Date: Sat, 5 Sep 2020 11:13:17 +0000 Message-ID: References: <20130122085354.75ced82538551655e724e0ea@gmail.com> <83mu2objro.fsf@gnu.org> <83imdcbgc5.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35836"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: xfq.free@gmail.com, rgm@gnu.org, monnier@iro.umontreal.ca, 13521@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 05 13:14:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEW93-0009D5-JK for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 13:14:09 +0200 Original-Received: from localhost ([::1]:35062 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEW92-00084Q-G0 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 05 Sep 2020 07:14:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56788) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEW8w-000843-1M for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 07:14:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58292) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEW8v-0007YK-Nz for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 07:14:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEW8v-0003Ls-I8 for bug-gnu-emacs@gnu.org; Sat, 05 Sep 2020 07:14:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 05 Sep 2020 11:14:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13521 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13521-submit@debbugs.gnu.org id=B13521.159930440512835 (code B ref 13521); Sat, 05 Sep 2020 11:14:01 +0000 Original-Received: (at 13521) by debbugs.gnu.org; 5 Sep 2020 11:13:25 +0000 Original-Received: from localhost ([127.0.0.1]:41605 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEW8L-0003Kx-Fp for submit@debbugs.gnu.org; Sat, 05 Sep 2020 07:13:25 -0400 Original-Received: from mail-ed1-f42.google.com ([209.85.208.42]:45130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEW8K-0003Kl-7v for 13521@debbugs.gnu.org; Sat, 05 Sep 2020 07:13:24 -0400 Original-Received: by mail-ed1-f42.google.com with SMTP id l17so8337538edq.12 for <13521@debbugs.gnu.org>; Sat, 05 Sep 2020 04:13:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:user-agent :mime-version:date:message-id:subject:to:cc; bh=DCGgUsx6wzGx525ELxk5cq7EedtyshQSxPKm4KfcDus=; b=Bj+z3uHAtCaV1Q5snohtSO9EnN8k3vRsNDGImaBQQmtYOnM3La6pnxCmFlQJOOjep1 tBtE9ERIK5fVZc7uyl5WonTAX4G/PLQzlzR13QWzFeu9mOcQp+Fp0EClqP4KVcszifjc 8G181hTaTtF3f1mfMWpSLxv3O+OAOXFGK4dQxJT/+iLaLxxT5hIXQoUJMAhUq0GrNylR y+VsCUUZQgG3gLSFwj7nXr9fptYi3MjrWx7pfkGjnVygkpR71HU/4uOj51yDGfJM4RxC 7LmE7BNlquaFMbnT0h60z0KFxva09NkTaM2msWSJtfF2F72N+MGVbNUD3WOnLKInZOjG vtfg== X-Gm-Message-State: AOAM531dSPYqJuhvTpSmvfzW/KSlOnJ1MrvcfNkr27sY/FGO/eZOSLLk Ju7q5LkvNCDIN/xhArSJ54Ur3N/kAnOAYMzQsRc= X-Google-Smtp-Source: ABdhPJyo9aZH6qV+O1SNMYJvQ2mcXSUdyYjW/k33pBW0DmadhbsOUy0FI4tqMF3Ib6u+3buMoVYk7kmlNClU+MjJHcQ= X-Received: by 2002:a50:d7ca:: with SMTP id m10mr2655256edj.259.1599304398456; Sat, 05 Sep 2020 04:13:18 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 5 Sep 2020 11:13:17 +0000 In-Reply-To: <83imdcbgc5.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 21 Aug 2020 10:36:42 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187202 Archived-At: Eli Zaretskii writes: > So if the user has transient-mark-mode disabled (which is what I do), > the command will always sort the entire buffer? Or did I > misunderstand something? I didn't consider that case, but you are correct. The behavior would be like that documented in `flush-lines': Interactively, in Transient Mark mode when the mark is active, operate on the contents of the region. Otherwise, operate from point to the end of (the accessible portion of) the buffer. I'm not sure the `flush-lines' behavior makes sense, though. It looks like you can't run it on a region without transient-mark-mode. So maybe we should fix that as well. (Note that `flush-lines' operates from point to point-max, but `sort-lines' is proposed here to operate on the entire buffer instead as per previous discussion in this bug.)