From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#18793: 24.4; zero width rectangular selection displaces text Date: Thu, 5 May 2022 17:51:16 +0000 Message-ID: References: <82ppdk41k5.fsf@gmail.com> <87fslop1af.fsf@gnus.org> <837d702b1w.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24338"; mail-complaints-to="usenet@ciao.gmane.io" Cc: "carlosjosepita@gmail.com" , "18793@debbugs.gnu.org" <18793@debbugs.gnu.org> To: Eli Zaretskii , Lars Ingebrigtsen , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu May 05 20:29:07 2022 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 1nmgDr-00066G-B3 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 May 2022 20:29:07 +0200 Original-Received: from localhost ([::1]:50464 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nmgDq-0006ES-6G for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 05 May 2022 14:29:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nmfdz-0000Sy-0d for bug-gnu-emacs@gnu.org; Thu, 05 May 2022 13:52:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:52545) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nmfdy-00015o-NB for bug-gnu-emacs@gnu.org; Thu, 05 May 2022 13:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nmfdy-0001F6-Ir for bug-gnu-emacs@gnu.org; Thu, 05 May 2022 13:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 05 May 2022 17:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18793 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 18793-submit@debbugs.gnu.org id=B18793.16517730844729 (code B ref 18793); Thu, 05 May 2022 17:52:02 +0000 Original-Received: (at 18793) by debbugs.gnu.org; 5 May 2022 17:51:24 +0000 Original-Received: from localhost ([127.0.0.1]:46442 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmfdL-0001ED-QO for submit@debbugs.gnu.org; Thu, 05 May 2022 13:51:24 -0400 Original-Received: from mx0a-00069f02.pphosted.com ([205.220.165.32]:62850) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nmfdI-0001E3-Mp for 18793@debbugs.gnu.org; Thu, 05 May 2022 13:51:22 -0400 Original-Received: from pps.filterd (m0246617.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 245Fb0w3018680; Thu, 5 May 2022 17:51:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=aMgY33EyScKYrcKwZD/5Gdv/TJSVfEuRXh2PCPCoKqU=; b=bKYWF8jedOvNYE0M23079LOhkb7bnNkX+9EW43mzkHHM5yaU/YMfsFAgG/j/Ehn6FTmt en2IdHfCXKx/39kPeQcaVCMqt7jnpsa3UwkgKSMqAbM8cMS1DwcXECBKd0x4j8I6TS9K h/RaNEvQj+GCAJrFmYCZEo50GpO+T5ObmF0ydDG3+JaXXjGrRemt+pt8jjhPwkzZ6vol qiPdGX543iTxjROnoLMkF1cYzmFVwU1g9n2WrmM0UZvBxSL10vopoKCCOco2qqhZDMUj xyJbL5iq3BtSVdu2rfllFFfQoitUYIFL+0h5RCyw1aNtG3rB0ehjHoh8WLFyTseZs/2u 0g== Original-Received: from iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta02.appoci.oracle.com [147.154.18.20]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3frwntc711-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 May 2022 17:51:19 +0000 Original-Received: from pps.filterd (iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com (8.16.1.2/8.16.1.2) with SMTP id 245HoZVm037560; Thu, 5 May 2022 17:51:18 GMT Original-Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam08lp2045.outbound.protection.outlook.com [104.47.73.45]) by iadpaimrmta02.imrmtpd1.prodappiadaev1.oraclevcn.com with ESMTP id 3fus8yd5uk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 May 2022 17:51:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iIYSHb7u8CZBKqrMje6+c0+Iju9MOMWyTa/wc+RobwUfLdi4gcUANnnqQoGLjF6I074w5zPYzYtWxY+c5xZIZOJFquOoZL6M4YYQVbBJIjCfC0t93V0cVYCstzrMTO8vYLDMTr1zGOgp/5ES7QO3U9ei/i0p//ta2jTNnYHlntpxfmt9GM627rYeddRDTuGGhbAqhOc6q7HjD6TcdMklTB20BOjNV9ScJ+kDN/la8PLaIJoyJh5nFUxIppLwr9subjuxMrv0nkmJPGU/BouztVmr+5GU1C76HTZG9J3B0ANBQMNH6jZ3ycXeXS2aO7lASp8MrY2wPYs9TQdAvmP3dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=aMgY33EyScKYrcKwZD/5Gdv/TJSVfEuRXh2PCPCoKqU=; b=b1ZPjfOEpnW0L0yocLKuy0ZuPsCuaV84tnirODMxztjhJHLKCrpbrrU6qwYXKbAaPNcSqD7eDZZ6VTbijSEtSdWI77KPSwXizWlAtC7MUKrC2rWIjVDe32kSPLuI17Y44GgJCQSzw3X6OM8RrRUSEox4AFNHojOjQTZYgQqy3BtVu0z9K+iTHBgkbxWH+U8N1+9hOQF1Cqe6wDPnTHmdIgmjthbquaItTVHdvkeXfBRqtAOXpsgQ519VTyF0BuZFq44BKdu+BO+yCtReHHFYs440cANsuX+7qts1co0TWTaFiIvVz9RjzgUgHQXZPuFduzNLpYgFM6Nu5m1Xrj9e8w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=aMgY33EyScKYrcKwZD/5Gdv/TJSVfEuRXh2PCPCoKqU=; b=qIYRJTvkO60RePwpsl0q6Iejjzq4XoukS7r4qjswF+iwYwc0+A7mcypbZvcHpKTU2Xj9BiGmDhM7jIju8bumO9/tXi2+m3gxBXPEpfKdgwkYsIwQ0kcmEiPrdFm9gvKBLDvB/xpTExS/X257IKvX5Udo1xko/mw/0NNEYsyIbSk= Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BYAPR10MB3080.namprd10.prod.outlook.com (2603:10b6:a03:87::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5186.20; Thu, 5 May 2022 17:51:16 +0000 Original-Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a0e7:5f38:ab50:5123]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::a0e7:5f38:ab50:5123%9]) with mapi id 15.20.5206.027; Thu, 5 May 2022 17:51:16 +0000 Thread-Topic: [External] : bug#18793: 24.4; zero width rectangular selection displaces text Thread-Index: AQHYYKAg/uzbQs+s6UuWsGlbuVzIPa0QhpEg In-Reply-To: <837d702b1w.fsf@gnu.org> Accept-Language: en-US Content-Language: en-US x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 38a3cb61-6b9b-45f0-9503-08da2ebfda3d x-ms-traffictypediagnostic: BYAPR10MB3080:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: bTBv0IN605vQIcVvHsFPPj21JWdB0GrnDZypKDV7VZOQE2MeyInsI+PMCj+Lg6wOW3x/06wg7oQdon5S/pPuY81BMvNRx/isQHr1I5/Eeau/fpZDEP8QUnd2nX7l7DgU4sWif63c1WNqA1WzcEpDnkOUJhU7ibhox8G3YbHd5ffLHXI2jAN/qiq3Kn23WiroNRvyzVFBayrvvtxWKbgzhJZF2GjjbwHl4dFbVRFNem2FXUqs/LZcuFMMavXILORu+IloAJrozBSX0Pz0Xo36pJtSXqqEDjQLF90Nk+sgmBAmwVL58Fn8mydCZKJfTHeIbCl6JZtx2pwHf8qQTNGqr0WJyukSpRnQzKVvpUk5SP59ea5Lbkjg4EjdG5k7Mi8ZCHBkMS2uMQH6cw+y9J4AYqeUtQZVhqzoQPmjOKfdl9k/XbypIQoojVOh3PQW/fZJHD2iTHq5epFQTQjSvSZovpgi55ownu5eXtSNBjCEvmi78HSdM9W/7REk+fY97tkcLJ1t3y5Pr2LBS1hc2Wkw4jUl+EFy6kEilDvBB2kZSzIx9KBzLwobjjTN+USrmo/lIJnPuxLAb+nfzfxIG7j2Rmru6YMDaN520t7eC3KCfqk/4z1AflFbaC4ivC0GPA1RscsF+oYCAbDPpRBI1knSiMFaH5RzjZhCervYCUMW7oysvXHQEpBCg73nik0OoBbGD+XAXpLUsY45/XhcOItfWRz+tSknXPLLVRyHapw2b0MipR/EPn4kdbWZJMQu3 31Y+dzgPl2NfEdHxNm8RNxAGJQb3afuyEhscQ7vXJ3B4adM0R7bJ3xfSijyNyz6pEfbr8QT+Sq9XfMngKaOa05Txg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(86362001)(52536014)(38100700002)(38070700005)(508600001)(5660300002)(8936002)(44832011)(122000001)(2906002)(966005)(186003)(33656002)(71200400001)(9686003)(55016003)(7696005)(6506007)(26005)(83380400001)(110136005)(76116006)(66556008)(4326008)(316002)(54906003)(8676002)(66446008)(64756008)(66946007)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: rH2rw99wIn9h7lozvwKOwpO2JeigAZSjYcK8fqUfM3sesOoV6NOwVOAv0BHor3kLbrfXBrBtZduM/YUXGzrFSgH1d2O1OerDBfSUI1iVstD11jmuGL4FxixCgkaQObb7TjrHGJKyf6WLfQ7UiWjr+HLESWQuwQDyo6vj+Jp/COU7u+/yelQF5/VBIT9uxk+VTzocZjxGf0/37bF4pmEHJzjN54/bw1EYD5aOez0Vlz2kXPdkb4Zw289LmVdJm3qiInFcaRUVMehyJPi3OobjHofIg0gVk0NV4ECOQQ0JjyMSSJ9EO9JDPKmfpVBKzq4Pt3KVo+IcJNnYR/2fPWa9k9Oqgy3h6Yo+j1MlRO6bBIW1zDl41FX5MHqhLUUEOEwoE9ftm4saxapHgpvqmS6OViQCyhTvqJiJs6lfr+oOoEMbnKiEOSmLQn0gxO51Ufc+aM7G6AnZXBnpRsPN3QmTb30qe0sZjn5Frcwz/GufJS/M4SsrkGNV2ErpIs8xUagGvKuTcv3jkzUMTTummyc20D166SSmkUsX48n4oySG/WRUlxmHQD1RFqXu7MpRcbDycUM1KzIo/XNUAycIatIMhBKVCjgGm2e44ZmptDSalSuHz3wSemJgWXC0X1NOvnn7P3IxoJDLriatZQ7s4pSVdclFYPRXvy27tN3nRDeFJlM1MWtrC+L/is7oUVXZ6ZhtrbifiV/9Hat4soA4TS7TOxcVw9gUQ2OQ9mpkVXvnTn6GdLFb7jEVFcFi8C HWbR9bSN+i7RSFvRdfirrssTypwG3QjJAzIPfvQmvEcQFNZhoAx5Xci+SWilPasZ8Rp8QM8CJhY8N3929SdUNxf5Ikrq1BRmXo X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 38a3cb61-6b9b-45f0-9503-08da2ebfda3d X-MS-Exchange-CrossTenant-originalarrivaltime: 05 May 2022 17:51:16.1134 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: S8JVPU860ajWkbjEfcMawsnJwWfeBfCmNztLHsEezafctWLCC9x2Z3VpNTd6FXA8s9MrULWagjj8xP+5Grm/ZA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR10MB3080 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.486, 18.0.858 definitions=2022-05-05_06:2022-05-05, 2022-05-05 signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 suspectscore=0 mlxlogscore=999 adultscore=0 mlxscore=0 spamscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2202240000 definitions=main-2205050121 X-Proofpoint-ORIG-GUID: 6kkr7w7X4oq0nEy117XVMk_XCzpkUNah X-Proofpoint-GUID: 6kkr7w7X4oq0nEy117XVMk_XCzpkUNah 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:231456 Archived-At: > > > 1) Put the point at the beginning of the following sequence of a's. > > > 2) Start a rectangular selection with C-x Space. > > > 3) Move the point one char to the right. > > > 4) Move it one char to the left so that it returns to the left > margin. > > > 5) Repeat 3 and 4 a number of times. > > > > > > aaaaaaaaaaa > > > > > > Do you see how the sequences of a's moves back and forward? > > > > I can confirm that this behaviour is still present in Emacs 29. >=20 > AFAIU, that's a feature: we are trying to indicate the existence of > the selection, even though its width is zero. Type "M-x > describe-text-properties RET" at the first character. The indication > must take up some space on display, so it moves the following text to > the right. Some indication that the selection is active and rectangular is needed - that's a good idea. But this slight movement isn't the greatest way to indicate this. It's barely noticeable (but it helps IMO, and is better than nothing). We do also show a message when you turn on Rectangle-Mark mode (with `C-x SPD'). That's OK. But then when you move point to select more than an empty selection the text moves back again (reverse slight motion). So this "jiggle" indicates change to and from an empty selection, not whether rectangle mark mode is on or off. That's fine, but there's no msg or other indication (apart from the jiggle) for change to/from an empty rectangular selection. I think we could do better. ___ Here's one possibility: With minor mode `modeline-region-mode', from `modeline-region.el', the region state is shown in the mode-line whenever the region is active. E.g., with point at the start of that line of aaaaaaaaaaa, after using `C-x SPC' you see this in the mode-line, highlighted with face `mlr-region' (by default it looks the same as face `region'): 1 rows, 0 cols That is, in rectangle-mark mode, the size indication shows the region size as the number of rows and columns. Following the OP recipe with this: aaaaaaaaaaa bbbbbbbbbbb ccccccccccc When the first column is selected across all rows, you see this in the mode-line: 7 rows, 1 cols If you then use C-x SPC to turn off rectangle-mark mode, the mode-line indication changes to this: 7 lines, 40 chars There are multiple ways to indicate the selection status in the mode line. Those 2 are the defaults. The code is here: https://www.emacswiki.org/emacs/download/modeline-region.el Library description is here: https://www.emacswiki.org/emacs/ModeLineRegion