all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: John J Foerch <jjfoerch@earthlink.net>
Cc: emacs-devel@gnu.org
Subject: Re: Outline mode
Date: Tue, 04 Sep 2007 10:27:08 -0400	[thread overview]
Message-ID: <jwv4piaik7n.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87vear6u8v.fsf@earthlink.net> (John J. Foerch's message of "Mon\, 03 Sep 2007 22\:26\:40 -0400")

> Okay, now that I know that outline-mode's behavior is not a bug (only
> a peave), I agree that my side-stepping the invisibility-spec ellipsis
> is a hack.  Yet I don't like this idea of changing the movement
> commands to make it more difficult to move point to certain
> characters, either.

Check the docstring of move-end-of-line and you'll see that the current
behavior has a reasonable justification: it tries to ignore newlines that do
not correspond to a screen newline, e.g. newlines that are in the middle of
a `display' property showing a picture, or newlines that are `invisible'
specifically to give the illusion of having a single line.

But I agree that in the case of outline-mode, the move-end-of-line behavior
is not quite right: it should stop at the end of the heading since it is
visually the end of the line (with an "inaccessible" ellipsis appended to
it).
If people aree with this assessment, we can adjust the behavior of
move-end-of-line accordingly.

> The basic thing that I want to implement is to make outline mode
> collapse in a way that fits with how I naturally think about
> outlines--the header is one complete line that can be edited as
> normally as you would edit any line in any text file, and the entry
> consists of all the lines below it, until the next header.  The
> ellipsis code related to invisibility-spec does not accomodate this
> well, because it would place the ellipsis on the line after the
> header--clearly not a nice looking format.  That is what led me to
> implement separate ellipsis handling in outline-mode--a clear mistake.

> So is the following an agreeable solution?  Modify the
> invisibility-spec code to allow the ellipsis to be placed one
> character before the invisible text, via a third parameter in
> invisibility-spec.  This would allow the entries to be collapsed in
> the way I described, while still allowing the ellipsis to appear on
> the same line as the header, and without the hack work-arounds.

> This still has the problem of compatibility with derived modes, some
> of which (like org-mode if I recall) explicitly depend on the header's
> newline being invisible, and the entry's newline being visible.  For
> this problem, I suggest writing whatever abstractions are necessary in
> outline-mode, so the point-arithmetic in the derived modes can be
> replaced by function calls, and thus accomodate both ways of hiding
> entries.

I don't understand what you want.  Can you try and express it in terms of
user-level visible behavior rather than in terms of low-level
implementation details?


        Stefan

  reply	other threads:[~2007-09-04 14:27 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-31 16:30 Outline mode John J Foerch
2007-08-31 20:22 ` Stefan Monnier
2007-08-31 23:44   ` John J Foerch
2007-09-01  2:02     ` Stefan Monnier
2007-09-01 17:31       ` John J Foerch
2007-09-03 21:03         ` Stefan Monnier
2007-09-04  2:26           ` John J Foerch
2007-09-04 14:27             ` Stefan Monnier [this message]
2007-09-04 15:58               ` John J Foerch
2007-09-04 19:45                 ` Stefan Monnier
2007-09-04 21:45                   ` John J Foerch
2007-09-04 22:52           ` Davis Herring
2007-09-05  0:09             ` John J Foerch
2007-09-05  1:11               ` Davis Herring
2007-09-05 19:41                 ` John J Foerch
2007-09-05 19:56                   ` Davis Herring
2007-09-10 15:06                     ` John J Foerch
2007-09-02 15:50 ` Richard Stallman
  -- strict thread matches above, loose matches on Subject: below --
2002-09-06 12:06 Keith O'Connell
2002-09-06 12:24 ` lawrence mitchell
2002-09-06 22:15 ` Kevin Rodgers

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=jwv4piaik7n.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=jjfoerch@earthlink.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 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.