From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#39902: 28.0.50; Marking in dired with active region Date: Mon, 16 Mar 2020 08:21:55 -0700 (PDT) Message-ID: <540fe46c-fd31-4bac-a46f-ed56298047d5@default> References: <87d09suras.fsf@web.de> <87tv33r8e2.fsf@mail.linkov.net> <87eeu6hpjf.fsf@web.de> <875zfixuoy.fsf@mail.linkov.net> <87h7z1jadw.fsf@web.de> <87y2sbloaa.fsf@mail.linkov.net> <877dzvgd4l.fsf@web.de> <8736aiqu3y.fsf@mail.linkov.net> <7a0a6f19-f958-4b38-beaf-3d60dc8a279f@default> <87d09lb1ts.fsf@mail.linkov.net> <87a74n4vet.fsf@web.de> <87eetzah2s.fsf@mail.linkov.net> <87zhcn9229.fsf@mail.linkov.net> <6d82d04a-db94-4df4-82cc-3ea13a78a4dd@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="108910"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 39902@debbugs.gnu.org To: Juri Linkov , Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 16 18:29:15 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 1jDtYB-000SD1-2m for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Mar 2020 18:29:15 +0100 Original-Received: from localhost ([::1]:44292 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDtYA-0004GE-1E for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 16 Mar 2020 13:29:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41734) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jDra9-0004I5-1P for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:23:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jDra7-0002Pl-3V for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:23:08 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60046) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jDra6-0002KS-Mn for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:23:07 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jDra2-0001Ry-I2 for bug-gnu-emacs@gnu.org; Mon, 16 Mar 2020 11:23: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: Mon, 16 Mar 2020 15:23:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39902 X-GNU-PR-Package: emacs Original-Received: via spool by 39902-submit@debbugs.gnu.org id=B39902.15843721315506 (code B ref 39902); Mon, 16 Mar 2020 15:23:02 +0000 Original-Received: (at 39902) by debbugs.gnu.org; 16 Mar 2020 15:22:11 +0000 Original-Received: from localhost ([127.0.0.1]:37786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jDrZD-0001Qk-B0 for submit@debbugs.gnu.org; Mon, 16 Mar 2020 11:22:11 -0400 Original-Received: from aserp2120.oracle.com ([141.146.126.78]:54342) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jDrZC-0001QL-8E for 39902@debbugs.gnu.org; Mon, 16 Mar 2020 11:22:10 -0400 Original-Received: from pps.filterd (aserp2120.oracle.com [127.0.0.1]) by aserp2120.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02GF8jN3070110; Mon, 16 Mar 2020 15:22:00 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=mime-version : message-id : date : from : sender : to : cc : subject : references : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=Ry6JMN+O7+rm2LQmy/rbUxmoa4mBECh4mNPFvdVN5N4=; b=PzURWiWjUhYMRIrAbQh116D7zI973p/BuDOGLj8BDmwBmyeZluJp9ciLPWgXdfe0zW/1 pPfD47Gpbp5WHk0Ms4TQvK7vVEKnC/R6XfgzpblSVVO7NEHY1PH875Wna/LIE22ZGs9c DUjN0EJhaZCeW9/PseLiQ/WUz9trKCpI5iCc0eve7VC10Bp4sXFvFfbpXjhqkMny0l+S rNxhc4s/27DRFVZGb6iXZrFOdkojYRMxSbPA0zimwAA4gasovz87sZ09GBpuaFGECUPY Ieyrr61wOyk+hJ1uMrW6CcgwDPBvy1AJFDnETJfrHddMvyAcBydc1u1gqqFp7hXqBaXc XA== Original-Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2120.oracle.com with ESMTP id 2yrq7kqhjp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Mar 2020 15:22:00 +0000 Original-Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 02GFKV8U161697; Mon, 16 Mar 2020 15:22:00 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userp3020.oracle.com with ESMTP id 2ys8yw0tqq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 16 Mar 2020 15:21:59 +0000 Original-Received: from abhmp0020.oracle.com (abhmp0020.oracle.com [141.146.116.26]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id 02GFLuqT022355; Mon, 16 Mar 2020 15:21:57 GMT In-Reply-To: <6d82d04a-db94-4df4-82cc-3ea13a78a4dd@default> X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4966.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9561 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 mlxlogscore=999 mlxscore=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003160073 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9561 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 lowpriorityscore=0 suspectscore=0 adultscore=0 bulkscore=0 mlxlogscore=999 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 phishscore=0 impostorscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2003020000 definitions=main-2003160073 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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:177418 Archived-At: > My vote is to use what I suggested, or similar: >=20 > (progn (goto-char end) > =09 (when (bolp) (backward-char)) > =09 (line-end-position)) This (and I guess the variants that others proposed) has a bug when point is at bol, the region is empty, and `use-empty-active-region' is non-nil. In that case it raises an error saying that "start > end" (which is not a very clear error message in general, BTW). This code seems to DTRT: (progn (goto-char end) (when (and (bolp) (> end beg)) (backward-char)) (line-end-position)) [Non-nil option `use-empty-active-region' is a pesky use case. A guess is that there are other, similar bugs lurking in Emacs. I wonder how many times we actually test for that use case when we use `use-region-p'.]