From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: emacs-orgmode@gnu.org
Cc: David Abrahams <dave@boostpro.com>,
Martin Pohlack <mp26@os.inf.tu-dresden.de>,
Bastien <bastien.guerry@wikimedia.fr>,
Emacs developers <emacs-devel@gnu.org>
Subject: Re: Backspacing into folded items
Date: Fri, 03 Sep 2010 15:40:47 +0200 [thread overview]
Message-ID: <4C80FADF.5030607@easy-emacs.de> (raw)
In-Reply-To: <4C7598F2.7050200@os.inf.tu-dresden.de>
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.
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
>
next prev parent reply other threads:[~2010-09-03 13:41 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 [this message]
2010-09-03 14:13 ` [Orgmode] " Lennart Borgman
2010-09-03 15:40 ` Andreas Röhler
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=4C80FADF.5030607@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=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).