From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Juanma Barranquero" Newsgroups: gmane.emacs.devel Subject: momentary-string-display Date: Wed, 27 Dec 2006 02:18:29 +0100 Message-ID: NNTP-Posting-Host: dough.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1167182336 19817 80.91.229.10 (27 Dec 2006 01:18:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 27 Dec 2006 01:18:56 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Dec 27 02:18:55 2006 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by dough.gmane.org with esmtp (Exim 4.50) id 1GzNRR-0004NO-Ng for ged-emacs-devel@m.gmane.org; Wed, 27 Dec 2006 02:18:50 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GzNRR-0000tX-2W for ged-emacs-devel@m.gmane.org; Tue, 26 Dec 2006 20:18:49 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GzNRE-0000sZ-LG for emacs-devel@gnu.org; Tue, 26 Dec 2006 20:18:36 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GzNR9-0000rl-4k for emacs-devel@gnu.org; Tue, 26 Dec 2006 20:18:35 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GzNR9-0000ri-07 for emacs-devel@gnu.org; Tue, 26 Dec 2006 20:18:31 -0500 Original-Received: from [64.233.182.185] (helo=nf-out-0910.google.com) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GzNR8-0003O4-LN for emacs-devel@gnu.org; Tue, 26 Dec 2006 20:18:30 -0500 Original-Received: by nf-out-0910.google.com with SMTP id d4so4827725nfe for ; Tue, 26 Dec 2006 17:18:29 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=CYIvu8cTcYSmGBxQEsweZqtrXWgyJyb9CYCiAmu8G4jNr+AffJtZ0SzoPTrtfFftO/WIh2007kQqwK6EDeIJRaVScdPF4ydg0GydVeWbKqdcqAgQeX7IO3daZIsv93nirckZnT+5VtUtFnzlxcX02vW4DtewU0VW563TKPV7V44= Original-Received: by 10.82.152.16 with SMTP id z16mr276034bud.1167182309714; Tue, 26 Dec 2006 17:18:29 -0800 (PST) Original-Received: by 10.82.147.2 with HTTP; Tue, 26 Dec 2006 17:18:29 -0800 (PST) Original-To: "Emacs Devel" Content-Disposition: inline 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: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:64311 Archived-At: `momentary-string-display' is a little weird function, or at least it *acts* a little weird in my tests: 1) It does not check that POS is valid. 2) It does not check whether POS satisfies any restriction, nor uses `widen' and `save-restriction' to circumvent it. 3) Its docstring says: "Momentarily display STRING in the buffer at POS.", which could be taken as this being valid: (momentary-string-display "test" (with-current-buffer MY-BUFFER (point-marker))) which isn't; the buffer temporarily modified is (current-buffer), not MY-BUFFER. 4) From its docstring, it seems as if STRING should always be displayed, which isn't true (STRING is only shown when POS and point both can be simultaneously displayed on the window). Worse yet, in cases 1) to 3), `momentary-string-display' can err out after displaying STRING, leaving the buffer modified and with `buffer-file-name' set to nil. /L/e/k/t/u