unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Strange behavior editing a file from Dired
@ 2016-12-08 20:35 Richard Stallman
  2016-12-09  7:46 ` Eli Zaretskii
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Richard Stallman @ 2016-12-08 20:35 UTC (permalink / raw)
  To: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

When I review mails before sending them out, I move down through
a Dired buffer typing C-o.  Sometimes I switch to the other window
and type C-x 1, edit that message file, and save it.  Then I switch
back to the Dired buffer.

Occasionally I find that point has moved up some number of lines in
the Dired buffer.  The number of lines varies.

This has been happening for months.

When I notice it, I type C-h l, but I have not noticed anything
significant in the output.  And I have not been able to reproduce it.

Has anyone else seen something like this?

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Strange behavior editing a file from Dired
  2016-12-08 20:35 Strange behavior editing a file from Dired Richard Stallman
@ 2016-12-09  7:46 ` Eli Zaretskii
  2016-12-09 15:06   ` Richard Stallman
  2016-12-09  9:24 ` Andreas Schwab
  2016-12-11 15:11 ` Simen Heggestøyl
  2 siblings, 1 reply; 10+ messages in thread
From: Eli Zaretskii @ 2016-12-09  7:46 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

> From: Richard Stallman <rms@gnu.org>
> Date: Thu, 08 Dec 2016 15:35:51 -0500
> 
> When I review mails before sending them out, I move down through
> a Dired buffer typing C-o.  Sometimes I switch to the other window
> and type C-x 1, edit that message file, and save it.  Then I switch
> back to the Dired buffer.
> 
> Occasionally I find that point has moved up some number of lines in
> the Dired buffer.  The number of lines varies.
> 
> This has been happening for months.
> 
> When I notice it, I type C-h l, but I have not noticed anything
> significant in the output.  And I have not been able to reproduce it.
> 
> Has anyone else seen something like this?

I haven't, but I don't use Dired much with this paradigm.

I would suggest to define some appropriate hook (pos-command-hook, if
nothing better exists) that watches the value of point in that buffer,
and signals an error when it changes.  Then you might be able to catch
the villain red-handed.



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

* Re: Strange behavior editing a file from Dired
  2016-12-08 20:35 Strange behavior editing a file from Dired Richard Stallman
  2016-12-09  7:46 ` Eli Zaretskii
@ 2016-12-09  9:24 ` Andreas Schwab
  2016-12-09 15:06   ` Richard Stallman
                     ` (2 more replies)
  2016-12-11 15:11 ` Simen Heggestøyl
  2 siblings, 3 replies; 10+ messages in thread
From: Andreas Schwab @ 2016-12-09  9:24 UTC (permalink / raw)
  To: Richard Stallman; +Cc: emacs-devel

On Dez 08 2016, Richard Stallman <rms@gnu.org> wrote:

> Occasionally I find that point has moved up some number of lines in
> the Dired buffer.  The number of lines varies.

Are you using multiple frames?  This can happen if the buffer is also
displayed in another frame with a different window point.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



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

* Re: Strange behavior editing a file from Dired
  2016-12-09  9:24 ` Andreas Schwab
@ 2016-12-09 15:06   ` Richard Stallman
  2016-12-09 15:53   ` Drew Adams
       [not found]   ` <<6f523b1f-71ab-4147-8d9d-7e7f1cb2b07d@default>
  2 siblings, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2016-12-09 15:06 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > > Occasionally I find that point has moved up some number of lines in
  > > the Dired buffer.  The number of lines varies.

  > Are you using multiple frames?  This can happen if the buffer is also
  > displayed in another frame with a different window point.

I am running Emacs in a terminal window
with only one frame.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Strange behavior editing a file from Dired
  2016-12-09  7:46 ` Eli Zaretskii
@ 2016-12-09 15:06   ` Richard Stallman
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2016-12-09 15:06 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I would suggest to define some appropriate hook (pos-command-hook, if
  > nothing better exists) that watches the value of point in that buffer,
  > and signals an error when it changes.  Then you might be able to catch
  > the villain red-handed.

I will try that.  Thanks.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* RE: Strange behavior editing a file from Dired
  2016-12-09  9:24 ` Andreas Schwab
  2016-12-09 15:06   ` Richard Stallman
@ 2016-12-09 15:53   ` Drew Adams
  2016-12-09 21:56     ` Richard Stallman
       [not found]   ` <<6f523b1f-71ab-4147-8d9d-7e7f1cb2b07d@default>
  2 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2016-12-09 15:53 UTC (permalink / raw)
  To: Andreas Schwab, Richard Stallman; +Cc: emacs-devel

> > Occasionally I find that point has moved up some number of lines in
> > the Dired buffer.  The number of lines varies.
> 
> Are you using multiple frames?  This can happen if the buffer is also
> displayed in another frame with a different window point.

My thought exactly.  It's a gotcha that I still fall into,
even though I've been using many frames for a long time.

You put the cursor back where it was, and after trying to
do something that depends on where it was, you see that it
was moved somewhere else.



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

* Re: Strange behavior editing a file from Dired
  2016-12-09 15:53   ` Drew Adams
