From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.devel Subject: Re: point-min and 1 Date: Thu, 13 Aug 2009 16:40:31 +0200 Message-ID: <4A8425DF.3050201@gmx.at> References: <83vdkvjbet.fsf@gnu.org> <83skfyjj56.fsf@gnu.org> <4A83E28E.2090808@gmx.at> <87ws57nb2q.fsf@lola.goethe.zz> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1250176666 18577 80.91.229.12 (13 Aug 2009 15:17:46 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Aug 2009 15:17:46 +0000 (UTC) Cc: emacs-devel@gnu.org To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 13 17:17:39 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mbc3X-0005Vo-Ii for ged-emacs-devel@m.gmane.org; Thu, 13 Aug 2009 17:17:31 +0200 Original-Received: from localhost ([127.0.0.1]:58131 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mbc3X-0004KR-0F for ged-emacs-devel@m.gmane.org; Thu, 13 Aug 2009 11:17:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MbbTs-0001H4-1k for emacs-devel@gnu.org; Thu, 13 Aug 2009 10:40:40 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MbbTn-000181-2a for emacs-devel@gnu.org; Thu, 13 Aug 2009 10:40:39 -0400 Original-Received: from [199.232.76.173] (port=58830 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MbbTm-00017b-Sa for emacs-devel@gnu.org; Thu, 13 Aug 2009 10:40:34 -0400 Original-Received: from mail.gmx.net ([213.165.64.20]:42085) by monty-python.gnu.org with smtp (Exim 4.60) (envelope-from ) id 1MbbTl-0004bl-PF for emacs-devel@gnu.org; Thu, 13 Aug 2009 10:40:34 -0400 Original-Received: (qmail invoked by alias); 13 Aug 2009 14:40:32 -0000 Original-Received: from 62-47-56-63.adsl.highway.telekom.at (EHLO [62.47.56.63]) [62.47.56.63] by mail.gmx.net (mp015) with SMTP; 13 Aug 2009 16:40:32 +0200 X-Authenticated: #14592706 X-Provags-ID: V01U2FsdGVkX1+jYOoQP2+j4AhEm/IISiYVsYFN1jejg4+/tVvXQ6 bPUPc2tQnG/A8o User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) In-Reply-To: <87ws57nb2q.fsf@lola.goethe.zz> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.67 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. 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:114179 Archived-At: > goto-char is an interactive built-in function in `C source code'. > > It is bound to . > > (goto-char POSITION) > > Set point to POSITION, a number or marker. > Beginning of buffer is position (point-min), end is (point-max). > > The return value is POSITION. > > [back] > > Can you guess from that what is done and returned when the buffer is > narrowed and you call (cons (goto-char 1) (point))? No. The doc-string is incomplete in this regard. But a similar thing happens when I want to go to a marker and that marker's position is not within the accessible portion of the buffer. (And no, I see no need to enhance the doc-string. It's all in the Elisp manual.) >>From the DOC string, you could get an error thrown, or point is put > outside of the narrowed region and a number of different things. It is > not at all clear that you get no error, and something like (1 . 90) is > returned. > > In order to find that out, you have not only to read the doc string, but > the actual source code. > > Whether or not the actual result turns out what it is, it is a lousy > idea to have to dig through the source code and all intricacies before > being able to tell what some code does. > > The less information and detail you need to access before figuring out > the function of some code, the better. > > Not least of all because you don't have dozens of accidental > dependencies if at one point of time some of the incidental semantics > are chosen to change. I hope you don't expect me to dispute anything you say here ;-) But all these arguments apply as well when you call (goto-char 1) in a widened buffer. One case against I could come up with is, that in a narrowed buffer referential transparency is lost because (goto-char (+ 1 1)) is not equivalent to (goto-char (+ (point-min) 1)) but I've been told once that referential transparency does not have very high priority within the development of Emacs. martin