On Tue, 24 May 2011 16:20:34 -0700, Carl Worth wrote:
> On Tue, 24 May 2011 18:43:41 -0400, Austin Clements
> wrote:
> > Saving point this way is a bit dangerous, though. For example, if
> > you're near the end of the buffer and shorten the label, attempting to
> > restore the point could
Before the change, save-excursion was used to save the point.
But the restored position is affected by buffer modifications,
which results in jumping cursor. The patch saves and restores
point explicitly by using a variable instead of save-excursion.
---
emacs/notmuch-wash.el | 13
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements wrote:
> On Tue, May 24, 2011 at 6:16 PM, Dmitry Kurochkin
> wrote:
> > When a user clicks the button, the cursor is somewhere inside the old
> > label. ?If we save the point as a marker, after step 3 it would end up
> > at the position where
On Tue, 24 May 2011 15:01:04 -0700, Carl Worth wrote:
> On Wed, 25 May 2011 00:43:20 +0400, Dmitry Kurochkin gmail.com> wrote:
> > Now, looking at Emacs source code, save_excursion_save() uses
> > point_marker() to save the point. As you said above, markers are
> > updated when the
Hi Carl.
On Tue, 24 May 2011 13:20:56 -0700, Carl Worth wrote:
> On Mon, 23 May 2011 19:29:46 +0400, Dmitry Kurochkin gmail.com> wrote:
> > Before the change, save-excursion was used to save the point.
> > But the restored position is affected by buffer modifications,
> > which results in
On Tue, May 24, 2011 at 6:16 PM, Dmitry Kurochkin
wrote:
> When a user clicks the button, the cursor is somewhere inside the old
> label. ?If we save the point as a marker, after step 3 it would end up
> at the position where the old label was. ?If the new label is inserted
> before the old one,
On Wed, 25 May 2011 03:27:51 +0400, Dmitry Kurochkin wrote:
> (button-end cite-button) would move the point outside the button - to
> the next character after it.
OK. Your fix addresses my off-by-one bug. I've just pushed the whole
series, with your final amended fix, (and some updates I made to
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements wrote:
> Saving point this way is a bit dangerous, though. For example, if
> you're near the end of the buffer and shorten the label, attempting to
> restore the point could result in an error (or, a more benign example:
> the cursor could wind
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements wrote:
> Saving point this way is a bit dangerous, though. For example, if
> you're near the end of the buffer and shorten the label, attempting to
> restore the point could result in an error (or, a more benign example:
> the cursor could wind
On Wed, 25 May 2011 02:16:06 +0400, Dmitry Kurochkin wrote:
> Since the newbutton is placed at the same position where the old one was,
> restoring
> the point to the same offset it was at the beginning works as we need.
Thanks for explaining this. I'll experiment a bit and push the series,
On Wed, 25 May 2011 00:43:20 +0400, Dmitry Kurochkin wrote:
> Now, looking at Emacs source code, save_excursion_save() uses
> point_marker() to save the point. As you said above, markers are
> updated when the corresponding text is updated. That explains why the
> cursor jumps when using
On Mon, 23 May 2011 19:29:46 +0400, Dmitry Kurochkin wrote:
> Before the change, save-excursion was used to save the point.
> But the restored position is affected by buffer modifications,
> which results in jumping cursor. The patch saves and restores
> point explicitly by using a variable
On Mon, 23 May 2011 19:29:46 +0400, Dmitry Kurochkin
dmitry.kuroch...@gmail.com wrote:
Before the change, save-excursion was used to save the point.
But the restored position is affected by buffer modifications,
which results in jumping cursor. The patch saves and restores
point explicitly
Hi Carl.
On Tue, 24 May 2011 13:20:56 -0700, Carl Worth cwo...@cworth.org wrote:
On Mon, 23 May 2011 19:29:46 +0400, Dmitry Kurochkin
dmitry.kuroch...@gmail.com wrote:
Before the change, save-excursion was used to save the point.
But the restored position is affected by buffer
On Tue, 24 May 2011 15:01:04 -0700, Carl Worth cwo...@cworth.org wrote:
On Wed, 25 May 2011 00:43:20 +0400, Dmitry Kurochkin
dmitry.kuroch...@gmail.com wrote:
Now, looking at Emacs source code, save_excursion_save() uses
point_marker() to save the point. As you said above, markers are
On Tue, May 24, 2011 at 6:16 PM, Dmitry Kurochkin
dmitry.kuroch...@gmail.com wrote:
When a user clicks the button, the cursor is somewhere inside the old
label. If we save the point as a marker, after step 3 it would end up
at the position where the old label was. If the new label is inserted
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements amdra...@mit.edu wrote:
Saving point this way is a bit dangerous, though. For example, if
you're near the end of the buffer and shorten the label, attempting to
restore the point could result in an error (or, a more benign example:
the
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements amdra...@mit.edu wrote:
On Tue, May 24, 2011 at 6:16 PM, Dmitry Kurochkin
dmitry.kuroch...@gmail.com wrote:
When a user clicks the button, the cursor is somewhere inside the old
label. If we save the point as a marker, after step 3 it
Before the change, save-excursion was used to save the point.
But the restored position is affected by buffer modifications,
which results in jumping cursor. The patch saves and restores
point explicitly by using a variable instead of save-excursion.
---
emacs/notmuch-wash.el | 13
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements amdra...@mit.edu wrote:
Saving point this way is a bit dangerous, though. For example, if
you're near the end of the buffer and shorten the label, attempting to
restore the point could result in an error (or, a more benign example:
the
On Tue, 24 May 2011 16:20:34 -0700, Carl Worth cwo...@cworth.org wrote:
On Tue, 24 May 2011 18:43:41 -0400, Austin Clements amdra...@mit.edu wrote:
Saving point this way is a bit dangerous, though. For example, if
you're near the end of the buffer and shorten the label, attempting to
On Wed, 25 May 2011 03:27:51 +0400, Dmitry Kurochkin
dmitry.kuroch...@gmail.com wrote:
(button-end cite-button) would move the point outside the button - to
the next character after it.
OK. Your fix addresses my off-by-one bug. I've just pushed the whole
series, with your final amended fix,
Before the change, save-excursion was used to save the point.
But the restored position is affected by buffer modifications,
which results in jumping cursor. The patch saves and restores
point explicitly by using a variable instead of save-excursion.
---
emacs/notmuch-wash.el | 13
Before the change, save-excursion was used to save the point.
But the restored position is affected by buffer modifications,
which results in jumping cursor. The patch saves and restores
point explicitly by using a variable instead of save-excursion.
---
emacs/notmuch-wash.el | 13
24 matches
Mail list logo