@ 2016-12-09 21:56     ` Richard Stallman
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2016-12-09 21:56 UTC (permalink / raw)
  To: Drew Adams; +Cc: schwab, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > My thought exactly.  It's a gotcha that I still fall into,
  > even though I've been using many frames for a long time.

  > You put the cursor back where it was, and after trying to
  > do something that depends on where it was, you see that it
  > was moved somewhere else.

If it depends on multiple frames, it can't be the same bug I
experience, but it might be another bug.  If you see it again, please
report it.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* RE: Strange behavior editing a file from Dired
       [not found]     ` <<E1cFT9O-0001ky-7m@fencepost.gnu.org>
@ 2016-12-09 22:32       ` Drew Adams
  2016-12-11  9:32         ` Richard Stallman
  0 siblings, 1 reply; 10+ messages in thread
From: Drew Adams @ 2016-12-09 22:32 UTC (permalink / raw)
  To: rms; +Cc: schwab, emacs-devel

>   > My thought exactly.  It's a gotcha that I still fall into,
>   > even though I've been using many frames for a long time.
> 
>   > You put the cursor back where it was, and after trying to
>   > do something that depends on where it was, you see that it
>   > was moved somewhere else.
> 
> If it depends on multiple frames, it can't be the same bug I
> experience, but it might be another bug.  If you see it again,
> please report it.

I think it comes from having different window points when the
same buffer is displayed in different windows.  I'm not sure
that multiple _frames_ need to be involved, but perhaps Andreas
has an idea about that.  I use different frames, so I can't
really tell whether different windows are sufficient.

Possibly it's a bug in Dired.  What I think I see (sometimes)
is that Dired seems to be checking the window point in some
other window than the window that is selected when I request
the action.  It gets the buffer right, but not the window.
And by the end of the action it has moved point in the window
that was originally selected to the position it has in the
other window.

I'll try to pay more attention when it happens again and see
if I can notice what's involved.  In any case, I don't think
what I have seen is a new problem.  Dunno if it's the same
thing you're seeing.



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

* Re: Strange behavior editing a file from Dired
  2016-12-09 22:32       ` Drew Adams
@ 2016-12-11  9:32         ` Richard Stallman
  0 siblings, 0 replies; 10+ messages in thread
From: Richard Stallman @ 2016-12-11  9:32 UTC (permalink / raw)
  To: Drew Adams; +Cc: schwab, emacs-devel

[[[ To any NSA and FBI agents reading my email: please consider    ]]]
[[[ whether defending the US Constitution against all enemies,     ]]]
[[[ foreign or domestic, requires you to follow Snowden's example. ]]]

  > I think it comes from having different window points when the
  > same buffer is displayed in different windows.

I don't think so, because what I recall is that I didn't display one
buffer two windows.  ISTR that the log of recent keystrokes and commands
confirmed that.

  > Possibly it's a bug in Dired.  What I think I see (sometimes)
  > is that Dired seems to be checking the window point in some
  > other window than the window that is selected when I request
  > the action.

That sounds like a bug.  If you can determine any more, please post
it.

-- 
Dr Richard Stallman
President, Free Software Foundation (gnu.org, fsf.org)
Internet Hall-of-Famer (internethalloffame.org)
Skype: No way! See stallman.org/skype.html.




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

* Re: Strange behavior editing a file from Dired
  2016-12-08 20:35 Strange behavior editing a file from Dired Richard Stallman
  2016-12-09  7:46 ` Eli Zaretskii
  2016-12-09  9:24 ` Andreas Schwab
@ 2016-12-11 15:11 ` Simen Heggestøyl
  2 siblings, 0 replies; 10+ messages in thread
From: Simen Heggestøyl @ 2016-12-11 15:11 UTC (permalink / raw)
  To: rms; +Cc: emacs-devel

I've experienced something similar.

Sometimes I move through long lists of files in Dired, visiting them
along the way by pressing RET and then killing them with C-x k when
I'm done looking. Most of the time I'll find that point is located in
the same place that I left it in the Dired buffer, but on some
occasions point has moved all the way to the top of the buffer.

I haven't been able to reproduce it reliably.

-- Simen




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

end of thread, other threads:[~2016-12-11 15:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 20:35 Strange behavior editing a file from Dired Richard Stallman
2016-12-09  7:46 ` Eli Zaretskii
2016-12-09 15:06   ` Richard Stallman
2016-12-09  9:24 ` Andreas Schwab
2016-12-09 15:06   ` Richard Stallman
2016-12-09 15:53   ` Drew Adams
2016-12-09 21:56     ` Richard Stallman
     [not found]   ` <<6f523b1f-71ab-4147-8d9d-7e7f1cb2b07d@default>
     [not found]     ` <<E1cFT9O-0001ky-7m@fencepost.gnu.org>
2016-12-09 22:32       ` Drew Adams
2016-12-11  9:32         ` Richard Stallman
2016-12-11 15:11 ` Simen Heggestøyl

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