emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Martin Pohlack <mp26@os.inf.tu-dresden.de>
To: David Abrahams <dave@boostpro.com>, org-mode <emacs-orgmode@gnu.org>
Subject: Re: Backspacing into folded items
Date: Thu, 26 Aug 2010 00:28:02 +0200	[thread overview]
Message-ID: <4C7598F2.7050200@os.inf.tu-dresden.de> (raw)
In-Reply-To: <m2occrnj1k.wl%dave@boostpro.com>

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-08-25 22:28 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 [this message]
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
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=4C7598F2.7050200@os.inf.tu-dresden.de \
    --to=mp26@os.inf.tu-dresden.de \
    --cc=dave@boostpro.com \
    --cc=emacs-orgmode@gnu.org \
    /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).