emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Unhiding edited areas
@ 2009-07-30 15:42 Martin Pohlack
  2009-07-30 17:44 ` Eric S Fraga
  2009-07-30 18:10 ` Samuel Wales
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Pohlack @ 2009-07-30 15:42 UTC (permalink / raw)
  To: emacs-orgmode

Hi there,

I'm using undo from time to time in org-mode buffers and sometimes the
area covered by the undo step is hidden (folded away) at the undo
time.  I feel somewhat uncomfortable in this situation as I,
apparently, rely on the visual appearance of the buffer when undoing
and redoing several steps.

For interactive search, the area around point is unfolded incrementally.

Is there a way to always show the area where edits are done?

Cheers,
Martin Pohlack

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

* Re: Unhiding edited areas
  2009-07-30 15:42 Unhiding edited areas Martin Pohlack
@ 2009-07-30 17:44 ` Eric S Fraga
  2009-07-30 18:10 ` Samuel Wales
  1 sibling, 0 replies; 6+ messages in thread
From: Eric S Fraga @ 2009-07-30 17:44 UTC (permalink / raw)
  To: Martin Pohlack; +Cc: emacs-orgmode

At Thu, 30 Jul 2009 17:42:08 +0200,
Martin Pohlack wrote:
> 
> Hi there,
> 
> I'm using undo from time to time in org-mode buffers and sometimes the
> area covered by the undo step is hidden (folded away) at the undo
> time.  I feel somewhat uncomfortable in this situation as I,
> apparently, rely on the visual appearance of the buffer when undoing
> and redoing several steps.
> 
> For interactive search, the area around point is unfolded incrementally.
> 
> Is there a way to always show the area where edits are done?

+1

Of course, there may be solutions already available, such as
UndoBrowse [1].  But I've not tried anything.

eric

Footnotes: 
[1]  http://www.emacswiki.org/emacs/UndoBrowse

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

* Re: Unhiding edited areas
  2009-07-30 15:42 Unhiding edited areas Martin Pohlack
  2009-07-30 17:44 ` Eric S Fraga
@ 2009-07-30 18:10 ` Samuel Wales
  2009-07-30 18:50   ` Martin Pohlack
  1 sibling, 1 reply; 6+ messages in thread
From: Samuel Wales @ 2009-07-30 18:10 UTC (permalink / raw)
  To: Martin Pohlack; +Cc: emacs-orgmode

Hi Martin,

This is a huge issue.[1]

Here is what I do to try to work around it.

I use git, to limit the damage from confusion.

I expand the entire buffer if I think I am about to be confused.

;;i like the idea of clustering undo but find it disconcerting
(setf org-self-insert-cluster-for-undo nil)
;;somebody, I think Carsten, suggested this, and it might work for
you, but for some reason I commented it out.  I don't remember what
the reason was.  Maybe speed.
'(defadvice undo (after org-undo-reveal activate)
 "Make point and context visible after an undo command in Org-mode."
 (and (org-mode-p) (org-reveal)))
;;(ad-unadvise 'undo)


[1]  It is even more important when combined with what is IMO Emacs's
greatest need for improvement, which is that you can undo, and undo an
undo, and this is considered to be sufficient since you can get
anywhere in the timeline in principle -- but many users, myself
included, prefer a true redo command, both because undoing an undo
does not let you do commands (such as copying) in the middle of an
undo sequence without going the other direction, and because it feels
more intuitive to tell emacs where in the timeline we want to go, and
go forward or backward if we overshoot, thus making it possible to
view the timeline the same way as we go backward and forward in any
linear sequence.  (redo.el provides the functionality, but it corrupts
the buffer.)  Of course, many are comfortable with the traditional
undo-the-undo mechanism, so that should stay possible, but there are
many who are not, and a redo mechanism would satisfy them.  It is
possible to get more fancy with a tree.

-- 
Myalgic encephalomyelitis makes you die decades early (Jason
et al. 2006) and suffer severely.  Conflicts of interest are
destroying research. What people "know" is wrong. Silence = death.
http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: Unhiding edited areas
  2009-07-30 18:10 ` Samuel Wales
