unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Davis Herring" <herring@lanl.gov>
To: "John J Foerch" <jjfoerch@earthlink.net>
Cc: emacs-devel@gnu.org
Subject: Re: Outline mode
Date: Wed, 5 Sep 2007 12:56:10 -0700 (PDT)	[thread overview]
Message-ID: <32870.128.165.123.18.1189022170.squirrel@webmail.lanl.gov> (raw)
In-Reply-To: <874pi8q4r1.fsf@earthlink.net>

> No problem.  At "** Subheading, with elided body...\n" the newline
> after the ellipsis is the newline character just before the next
> subheading.  Users should definitely not be prevented from placing
> point at this character, because it is an ordinary visible character,
> and people may have any number of reasons for wanting to put point
> there (maybe they just want to `describe-text-properties' for some
> reason).  Thus, the movement commands are not the problem.

There's nothing preventing them from going there; with the "new" C-e they
just do C-n C-b to go to that (visible) newline.  With the
front-advance/rear-advance overlays, typing before that last newline will
add to the (invisible) body invisibly, as it should.

> However, it would be preferable, at least to me, to have that newline
> be invisible, and the newline immediately after the header to be
> visible, so that when I go to the end of that heading line, by
> whatever method, point is truly *on* the heading line.  Not having to
> arrow to the left saves me both keystrokes and cogitation.  The reason
> emacs cannot do this right now, is that if you hid that newline, and
> displayed the newline after the header instead, your outline would
> look like this:

If (with all my proposals) you go to the end of the header (via C-e or
whatever else that doesn't put you -past- the invisible newline that ends
it), you are then truly on the header and can edit however you like. 
Pressing C-b once would put you before the last normal character in the
heading (the 'y' of "body" in the example), and self-inserting would add
visible characters immediately after that character.  So (unless you do
want to insert in the middle of the header) no arrowing is required, and
no text is invisible that shouldn't be.

> In that case, you could put point at the end of your subheading, and
> edit with no funny surprises.  Derived modes would also see that you
> were in fact on a header-line (this problem is illustrated by
> org-cycle in org-mode, which can't cycle if point is to the right of
> the ellipsis).  But of course that outline looks silly.  We expect the
> ellipsis to appear on the header line.

I know nothing about org-mode, but again, there are no funny surprises,
aside from the bit where the cursor is rendered after the ellipsis. 
You're still "conceptually" in front of the ellipsis, in that inserted
text appears in front of it and one C-b moves you away from the ellipsis
entirely.  And I think that derived modes should be able to tell (unless
they're being too clever) that you're on the header: you are after all
before the header's newline.

> Currently, the mechanism for displaying the ellipsis can only specify
> *whether* to display an ellipsis.  I would like for it to be able to
> specify *where* to display the ellipsis.

Part of the reason I am attempting to prove the utility of the
C-e/advancing-overlay solution is that I fear such a feature would be
prohibitively expensive/complex.

Davis

-- 
This product is sold by volume, not by mass.  If it appears too dense or
too sparse, it is because mass-energy conversion has occurred during
shipping.

  reply	other threads:[~2007-09-05 19:56 UTC|newest]

Thread overview: 18+ 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
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 [this message]
2007-09-10 15:06                     ` John J Foerch
2007-09-02 15:50 ` Richard Stallman

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=32870.128.165.123.18.1189022170.squirrel@webmail.lanl.gov \
    --to=herring@lanl.gov \
    --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 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).