From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: delete-selection-mode as default Date: Sun, 16 Sep 2018 22:28:08 +0700 Message-ID: References: <83k1nxvm5j.fsf@gnu.org> <87sh2ih0bp.fsf@fastmail.fm> <770f48a8-664a-40ae-8e03-19f6aad248b6@default> <20180910181615.GA4829@ACM> <874lev3bq4.fsf@toy.adminart.net> <20180912131602.GA5582@ACM> <87d0tihxzw.fsf@toy.adminart.net> <20180913174640.GB4019@ACM> <8736udkuit.fsf@toy.adminart.net> <20180914104833.GA4103@ACM> <83k1nojgia.fsf@gnu.org> <874leq799e.fsf@toy.adminart.net> <205df9be-2e5c-4cc4-a13a-7c80eb63bedc@default> <87in363zgq.fsf@toy.adminart.net> <87a7oh4mdm.fsf@toy.adminart.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1537111649 17026 195.159.176.226 (16 Sep 2018 15:27:29 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 16 Sep 2018 15:27:29 +0000 (UTC) Cc: spacibba@aol.com, Joost Kremers , Noam Postavsky , Emacs developers , Alan Mackenzie , Eli Zaretskii , Drew Adams , Phillip Lord To: hw@adminart.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Sep 16 17:27:24 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1g1YxE-0004Bj-B1 for ged-emacs-devel@m.gmane.org; Sun, 16 Sep 2018 17:27:20 +0200 Original-Received: from localhost ([::1]:59373 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1YzK-0000DA-U2 for ged-emacs-devel@m.gmane.org; Sun, 16 Sep 2018 11:29:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51773) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g1Yya-0000CG-LM for emacs-devel@gnu.org; Sun, 16 Sep 2018 11:28:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g1YyG-0006Ql-3t for emacs-devel@gnu.org; Sun, 16 Sep 2018 11:28:44 -0400 Original-Received: from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336]:41018) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g1YyF-0006Ph-Rl; Sun, 16 Sep 2018 11:28:23 -0400 Original-Received: by mail-ot1-x336.google.com with SMTP id e18-v6so8898078oti.8; Sun, 16 Sep 2018 08:28:22 -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:content-transfer-encoding; bh=6oAeI4ZkxioUeJNjNJzZ4UhW3lFszHTVVnn9UKiyiIE=; b=fewzJ1wD5T9og5l7WjMVbGTH//lRF9mXbfCz6Gj4sCPUHtQUjod4OzRwraw108mepu G6UwZQW2A33hceLZYSZce5PtJS2/h5RsXibmSeZKthKBEpiwusjKm+U7WmCEIOpVFcxO Fw1BTppj/FoUOcQxBWZ6hrcO3JdVn+wRsSgsLGY2iR0mBy0Oq4LGn8EQrOpkNiMXZcD6 4EikO4kWYT/Y+fnkNj5Z4x/046613e1SU1N3nNYjJhPSLNMzQ4nhdERInvhzjB2NAWy4 t3CTtu6G/9rYpbEj4T8pBlggWPNv6w7L8n5L94vXvcVzQGlDimEYxAP73IpSKfEGRoy8 OsSg== 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:content-transfer-encoding; bh=6oAeI4ZkxioUeJNjNJzZ4UhW3lFszHTVVnn9UKiyiIE=; b=Wtb4P+l8WSGI6SGQ9YJ6kwJm497GdMo4nWj9mJUdF1uWkUz8/d5EuVexEKGqoKKqub RMom3unDkePQmm5Xlem6W29D8QDmZVQSRMd66DtjNZjvJ5JkoSba8RqyoVvLugVMWWOL rrN7sec0jJ9WKChf3YhhnVXKwHrcTIq+3TDu4KLI04WVK3hppKgFSaOSS//Hxdx8FsYg oyvlYEH1r2UPOLNN75gpW3Ki8nIcqaS7o9PRv6JK2gnvb7QXllgwGlmgaTQ+3HoyhG5v to6rUTizJnhD1xsqUKPhKOB4gdkJk7GduH/oQqyyrdR+owNrT5BDe2qix021Nf/9Wxfb IFVQ== X-Gm-Message-State: APzg51BsmgQ6U6HijP+f2fyYW+XP+w26yU3YYOPhNB9RnejXHnoZcUAW H7g3aWNpPtstogjm97MckbCmmigHs7tg90E9ZVM= X-Google-Smtp-Source: ANB0Vdb28nhz38cyBp7E+Omoj92AYSKwp/LCPtgZXj62t69JRFBz1GS771izQBFvkoOkpKBMqXh6SnrXBrUmzgqxKGc= X-Received: by 2002:a9d:2d24:: with SMTP id v33-v6mr9849783ota.174.1537111701856; Sun, 16 Sep 2018 08:28:21 -0700 (PDT) In-Reply-To: <87a7oh4mdm.fsf@toy.adminart.net> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::336 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:229847 Archived-At: On Sun, Sep 16, 2018 at 8:51 PM hw wrote: > Emacs has point and (the end of) the region (selection) always entangled > with no way to separate them or to disable the region. That is what I > dislike so much, and it causes all kinds of issues. > > Can we have a mode or something in which there is no association between > point and the end of the region? Or can I just configure that > association away? That would be hard. You=E2=80=99d probably want it to work for all commands= , including third-party packages. Pretty much every command that acts on a block will assume it to be between point and mark. And a hypothetical wordstar-like-block-mode would not know if a command accesses point and mark as region boundaries or as a navigation stack. A serious approach to making persistent blocks a reality would probably involve the following: 1. Define a couple of functions, say =E2=80=98region-start=E2=80=99 and =E2= =80=98region-end=E2=80=99. Initially, make them return (min (point) (mark)) and (max (point) (mark)), respectively. 2. Redefine (interactive "r") to use region-start and region-end. 3. Go through every function that uses (point) and (mark) to mean region boundaries, and change them to use region-start and region-end, too. 4. After that, make the behavior of region-start and region-end customizable, and have wordstar-like-mode customize them to return the appropriate marker values. 5. Do something about functions that activate the mark (shift-selection, mark-word, mark-sexp, mark-defun, =E2=80=A6) so that they= do the right thing to region markers. (No, I=E2=80=99m not going to work on that. But someone who Really Wanted t= o have a wordstar-like Emacs could try.)