From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: ignore-error? Date: Mon, 15 Jul 2019 12:29:09 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="113396"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 15 12:29:29 2019 Return-path: Envelope-to: ged-emacs-devel@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 1hmyEX-000TG4-4L for ged-emacs-devel@m.gmane.org; Mon, 15 Jul 2019 12:29:25 +0200 Original-Received: from localhost ([::1]:36722 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmyEV-0005UM-Qj for ged-emacs-devel@m.gmane.org; Mon, 15 Jul 2019 06:29:23 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:36301) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmyEM-0005UE-I3 for emacs-devel@gnu.org; Mon, 15 Jul 2019 06:29:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmyEL-0002oJ-Gv for emacs-devel@gnu.org; Mon, 15 Jul 2019 06:29:14 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:34534) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hmyEL-0002mS-9i for emacs-devel@gnu.org; Mon, 15 Jul 2019 06:29:13 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmyEH-0005oR-56 for emacs-devel@gnu.org; Mon, 15 Jul 2019 12:29:11 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEUUFBrS1cq1sIwMChAK CA4DAgdmXTbo6t1FRz1/dDsqMTqUiEJ+LDMUAAACNElEQVQ4jXXTT4vaQBgG8LfEFsmpSWG3y17W FLZaL8JIWbya/QTtQksvoYep4sm9DG0vaUtDjJeshWD0MrAgOnuRHsQ/X67vZKKJrn1AjM+PN5k4 CRj5lAzDiiIad+gI8r1lWRGlER2PF6GEbtqbVuBRGq/am81iDgbDpGQJj7bjOIVTKbsJbzxedbIJ NbKmrudh299slmtgKnKgdMYlrCSMcnDC2EuPdlb7gFJlrDyh/QTWebjslpaPAa9ufq+AgtVmHuaA sVsnhfEenLJy6El4OIDz7gVQhMUhnFhhg9LeYzCscsNr9eLFw+IAvmn6MTB/doFP/dk+GEaZF5l7 T4oI/aUC3LjIFwBguBqpzeKhgkvfF4EQHOHLxf0OHPB9rIXACp48f0XILBr21wp8BaBdvfiVQG89 DnMTmD8aIZNo1FvHCNMgAY2keYYQShDiAKizBbEHb1v/A5xwjsFVy/GctrODbU8aLbfn0h3wDPCp C45BjXJPUMdNoJwDokMG5qCqSukNmBQTmApxx5gCuTahCV1C9KOi00EpO5UA3pgi4Evntq0qaRJi K+BaDYCDUX0Dn/+u6jaxFehcflwwK+3OYBnWbZkEcAf0wIXz4euvxambAeAKdNxq4/aOzQEU2KTe lFDUOT4lZoWndZKavH28uFlxCzdJ3qdnw/UBrivQbrIg+JrdxBvVYNu9S8fEAXywnqoDIHazRmo7 +Gj+VgfNggTQgFwnvz+V1fe1jf8BECj8A+pZr0hZcFA2AAAAAElFTkSuQmCC X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 80.91.231.51 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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:238587 Archived-At: It seems like people like writing `ignore-errors' a lot more than `condition-case', and I think `ignore-errors' is the wrong thing to say 90% of the time. So would it be a good idea to add a new convenience macro `ignore-error' to entice people to not use `ignore-errors' so much? It would take an error condition as its parameter, so: (ignore-error 'file-error (directory-files dir)) which would simply expand to (condition-case _ (directory-files dir) (file-error nil)) It indents nicely, too. :-) -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no