unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Backspacing into folded items
       [not found] ` <4C7598F2.7050200@os.inf.tu-dresden.de>
@ 2010-09-03 13:40   ` Andreas Röhler
  2010-09-03 14:13     ` [Orgmode] " Lennart Borgman
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Röhler @ 2010-09-03 13:40 UTC (permalink / raw)
  To: emacs-orgmode; +Cc: David Abrahams, Martin Pohlack, Bastien, Emacs developers


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
>



_______________________________________________
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Orgmode] Backspacing into folded items
  2010-09-03 13:40   ` Backspacing into folded items Andreas Röhler
@ 2010-09-03 14:13     ` Lennart Borgman
  2010-09-03 15:40       ` Andreas Röhler
                         ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Lennart Borgman @ 2010-09-03 14:13 UTC (permalink / raw)
  To: Andreas Röhler
  Cc: David Abrahams, Emacs developers, Martin Pohlack, emacs-orgmode,
	Bastien

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
>>
>
>
>
>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Orgmode] Backspacing into folded items
  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
  2 siblings, 0 replies; 7+ messages in thread
From: Andreas Röhler @ 2010-09-03 15:40 UTC (permalink / raw)
  To: Lennart Borgman
  Cc: David Abrahams, Emacs developers, Martin Pohlack, emacs-orgmode,
	Bastien

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
>>>
>>
>>
>>
>>
>




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Backspacing into folded items
  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
  2 siblings, 0 replies; 7+ messages in thread
From: Samuel Wales @ 2010-09-03 15:44 UTC (permalink / raw)
  To: Lennart Borgman
  Cc: Bastien, Martin Pohlack, Emacs developers, emacs-orgmode,
	David Abrahams

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.

_______________________________________________
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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Orgmode] Backspacing into folded items
  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       ` Stefan Monnier
  2010-09-03 21:31         ` Lennart Borgman
  2 siblings, 1 reply; 7+ messages in thread
From: Stefan Monnier @ 2010-09-03 21:21 UTC (permalink / raw)
  To: Lennart Borgman
  Cc: Bastien, Martin Pohlack, Emacs developers, emacs-orgmode,
	David Abrahams, Andreas Röhler

> However the plan is to make reveal-mode default:

You're jumping to conclusions,


        Stefan



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Orgmode] Backspacing into folded items
  2010-09-03 21:21       ` [Orgmode] " Stefan Monnier
@ 2010-09-03 21:31         ` Lennart Borgman
  2010-09-04  8:42           ` Stefan Monnier
  0 siblings, 1 reply; 7+ messages in thread
From: Lennart Borgman @ 2010-09-03 21:31 UTC (permalink / raw)
  To: Stefan Monnier
  Cc: Bastien, Martin Pohlack, Emacs developers, emacs-orgmode,
	David Abrahams, Andreas Röhler

On Fri, Sep 3, 2010 at 11:21 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>> However the plan is to make reveal-mode default:
>
> You're jumping to conclusions,

Sorry, but what is the plan then?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [Orgmode] Backspacing into folded items
  2010-09-03 21:31         ` Lennart Borgman
@ 2010-09-04  8:42           ` Stefan Monnier
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2010-09-04  8:42 UTC (permalink / raw)
  To: Lennart Borgman
  Cc: Bastien, Martin Pohlack, Emacs developers, emacs-orgmode,
	David Abrahams, Andreas Röhler

>>> However the plan is to make reveal-mode default:
>> You're jumping to conclusions,
> Sorry, but what is the plan then?

W.r.t. reveal-mode, there is no plan.


        Stefan



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2010-09-04  8:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <m2occrnj1k.wl%dave@boostpro.com>
     [not found] ` <4C7598F2.7050200@os.inf.tu-dresden.de>
2010-09-03 13:40   ` Backspacing into folded items 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

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).