@ 2009-07-30 18:50   ` Martin Pohlack
  2009-07-30 20:23     ` Samuel Wales
  2009-08-03 13:53     ` Carsten Dominik
  0 siblings, 2 replies; 6+ messages in thread
From: Martin Pohlack @ 2009-07-30 18:50 UTC (permalink / raw)
  To: Samuel Wales; +Cc: emacs-orgmode

Hi Samuel,

Samuel Wales wrote:
> Hi Martin,
> 
> This is a huge issue.[1]
> 
> Here is what I do to try to work around it.
> 
> I use git, to limit the damage from confusion.

Yes, this or a versioning filesystem is probably advisable.

> I expand the entire buffer if I think I am about to be confused.
> 
> ;;i like the idea of clustering undo but find it disconcerting
> (setf org-self-insert-cluster-for-undo nil)
> ;;somebody, I think Carsten, suggested this, and it might work for
> you, but for some reason I commented it out.  I don't remember what
> the reason was.  Maybe speed.
> '(defadvice undo (after org-undo-reveal activate)
>  "Make point and context visible after an undo command in Org-mode."
>  (and (org-mode-p) (org-reveal)))
> ;;(ad-unadvise 'undo)

Awesome, this is exactly what I was looking for!

> [1]  It is even more important when combined with what is IMO Emacs's
> greatest need for improvement, which is that you can undo, and undo an
> undo, and this is considered to be sufficient since you can get
> anywhere in the timeline in principle -- but many users, myself
> included, prefer a true redo command, both because undoing an undo
> does not let you do commands (such as copying) in the middle of an
> undo sequence without going the other direction, and because it feels
> more intuitive to tell emacs where in the timeline we want to go, and
> go forward or backward if we overshoot, thus making it possible to
> view the timeline the same way as we go backward and forward in any
> linear sequence.  (redo.el provides the functionality, but it corrupts
> the buffer.)  Of course, many are comfortable with the traditional
> undo-the-undo mechanism, so that should stay possible, but there are
> many who are not, and a redo mechanism would satisfy them.  It is
> possible to get more fancy with a tree.

The current undo system is very powerful as it doesn't lose history
(unless you hit a quota limit).  With undo-redo systems you usually can
lose history if you edit things in an old state.  Suddenly redo is not
available anymore.  You can only access the most recent branch in the
history tree.

In emacs this will not happen as you can reach all nodes in the buffer
history, but these states are not easily accessible, especially, if you
went back and forth some times.  I cannot track the list of states in my
mind or imagine the current structure of the undo tree, I can only go
step by step and look at the situation in the buffer and decide whether
this is what I wanted or not.

I recently stumbled upon an article which, I think, quiet nicely
summarized what one wants:

  http://e-texteditor.com/blog/2006/making-undo-usable

But it's not available for emacs ...

Cheers,
Martin

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

* Re: Unhiding edited areas
  2009-07-30 18:50   ` Martin Pohlack
@ 2009-07-30 20:23     ` Samuel Wales
  2009-08-03 13:53     ` Carsten Dominik
  1 sibling, 0 replies; 6+ messages in thread
From: Samuel Wales @ 2009-07-30 20:23 UTC (permalink / raw)
  To: Martin Pohlack; +Cc: emacs-orgmode

Hi Martin,

On 2009-07-30, Martin Pohlack <mp26@os.inf.tu-dresden.de> wrote:
>> '(defadvice undo (after org-undo-reveal activate)
>>  "Make point and context visible after an undo command in Org-mode."
>>  (and (org-mode-p) (org-reveal)))
>> ;;(ad-unadvise 'undo)
>
> Awesome, this is exactly what I was looking for!

Maybe we can improve on it with one or more of these:

  1) Check visibility before revealing.
  2) Speed.
  3) (emacs) /Include visibility in the undo stack/ so that
     visibility while undoing is always what it was when you
     did the editing.
  4) (emacs) Implement undo-redo so that manually revealing
     does not break the chain as it does with undo.

> The current undo system is very powerful as it doesn't lose history
> (unless you hit a quota limit).  With undo-redo systems you usually can
> lose history if you edit things in an old state.  Suddenly redo is not
> available anymore.  You can only access the most recent branch in the
> history tree.

Yes, unless you implement a tree.  But even with that
limitation, I prefer undo-redo.

The cognitive burden is not the only limitation
of undo-the-undo.  With undo-the-undo, you cannot
realistically copy text from different places in the undo
history.

