From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: how-many/count-matches for non-interactive use Date: Sun, 24 Oct 2004 13:09:44 -0400 Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Message-ID: References: <87pt3m5vqk.fsf@oak.pohoyda.family> <87zn2mh5jk.fsf-monnier+emacs@gnu.org> <87is99nznd.fsf-monnier+emacs@gnu.org> <200410172053.i9HKrdL01136@raven.dms.auburn.edu> <200410190158.i9J1wrH25523@raven.dms.auburn.edu> <200410200127.i9K1Rpp28384@raven.dms.auburn.edu> <200410210308.i9L38Dm10997@raven.dms.auburn.edu> <200410222222.i9MMMD515903@raven.dms.auburn.edu> <200410240231.i9O2VlZ15381@raven.dms.auburn.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1098637858 19464 80.91.229.6 (24 Oct 2004 17:10:58 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 24 Oct 2004 17:10:58 +0000 (UTC) Cc: jpw@gnu.org, klm@zope.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca, storm@cua.dk, alexander.pohoyda@gmx.net Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Oct 24 19:10:53 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1CLltM-0001lS-00 for ; Sun, 24 Oct 2004 19:10:53 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CLm0y-00089X-Dp for ged-emacs-devel@m.gmane.org; Sun, 24 Oct 2004 13:18:44 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CLm0D-0007ph-JL for emacs-devel@gnu.org; Sun, 24 Oct 2004 13:17:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CLm0C-0007ox-88 for emacs-devel@gnu.org; Sun, 24 Oct 2004 13:17:56 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CLm0C-0007on-4l for emacs-devel@gnu.org; Sun, 24 Oct 2004 13:17:56 -0400 Original-Received: from [199.232.76.164] (helo=fencepost.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CLlsZ-0008S7-GX for emacs-devel@gnu.org; Sun, 24 Oct 2004 13:10:03 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.34) id 1CLlsG-0008F2-24; Sun, 24 Oct 2004 13:09:44 -0400 Original-To: Luc Teirlinck In-reply-to: <200410240231.i9O2VlZ15381@raven.dms.auburn.edu> (message from Luc Teirlinck on Sat, 23 Oct 2004 21:31:47 -0500 (CDT)) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 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 Xref: main.gmane.org gmane.emacs.devel:28838 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:28838 Here are twenty examples: I looked first at elide-head, and it definitely has a bug. (if (not (and beg end)) (if (interactive-p) (error "No header found")) This means that the error won't occur when the command is called from a macro. The other call in elide.el, which is in elide-head-show, has a similar bug. I will change both of them to call message instead. Next I looked at shadow-copy-files. The code may be correct, but it is written in a confusing way that makes it to prove that to oneself. The rest of them seem to be correct. It was luck that I found the incorrect ones first. Still, this experience shows that there are more problems lurking here. I wish you had made a list of the functions you didn't check, because we should ask the maintainers of those files to check them. Could one of you who uses shadowfile.el check whether the following change is really correct? *** shadowfile.el 01 Oct 2004 13:54:45 -0400 1.22 --- shadowfile.el 24 Oct 2004 04:32:07 -0400 *************** *** 518,525 **** `shadow-save-buffers-kill-emacs', so it is not usually necessary to call it manually." (interactive "P") ! (if (and (not shadow-files-to-copy) (interactive-p)) ! (message "No files need to be shadowed.") (save-excursion (map-y-or-n-p (function (lambda (pair) --- 518,526 ---- `shadow-save-buffers-kill-emacs', so it is not usually necessary to call it manually." (interactive "P") ! (if (not shadow-files-to-copy) ! (if (interactive-p) ! (message "No files need to be shadowed.")) (save-excursion (map-y-or-n-p (function (lambda (pair)