From: Tassilo Horn <tassilo@member.fsf.org>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: Eli Zaretskii <eliz@gnu.org>,
Stephen Berman <stephen.berman@gmx.net>,
emacs-devel@gnu.org
Subject: Re: Indentation and visual-line-mode
Date: Fri, 25 Nov 2011 16:15:31 +0100 [thread overview]
Message-ID: <87hb1sxmgc.fsf@tsdh.uni-koblenz.de> (raw)
In-Reply-To: <jwvfwhcgtsz.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 25 Nov 2011 09:52:19 -0500")
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>>>> (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
>>> <http://permalink.gmane.org/gmane.emacs.devel/125268>. AFAIK there
>>> 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".
Hell's already frozen over:
http://researchmaniacs.com/Jokes/HellExplained.html
>> 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.
But usually, there are no overly long lines in source code.
>> I'd appreciate if that feature would ship with Emacs.
>
> It's too late for 24.1, but I've added it (under name "awp-mode.el"
> which provides adaptive-wrap-prefix-mode) to ELPA.
Awesome, thank you.
Bye,
Tassilo
--
(What the world needs (I think) is not
(a Lisp (with fewer parentheses))
but (an English (with more.)))
Brian Hayes, http://tinyurl.com/3y9l2kf
next prev parent reply other threads:[~2011-11-25 15:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-25 9:34 Indentation and visual-line-mode Tassilo Horn
2011-11-25 11:52 ` Eli Zaretskii
2011-11-25 12:38 ` Stephen Berman
2011-11-25 13:54 ` Tassilo Horn
2011-11-25 14:52 ` Stefan Monnier
2011-11-25 14:58 ` Lennart Borgman
2011-11-25 15:15 ` Tassilo Horn [this message]
2011-11-25 13:49 ` Lennart Borgman
2011-11-25 14:36 ` Tassilo Horn
2011-11-25 14:47 ` Lennart Borgman
2011-11-25 15:37 ` Juanma Barranquero
2011-11-25 15:46 ` Lennart Borgman
2011-11-25 14:00 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87hb1sxmgc.fsf@tsdh.uni-koblenz.de \
--to=tassilo@member.fsf.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
--cc=stephen.berman@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).