From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Indentation and visual-line-mode Date: Fri, 25 Nov 2011 13:52:37 +0200 Message-ID: <83k46o8lmi.fsf@gnu.org> References: <878vn44kbi.fsf@tsdh.uni-koblenz.de> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1322221967 19335 80.91.229.12 (25 Nov 2011 11:52:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2011 11:52:47 +0000 (UTC) Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 12:52:43 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTuKh-0000MO-Oc for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2011 12:52:43 +0100 Original-Received: from localhost ([::1]:33470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTuKg-0004e1-80 for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2011 06:52:42 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:58962) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTuKd-0004dw-Bj for emacs-devel@gnu.org; Fri, 25 Nov 2011 06:52:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTuKc-0002eK-BM for emacs-devel@gnu.org; Fri, 25 Nov 2011 06:52:39 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:48134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTuKc-0002eA-0u for emacs-devel@gnu.org; Fri, 25 Nov 2011 06:52:38 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0LV700400SZJCH00@a-mtaout21.012.net.il> for emacs-devel@gnu.org; Fri, 25 Nov 2011 13:52:36 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([84.228.50.247]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LV7004AKSZL2LC0@a-mtaout21.012.net.il>; Fri, 25 Nov 2011 13:52:34 +0200 (IST) In-reply-to: <878vn44kbi.fsf@tsdh.uni-koblenz.de> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 80.179.55.169 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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 Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:146215 Archived-At: > From: Tassilo Horn > Date: Fri, 25 Nov 2011 10:34:25 +0100 > > --8<---------------cut here---------------start------------->8--- > \begin{itemize} > \item Foo bar baz foo > bar baz foo > \item Bar baz foo bar > baz > \end{itemize} > --8<---------------cut here---------------end--------------->8--- > > which looks pretty weird. Is there some option that allows the wrapped > lines to be visually indented relative to the current logical line? I doubt that, because logical indentation and display-time wrap or prefixing are two very different features on two very different levels. Logical indentation is actually present in the buffer, while display-time features are produced by the display engine on the fly, without any consideration of previous lines. > Checking the docs, I think something like that can be achieved using the > variables or text properties `line-prefix' and `wrap-prefix', but what > is a stretch-glyph? That's the empty space generated by the display engine when you use :width, :relative-width, or :align-to display specs, see the node "Specified Space" in the ELisp manual. (I will clarify the text in the manual in this regard.) But the variables you mention are supposed to have constant values, so you cannot put there a Lisp expression that needs to be evaluated. Therefore, I think you will only be able to use them in your situation if you manually set them to the amount of space derived from the logical indentation, or invoke some hook that does that when the file is visited (assuming you never want to change the indentation during editing).