From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xue Fuqiao Newsgroups: gmane.emacs.bugs Subject: bug#13810: 24.3.50; Docstring of `newline' is confusing Date: Mon, 25 Feb 2013 21:27:42 +0800 Organization: The Church of Emacs Message-ID: <20130225212742.dcfd2a0b66f473545c131b14@gmail.com> References: <20130225180309.53675e52a9cffc46b2478578@gmail.com> <87y5ecshu5.fsf@rosalinde.fritz.box> <20130225204806.e306ddd2a7cc317dd370d019@gmail.com> <87obf8sfvo.fsf@rosalinde.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1361798910 28181 80.91.229.3 (25 Feb 2013 13:28:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2013 13:28:30 +0000 (UTC) Cc: 13810@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Feb 25 14:28:53 2013 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 1U9y6s-0005si-LY for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 14:28:50 +0100 Original-Received: from localhost ([::1]:50571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9y6X-00068C-T1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Feb 2013 08:28:29 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:48647) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9y6U-000686-Kh for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 08:28:28 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9y6S-0004yi-9E for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 08:28:26 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43607) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9y6S-0004yQ-4X for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 08:28:24 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1U9y82-0008Hn-LV for bug-gnu-emacs@gnu.org; Mon, 25 Feb 2013 08:30:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Xue Fuqiao Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Feb 2013 13:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13810 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13810-submit@debbugs.gnu.org id=B13810.136179898531800 (code B ref 13810); Mon, 25 Feb 2013 13:30:02 +0000 Original-Received: (at 13810) by debbugs.gnu.org; 25 Feb 2013 13:29:45 +0000 Original-Received: from localhost ([127.0.0.1]:49071 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9y7k-0008Gr-R9 for submit@debbugs.gnu.org; Mon, 25 Feb 2013 08:29:45 -0500 Original-Received: from mail-pa0-f42.google.com ([209.85.220.42]:59025) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1U9y7h-0008Gh-Vx for 13810@debbugs.gnu.org; Mon, 25 Feb 2013 08:29:43 -0500 Original-Received: by mail-pa0-f42.google.com with SMTP id kq12so1754196pab.1 for <13810@debbugs.gnu.org>; Mon, 25 Feb 2013 05:28:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:date:from:to:cc:subject:message-id:in-reply-to :references:organization:x-mailer:mime-version:content-type :content-transfer-encoding; bh=fH6ykf0eRkb2kNIrtKQdQlodt7JRgl3lS3JjwfT3Sng=; b=DV9ItgTP+YokiOyLcgz2OCdEiwo38PqvmM1csjvaPSLKZIXPL9Qhe3OjeoRWwFhwRE 222CbueAtJC5uYIXXO+wV0q21bwhb6ijyGPNgM96BJkuS7naaS6toe0IMLisO0JLtJuf +HcYgKwi9q7ivd24f4blC3woTIGxfDitJTdw/tgv4IWcmNLvy7wLOi5hkR2nBoGHo7Ca V3ljIQnTBrYCcyQqlg2ecACa/kot9WZ++hSuKQJ6IHJ6nJ45QsVAVza282/uy4iFPAVa mQsPZGVknVSMAIIju7O4XwfBrM+hPBXT4aYIaHy9OL8RHRJLltZb5S2N4Yg73+o05fTP b26g== X-Received: by 10.68.213.132 with SMTP id ns4mr18408016pbc.84.1361798881841; Mon, 25 Feb 2013 05:28:01 -0800 (PST) Original-Received: from Emacs ([123.114.126.135]) by mx.google.com with ESMTPS id vd4sm12750022pbc.35.2013.02.25.05.27.54 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 25 Feb 2013 05:28:01 -0800 (PST) In-Reply-To: <87obf8sfvo.fsf@rosalinde.fritz.box> X-Mailer: Sylpheed 3.2.0 (GTK+ 2.24.13; x86_64-pc-linux-gnu) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:71779 Archived-At: On Mon, 25 Feb 2013 14:05:31 +0100 Stephen Berman wrote: > On Mon, 25 Feb 2013 20:48:06 +0800 Xue Fuqiao wrote: > > On Mon, 25 Feb 2013 13:23:14 +0100 > > Stephen Berman wrote: > >> On Mon, 25 Feb 2013 18:03:09 +0800 Xue Fuqiao wrote: > >> > In the doc string of the function `newline': > >> > Insert a newline, and move to left margin of the new line if it's > >> > blank. > >> > To reproduce this bug: > >> > > >> > emacs -Q > >> > M-< > >> > M-: (newline) RET > >> > A new line appears, but the point doesn't move to left margin of the > >> > first line. > >> I think you misread the doc string: point should -- and does -- move to > >> the left margin of the *new* line. > > You mean the *new* line is the second line (now)? > Yes; I think that's the only interpretation that makes sense when > newline is called at point-max, so for consistency it should be > interpreted that way everywhere. I see, thanks. > >> Your report prompted me to check the code of newline and I think I found > >> a bug: a comment says, "If the newline leaves the previous line blank, > >> and we have a left margin, delete that from the blank line", but the > >> code only checks whether the previous line consists of a *single* space > >> or tab, so if there's more than one space or tab and the line is > >> otherwise blank, these won't be deleted. > > What does the "left margin" mean? I'm a little confused here. Does it mean > > the "margin" in the variable `left-margin-width'? > No, it's referring to (the result of setting) the variable left-margin, > which is different from left-margin-width. Ah, I see. But in (info "(emacs) Glossary"), the term "margin" only contains the meaning from `left-margin-width'. Is it another bug? > > BTW there is another problem with the doc string of the function `newline'. > > The `auto-fill-function' in the doc string is somewhat ambiguous. It is a > > Lisp function in simple.el, but it is also is a variable defined in buffer.c. > The doc string of newline says "Call `auto-fill-function'..."; you can > only call a function, not a variable (I suppose you can call a variable > something, but not just call it). 1. The variable contains the *function* called to perform auto-fill; 2. In (info "(elisp) Documentation Tips"): However, when a symbol has both a function definition and a variable definition, and you want to refer to just one of them, you can specify which one by writing one of the words `variable', `option', `function', or `command', immediately before the symbol name. However, I think most people know that the `auto-fill-function' here refers to its function cell. So it is a very minor problem. > Steve Berman -- Best regards, Xue Fuqiao. http://www.emacswiki.org/emacs/XueFuqiao