emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Samuel Wales <samologist@gmail.com>
To: Lennart Borgman <lennart.borgman@gmail.com>
Cc: Bastien <bastien.guerry@wikimedia.fr>,
	Martin Pohlack <mp26@os.inf.tu-dresden.de>,
	Emacs developers <emacs-devel@gnu.org>,
	emacs-orgmode@gnu.org, David Abrahams <dave@boostpro.com>
Subject: Re: Backspacing into folded items
Date: Fri, 3 Sep 2010 08:44:54 -0700	[thread overview]
Message-ID: <AANLkTimjsUv8O_cR+gS4xD+CJyaey_ZRaxzbCUhtn7V=@mail.gmail.com> (raw)
In-Reply-To: <AANLkTimD6Ehe1L+dRruoqO8P-o=UC7Cha2rM+YRFkife@mail.gmail.com>

Dunno what is best, but when a solution is found, the following should
probably be tested to ensure that it is able to reverse the
non-editability:

  (let ((buffer-invisibility-spec))

On 2010-09-03, Lennart Borgman <lennart.borgman@gmail.com> wrote:
> 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
>>>
>>
>>
>>
>>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>


-- 
Q: How many CDC "scientists" does it take to change a lightbulb?
A: "You only think it's dark." [CDC has denied a deadly serious
disease for 25 years]
==========
Retrovirus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE
===
I would like to see the original Lo et al. 2010 NIH/FDA XMRV paper.

  parent reply	other threads:[~2010-09-03 15:45 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
2010-09-03 15:44       ` Samuel Wales [this message]
2010-09-03 21:21       ` 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='AANLkTimjsUv8O_cR+gS4xD+CJyaey_ZRaxzbCUhtn7V=@mail.gmail.com' \
    --to=samologist@gmail.com \
    --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).