From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.bugs Subject: bug#19381: The doc string for `sit-for' is wrong; redisplay isn't unconditionally done. Date: Sun, 14 Dec 2014 17:13:50 +0000 Message-ID: <20141214171350.GA2606@acm.acm> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1418577337 27877 80.91.229.3 (14 Dec 2014 17:15:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 14 Dec 2014 17:15:37 +0000 (UTC) To: 19381@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 14 18:15:27 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Y0ClT-0006Wc-3T for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Dec 2014 18:15:27 +0100 Original-Received: from localhost ([::1]:36672 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ClS-0004zt-Ir for geb-bug-gnu-emacs@m.gmane.org; Sun, 14 Dec 2014 12:15:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0ClE-0004zS-P4 for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:15:22 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0Cl4-0000Rb-T3 for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:15:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:36882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0Cl4-0000Qy-Q0 for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:15:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Y0Cl4-0006iA-GX for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:15:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Alan Mackenzie Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Dec 2014 17:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 19381 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.141857728525755 (code B ref -1); Sun, 14 Dec 2014 17:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 14 Dec 2014 17:14:45 +0000 Original-Received: from localhost ([127.0.0.1]:46248 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y0Ckm-0006hL-GJ for submit@debbugs.gnu.org; Sun, 14 Dec 2014 12:14:44 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:35403) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Y0Ckk-0006h8-2m for submit@debbugs.gnu.org; Sun, 14 Dec 2014 12:14:42 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0CkV-0008O8-1W for submit@debbugs.gnu.org; Sun, 14 Dec 2014 12:14:36 -0500 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:53364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0CkU-0008O4-Vb for submit@debbugs.gnu.org; Sun, 14 Dec 2014 12:14:26 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37033) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0CkN-0004iY-Ao for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:14:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y0CkF-0008KL-RV for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:14:19 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:59738 helo=mail.muc.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y0CkF-0008Jw-Hs for bug-gnu-emacs@gnu.org; Sun, 14 Dec 2014 12:14:11 -0500 Original-Received: (qmail 40356 invoked by uid 3782); 14 Dec 2014 17:14:08 -0000 Original-Received: from acm.muc.de (pD951B53F.dip0.t-ipconnect.de [217.81.181.63]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sun, 14 Dec 2014 18:14:07 +0100 Original-Received: (qmail 3482 invoked by uid 1000); 14 Dec 2014 17:13:50 -0000 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 8.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:97333 Archived-At: Hello, Emacs. The doc string for `sit-for', in its first (and most important) line states unequivocally that redisplay is performed. (That line is "Perform redisplay, then wait for SECONDS seconds or until input is available.") That's not what the function currently does - it doesn't perform redisplay if input is already available when it is called. A sentence lower down in the doc string contradicts its first line ("Redisplay does not happen if input is available before it starts."). There is thus a clash between the doc-string and the code. (The info page agrees with the code). It would seem at first sight that the obvious thing to do is correct the first line of the doc string. However there are lots (125) of instances of "(sit-for 0)" in Emacs, and a lot of these are probably intended to mean "perform redisplay NOW". So it might be better to make `sit-for' always do a redisplay. However it's done, though, the clash between the doc string and everything else should be resolved. -- Alan Mackenzie (Nuremberg, Germany).