emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: David Abrahams <dave@boostpro.com>,
	Emacs developers <emacs-devel@gnu.org>,
	Martin Pohlack <mp26@os.inf.tu-dresden.de>,
	emacs-orgmode@gnu.org, Bastien <bastien.guerry@wikimedia.fr>
Subject: Re: [Orgmode] Backspacing into folded items
Date: Fri, 03 Sep 2010 17:40:14 +0200	[thread overview]
Message-ID: <4C8116DE.8040108@easy-emacs.de> (raw)
In-Reply-To: <AANLkTimD6Ehe1L+dRruoqO8P-o=UC7Cha2rM+YRFkife@mail.gmail.com>

Hi Lennart,

IMHO cases are related but not identic.
When searching something and found inside hidden part, revealing that 
part is a logical step.

Not so with parts hidden while no interest inside.

For example these hidden parts may be large.

Revealing them every time you type into by mistake may turn out nasty.
Also you have to hide them again.

Using forms-mode, it happens quite often I reach a read-only field.
Forms-mode sets it `intangible' BTW, but thats similar.
Just get the error, know the mistake, not time spoiled for that.

Andreas


Am 03.09.2010 16:13, schrieb Lennart Borgman:
> On Fri, Sep 3, 2010 at 3:40 PM, Andreas Röhler
> <andreas.roehler@easy-emacs.de>  wrote:
>>
>> Hi,
>>
>> posting forwarded herewith describes a design inconvenience, wich affects
>> common hide-show- and outline-modes too.
>>
>> As too different solutions have been proposed, let me suggest
>> "setting read-only property" rather than "use of a modification hook".
>>
>> Setting hidden text read-only should be more simple, straitforward - as
>> presumably hiding some code had some reasons.
>
>
> I recently filed a bug report about that hidden text in org-mode nodes
> did not get visible when you start to edit them. It turned out I was
> mistaken, I did not have reveal-mode on as I believed. However the
> plan is to make reveal-mode default:
>
>    http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6950
>
> How would making the text read-only or add a modification hook
> interact with the kind of problem reported in the bug above?
>
>
>> Editing hidden code is an error, which should be signaled rather than cured
>> via hook.
>>
>>
>> Andreas
>>
>> --
>> https://code.launchpad.net/~a-roehler/python-mode
>> https://code.launchpad.net/s-x-emacs-werkstatt/
>>
>>
>> Am 26.08.2010 00:28, schrieb Martin Pohlack:
>>>
>>> Hi David,
>>>
>>> On 25.08.2010 11:22, David Abrahams wrote:
>>>>
>>>> I've gotten myself in trouble several times today by backspacing after
>>>> an org-link that ends a headline.  That's a typical pattern for
>>>> editing an org-link, right?  Well it turns out that if the item is
>>>> folded, then the backspace writes over the end of the un-folded item
>>>> but **appears to have no effect**, and you can easily hit backspace
>>>> several times to test your sanity before you realize that something is
>>>> wrong, badly corrupting your file.
>>>
>>> I have had similar such accidents, but not involving links.  You
>>> probably backspaced into the "..."?
>>>
>>>> Seems to me that attempts to edit a folded item should either:
>>>>
>>>> a) restrict changes to the item's headline, or
>>>> b) unfold the item and do nothing
>>>>
>>>> Is there a way to set that up?
>>>
>>> Just two quick ideas from me here:
>>> * You could add a modification hook to all hidden areas to unfold them
>>>    on modification, or
>>> * You could set the read-only property for all hidden areas.  This could
>>>    be setup at the same location where hiding is done.
>>>
>>> See also here:
>>>
>>> http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html#Special-Properties
>>>
>>> I proposed a patch for image overlay which show a related problem here:
>>> http://patchwork.newartisans.com/patch/31/
>>>
>>> Cheers,
>>> Martin
>>>
>>
>>
>>
>>
>

  reply	other threads:[~2010-09-03 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-25  9:22 Backspacing into folded items David Abrahams
2010-08-25 22:28 ` Martin Pohlack
2010-09-03  0:02   ` Bastien
2010-09-03  8:06     ` Martin Pohlack
2010-09-03 13:03       ` Bastien
2010-09-03 13:40   ` Andreas Röhler
2010-09-03 14:13     ` [Orgmode] " Lennart Borgman
2010-09-03 15:40       ` Andreas Röhler [this message]
2010-09-03 15:44       ` Samuel Wales
2010-09-03 21:21       ` [Orgmode] " Stefan Monnier
2010-09-03 21:31         ` Lennart Borgman
2010-09-04  8:42           ` 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.orgmode.org/

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

  git send-email \
    --in-reply-to=4C8116DE.8040108@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=bastien.guerry@wikimedia.fr \
    --cc=dave@boostpro.com \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=lennart.borgman@gmail.com \
    --cc=mp26@os.inf.tu-dresden.de \
    /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).