From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lennart Borgman Newsgroups: gmane.emacs.devel Subject: Re: Indentation and visual-line-mode Date: Fri, 25 Nov 2011 15:58:52 +0100 Message-ID: References: <878vn44kbi.fsf@tsdh.uni-koblenz.de> <83k46o8lmi.fsf@gnu.org> <87bos0l6ml.fsf@escher.home> <87sjlc2tpw.fsf@tsdh.uni-koblenz.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1322233167 2805 80.91.229.12 (25 Nov 2011 14:59:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 25 Nov 2011 14:59:27 +0000 (UTC) Cc: Tassilo Horn , Stephen Berman , Eli Zaretskii , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Nov 25 15:59:22 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 1RTxFJ-0003FA-9N for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2011 15:59:21 +0100 Original-Received: from localhost ([::1]:39500 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTxFI-0005dp-T2 for ged-emacs-devel@m.gmane.org; Fri, 25 Nov 2011 09:59:20 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:52964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTxFF-0005dk-W2 for emacs-devel@gnu.org; Fri, 25 Nov 2011 09:59:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTxFF-0008IJ-2K for emacs-devel@gnu.org; Fri, 25 Nov 2011 09:59:17 -0500 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:35058) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTxFD-0008I3-8u; Fri, 25 Nov 2011 09:59:15 -0500 Original-Received: by faas10 with SMTP id s10so4259508faa.0 for ; Fri, 25 Nov 2011 06:59:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=jVJoTo51nlF9KHzstMBcK/+q65VT07UNG7PXL2GEI04=; b=YBZmgVhfTbELM6ZdiWxs5B3HzvgkFgCbyExDXsQzqPIrKBpD+fxqioffEcyTdVz0sw cj7H1EUSTEpI8GEcQ4RR3vdioK0pMHyCMJgRfw9FxhlK2gegtkgP2jL2rvgt1M6IdW5u +DCb4UqKzr68eHOOLh8E1iwSdNo1jQr8j77j0= Original-Received: by 10.152.123.144 with SMTP id ma16mr20865339lab.32.1322233154077; Fri, 25 Nov 2011 06:59:14 -0800 (PST) Original-Received: by 10.152.38.198 with HTTP; Fri, 25 Nov 2011 06:58:52 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 209.85.161.41 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:146231 Archived-At: On Fri, Nov 25, 2011 at 15:52, Stefan Monnier wr= ote: >>>> (assuming you never want to change the indentation during editing). >>> A while ago there was a thread about implementing a minor mode to get >>> visual indentation with wrap-prefix using fill-context-prefix, in >>> which I proposed an adaptation of the above; see >>> . =C2=A0AFAIK ther= e >>> was no followup to my proposal. > > Indeed I didn't find the time to look at it and it ended up on my long > list of "things to do when hell finally freezes over". > >> I've just tried that code, and it's exactly what I've been looking for. > > I've just looked at it and it looks really nice and simple. > It can even be simplified further (see below). > > Sadly, this can't be generalized to programming languages, in the sense > that you can't use foo-indent-calculate to set a wrap-prefix property > since the wrap-prefix to use depends on the place where the line > is wrapped. If it is for text modes then I suggest using something like what I told about above since you also would want a more narrow text for readability. (Please see the picture I sent.)