From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#22457: 24.5; [PATCH] `dired-mark-if' should not count non-changes Date: Tue, 25 Jun 2019 09:06:46 -0700 (PDT) Message-ID: <81cf46a6-c57a-4f90-a203-7e963b232f6a@default> References: <2a6ff247-2b75-4f85-9a4c-889576ed7b34@default> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="262471"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 22457@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jun 25 18:27:54 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hfoIS-00168l-Vw for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2019 18:27:53 +0200 Original-Received: from localhost ([::1]:33862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfoIR-00031d-IQ for geb-bug-gnu-emacs@m.gmane.org; Tue, 25 Jun 2019 12:27:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41722) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hfnyR-0004Wc-UP for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 12:07:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hfnyP-0007XI-Bn for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 12:07:11 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:48019) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hfnyI-0007S5-3P for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 12:07:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hfnyH-0003PX-Sx for bug-gnu-emacs@gnu.org; Tue, 25 Jun 2019 12:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 25 Jun 2019 16:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22457 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 22457-submit@debbugs.gnu.org id=B22457.156147881913104 (code B ref 22457); Tue, 25 Jun 2019 16:07:01 +0000 Original-Received: (at 22457) by debbugs.gnu.org; 25 Jun 2019 16:06:59 +0000 Original-Received: from localhost ([127.0.0.1]:33330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfnyF-0003PI-CJ for submit@debbugs.gnu.org; Tue, 25 Jun 2019 12:06:59 -0400 Original-Received: from userp2120.oracle.com ([156.151.31.85]:60220) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hfnyC-0003P1-RV for 22457@debbugs.gnu.org; Tue, 25 Jun 2019 12:06:57 -0400 Original-Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5PFxCHb052978; Tue, 25 Jun 2019 16:06:50 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-2018-07-02; bh=2EpU8sXuMaHLh083k24zjPjAIcK/MtnoxbDWRn3vGyw=; b=men7ms/Z+yuET6pYC/B+FJ8ubbo7nQLfQxidjRCExr5qWczps1zFmgNZsauYeBvd0efw d7y1wXbqtIU99wTRQaEvw9SEq1bCDXAa+eTc2uxi+qsxlNyOsLa2yxKt1zombqkW8V8d WMZLlYgqbumFkrwC5iFGl8vqqUrXgGu7fnOJgaCBAjfvU4mtxmV2jo/8xxGxluTCy/lu wppO3avNnNkVdVlAndaecNJMCLYsxscdADjaVLoumeRvhXEO5ZyqCKTtD0JKhIWApvxf rFDq1/0deR5mS7doeL8q83Ii4s+Gv/PCg6p8i6ImnnJQLxMIZ8HcE8LE7ZujB/AXVDwk YQ== Original-Received: from aserp3030.oracle.com (aserp3030.oracle.com [141.146.126.71]) by userp2120.oracle.com with ESMTP id 2t9cyqdafm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 16:06:49 +0000 Original-Received: from pps.filterd (aserp3030.oracle.com [127.0.0.1]) by aserp3030.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x5PG5Ton135150; Tue, 25 Jun 2019 16:06:49 GMT Original-Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by aserp3030.oracle.com with ESMTP id 2t9acc6mm8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 25 Jun 2019 16:06:48 +0000 Original-Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x5PG6lq0005245; Tue, 25 Jun 2019 16:06:48 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9.1 (1003210) [OL 16.0.4861.0 (x86)] X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9299 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906250121 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9299 signatures=668687 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906250121 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:161394 Archived-At: > And why is dired-mark-if a macro in the first place? It's pretty long > to be a macro; it could be rewritten as a function that take a > predicate... (Length of a macro's code makes no difference, if the code using it is compiled.) I would say leave this sleeping dog lie... --- The PREDICATE arg is really code (a sexp), not a predicate (function). See also the use of `dired-mark-if' in command `dired-mark-sexp' (in `dired-x.el'). See the doc string of that command. There too the PREDICATE arg is code (a sexp), not a predicate. And there you can use a set of predefined variables in the "PREDICATE" sexp that gets evaluated and then passed to `dired-mark-if'. See also the uses of `dired-mark-if' in `dired-aux.el', where an anonymous function is constructed using the macro. This is the way things have been since about Day One of Emacs. Could things have been coded differently for this? Likely. Should they be? Doubtful.