all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Uday S Reddy <u.s.reddy@cs.bham.ac.uk>
Cc: emacs-devel@gnu.org
Subject: Re: Visual line mode in email citation
Date: Mon, 31 May 2010 12:26:42 -0400	[thread overview]
Message-ID: <jwv39x8yrdf.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <hu00fm$o4i$1@dough.gmane.org> (Uday S. Reddy's message of "Mon,  31 May 2010 10:45:35 +0100")

> Trying to use the visual line mode in place of longlines isn't working
> very well.  There are no soft line breaks.   So, we end up citing the
> entire paragraph as a single line.  This is supposed to be ok.
> Mail clients like Thunderbird know that the entire paragraph is being
> cited and put citation marks on all of it when they do word wrapping.

> But, VM and Gnus, depending on Emacs visual-line-mode, have no idea of
> what is going on.  They end up putting the citation prefix on the
> first line of the paragraph, and the remaining lines remain uncited.
> Like this paragraph, for example.

> Can the visual line mode be taught some email citation issues?

This was discussed here a few days ago: the word-wrapping performed by
the display engine makes indeed no attempts to recognize citation
prefixes (nor indentation), and given the level at which it works, it's
better that it doesn't try to do that.  OTOH it does provide hooks
(more specifically the `wrap-prefix' text-property), which Elisp code
can use to make this wrapping do the right thing.

IOW, some Elisp code somewhere needs to add a `wrap-prefix' to each line
specifying the citation/indentation/fill prefix to use.  This should
most likely be done by a function passed to jit-lock-register and which
then uses something like fill-context-prefix.

I'd welcome a patch that provides such a function (e.g. in fill.el) and
maybe visual-line-mode could/should use it, but at least Gnus's (and
VM's) message display code should use it.


        Stefan



  reply	other threads:[~2010-05-31 16:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-31  9:45 Visual line mode in email citation Uday S Reddy
2010-05-31 16:26 ` Stefan Monnier [this message]
2010-05-31 16:58   ` Lennart Borgman
2010-05-31 18:21     ` Lennart Borgman
2010-05-31 18:30     ` Stefan Monnier
2010-06-02 16:54 ` Reiner Steib
2010-06-03  9:50   ` Štěpán Němec
2010-06-03 15:05   ` Chong Yidong
2010-06-03 15:18     ` Lennart Borgman

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwv39x8yrdf.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=u.s.reddy@cs.bham.ac.uk \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.