Try to go back 50 edits, copy, go back a few more edits
(you're in trouble already :)), copy, go forward 10, copy,
go forward 15, copy, go back 15 more, copy, go back 15 more,
copy.  With undo-redo, I think that it would be faster.

>   http://e-texteditor.com/blog/2006/making-undo-usable

Yes, I agree that there are some good ideas there.

-- 
Myalgic encephalomyelitis makes you die decades early (Jason
et al. 2006) and suffer severely.  Conflicts of interest are
destroying research. What people "know" is wrong. Silence = death.
http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

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

* Re: Unhiding edited areas
  2009-07-30 18:50   ` Martin Pohlack
  2009-07-30 20:23     ` Samuel Wales
@ 2009-08-03 13:53     ` Carsten Dominik
  1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2009-08-03 13:53 UTC (permalink / raw)
  To: Martin Pohlack; +Cc: emacs-orgmode


On Jul 30, 2009, at 8:50 PM, Martin Pohlack wrote:

> Hi Samuel,
>
> Samuel Wales wrote:
>> Hi Martin,
>>
>> This is a huge issue.[1]
>>
>> Here is what I do to try to work around it.
>>
>> I use git, to limit the damage from confusion.
>
> Yes, this or a versioning filesystem is probably advisable.
>
>> I expand the entire buffer if I think I am about to be confused.
>>
>> ;;i like the idea of clustering undo but find it disconcerting
>> (setf org-self-insert-cluster-for-undo nil)
>> ;;somebody, I think Carsten, suggested this, and it might work for
>> you, but for some reason I commented it out.  I don't remember what
>> the reason was.  Maybe speed.
>> '(defadvice undo (after org-undo-reveal activate)
>> "Make point and context visible after an undo command in Org-mode."
>> (and (org-mode-p) (org-reveal)))
>> ;;(ad-unadvise 'undo)

Hi Samuel, Martin,

this could be a good FAQ entry, I think.

If speed was the reason to discard this, maybe try again, because
I believe that recent changes will have solved many of the speed issues
that might plague org-reveal in lists with many siblings.

- Carsten

>
> Awesome, this is exactly what I was looking for!
>
>> [1]  It is even more important when combined with what is IMO Emacs's
>> greatest need for improvement, which is that you can undo, and undo  
>> an
>> undo, and this is considered to be sufficient since you can get
>> anywhere in the timeline in principle -- but many users, myself
>> included, prefer a true redo command, both because undoing an undo
>> does not let you do commands (such as copying) in the middle of an
>> undo sequence without going the other direction, and because it feels
>> more intuitive to tell emacs where in the timeline we want to go, and
>> go forward or backward if we overshoot, thus making it possible to
>> view the timeline the same way as we go backward and forward in any
>> linear sequence.  (redo.el provides the functionality, but it  
>> corrupts
>> the buffer.)  Of course, many are comfortable with the traditional
>> undo-the-undo mechanism, so that should stay possible, but there are
>> many who are not, and a redo mechanism would satisfy them.  It is
>> possible to get more fancy with a tree.
>
> The current undo system is very powerful as it doesn't lose history
> (unless you hit a quota limit).  With undo-redo systems you usually  
> can
> lose history if you edit things in an old state.  Suddenly redo is not
> available anymore.  You can only access the most recent branch in the
> history tree.
>
> In emacs this will not happen as you can reach all nodes in the buffer
> history, but these states are not easily accessible, especially, if  
> you
> went back and forth some times.  I cannot track the list of states  
> in my
> mind or imagine the current structure of the undo tree, I can only go
> step by step and look at the situation in the buffer and decide  
> whether
> this is what I wanted or not.
>
> I recently stumbled upon an article which, I think, quiet nicely
> summarized what one wants:
>
>  http://e-texteditor.com/blog/2006/making-undo-usable
>
> But it's not available for emacs ...
>
> Cheers,
> Martin
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: 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] 6+ messages in thread

end of thread, other threads:[~2009-08-03 13:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-30 15:42 Unhiding edited areas Martin Pohlack
2009-07-30 17:44 ` Eric S Fraga
2009-07-30 18:10 ` Samuel Wales
2009-07-30 18:50   ` Martin Pohlack
2009-07-30 20:23     ` Samuel Wales
2009-08-03 13:53     ` Carsten Dominik

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