emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: suvayu ali <fatkasuvayu+linux@gmail.com>
To: Bastien <bzg@altern.org>
Cc: emacs-orgmode@gnu.org, Kelly Dean <kellydeanch@yahoo.com>
Subject: Re: Outline and org-mode don't insert text into folded sections logically
Date: Sun, 23 Oct 2011 04:18:00 +0200	[thread overview]
Message-ID: <CAMXnza0tmbUFZx3t8NgQhxRNkBeZKdwuVGv+ZmLEx46CpZm8UQ@mail.gmail.com> (raw)
In-Reply-To: <87wrbxdter.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 2141 bytes --]

Hi Bastien,

A few comments. I have also attached a small test file.

On Sat, Oct 22, 2011 at 15:53, Bastien <bzg@altern.org> wrote:
>
> Here is a dummy patch that prevents the user from editing invisible
> parts of the buffer.  It doesn't prevent query-and-replace commands.
>
> Can people test it and comment it?
>
> Maybe throwing an error is a bit too much.  Maybe preventing all
> kind of edition in invisible parts of the buffer is too much as
> well -- looking forward reading comments on this.
>

Using org-reveal might be better. I see that org-reveal works for lists
but not for headlines or folded src_blocks (is that a regression?). If
not, something with similar functionality for headlines and src_blocks
would be great.

Now about something more subtle and open to subjective opinion. In the
example file, if you go to the beginning of a folded headline / list /
src_block and hit C-e, this should take you to the end of the ellipsis.
Now attempting to edit should either throw an error or unfold the item
(depending on whether you have the patch as is or with my proposal).
However if you press the cursor key to the right once after the C-e in
the last step, then you end up after the ellipsis and inserting text is
possible. The inserted text is placed right above the next entry. So in
the attached test file, if you do this with the first headline the
inserted text will be right before the second headline.

In my opinion this means the problem would still exist. I don't
understand overlays very well, but I was thinking if it could be
resolved by adding a new line to the ellipsis. I customised org-ellipsis
accordingly, although this didn't solve the problem it made it more
obvious when I edited the folded entry inadvertently.

I am not sure what would be an appropriate solution here. If there was a
way to determine if you are inside a folded entity instead of testing
for invisibility of `point' it might be better (maybe test if there is an
overlayed ellipsis?).

> Thanks,

Hope these comments help.

-- 
Suvayu

Open source is the future. It sets us free.

[-- Attachment #2: invisible-test.org --]
[-- Type: text/x-org, Size: 318 bytes --]

#+STARTUP: overview

* This is 1st headline
** Some sub-heading
Followed by some text

+ Maybe a list some multiline content, lets say a code block.
  #+begin_src sh :eval no
    echo "This is $USER testing org"
  #+end_src
+ Second item in the list

* Text inserted before the 2nd headline
With some text underneath


  reply	other threads:[~2011-10-23  2:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-03 19:14 Outline and org-mode don't insert text into folded sections logically Kelly Dean
2011-09-05  7:52 ` Giovanni Ridolfi
2011-09-05  8:01   ` suvayu ali
2011-10-22 10:13     ` Bastien
2011-10-22 10:17       ` suvayu ali
2011-10-22 10:21       ` Jambunathan K
2011-10-22 13:53         ` Bastien
2011-10-23  2:18           ` suvayu ali [this message]
2011-10-29 14:10             ` Bastien
2011-10-29 14:57               ` suvayu ali
2011-10-29 15:40                 ` Bastien
2011-10-29 15:53                   ` suvayu ali
2011-10-29 16:15                     ` Bastien
2011-10-29 16:22                       ` suvayu ali
2011-10-30  1:07                         ` Bastien
2011-10-30  6:28                           ` Carsten Dominik
2011-10-30  7:30                             ` Jambunathan K
2011-10-30  7:47                               ` Carsten Dominik
2011-10-30  9:04                             ` Bastien
2011-10-30 15:37                               ` Carsten Dominik
2011-10-31 20:58                                 ` Carsten Dominik
2011-11-02  7:12                               ` Carsten Dominik
2011-11-02 10:10                                 ` Bastien
2011-11-02 12:53                                   ` Carsten Dominik
2011-11-03  1:30                                     ` Bastien

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.orgmode.org/

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

  git send-email \
    --in-reply-to=CAMXnza0tmbUFZx3t8NgQhxRNkBeZKdwuVGv+ZmLEx46CpZm8UQ@mail.gmail.com \
    --to=fatkasuvayu+linux@gmail.com \
    --cc=bzg@altern.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=kellydeanch@yahoo.com \
    /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/org-mode.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).