unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: Bug in remote file save.
       [not found] <3d80920b$0$306$39cecf19@nnrp1.twtelecom.net>
@ 2002-09-13  2:13 ` Richard Stallman
  2002-09-13  2:30   ` Alan Shutko
  2002-09-13 12:54   ` Mike Baranski
  0 siblings, 2 replies; 9+ messages in thread
From: Richard Stallman @ 2002-09-13  2:13 UTC (permalink / raw)
  Cc: emacs-devel

Can you please tell us *exactly* what to type to reproduce this?

    In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll bars)
     of 2002-04-08 on porky.devel.redhat.com
    configured using `configure  i386-redhat-linux-gnu ...
    ...

    Please describe exactly what actions triggered the bug
    and the precise symptoms of the bug:

    I dired a directory remotely,  C-xd /me@server:/var/www/html/website, open 
    and edit a file, it saves the first time correctly.  For each further edit, 
    it gives a beep and the message "Keyboard macro terminated by command 
    ringing the bell".  Then, emacs thinks that I have an old copy of the file, 
    and gives the messages confirming that I want to edit an old version, and 
    prompting the next time I save to verify that I want to overwrite a newer 
    file.  When the beep comes, the file is not saved properly.

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

* Re: Bug in remote file save.
  2002-09-13  2:13 ` Bug in remote file save Richard Stallman
@ 2002-09-13  2:30   ` Alan Shutko
  2002-09-13 23:23     ` Kim F. Storm
  2002-09-13 12:54   ` Mike Baranski
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Shutko @ 2002-09-13  2:30 UTC (permalink / raw)
  Cc: rms, emacs-devel

>     I dired a directory remotely, C-xd
>     /me@server:/var/www/html/website, open and edit a file, it saves
>     the first time correctly.  For each further edit, it gives a
>     beep and the message "Keyboard macro terminated by command
>     ringing the bell".

Could you compare the time on your computer with the time on the
remote host?  Or, immediately after you save a file, look at it in
dired to see the timestamp?

I think I've seen things like this when the clock on the remote host
was significantly ahead of my time (by several minutes).  When I try
to save, I get a backtrace somewhat like this (sorry, this is from
21.2, since that's the only machine with access to a misconfigured
clock right now... I'll try a better backtrace when I get to work).

I don't know why it complains about a keyboard macro, but it does.

Debugger entered--Lisp error: (error "Keyboard macro terminated by a command ri$
  beep()
  byte-code("Æ^X^H\204l^@ÇÈÉ    !\"\210Ê^ZË )\227\211^[\fU\203^^^@Ì\202#^@Í^KÎ\$
  ask-user-about-supersession-threat("/tsreast:/user2/intouch/atstest")
  set-buffer-modified-p(t)
  byte-code("^H^Q\n^SÅ\f!\207" [last-coding-system-used coding-system-used file$
  ange-ftp-write-region(1 18 "/tsreast:/user2/intouch/atstest" nil t)
  apply(ange-ftp-write-region (1 18 "/tsreast:/user2/intouch/atstest" nil t))
  ange-ftp-hook-function(write-region 1 18 "/tsreast:/user2/intouch/atstest" ni$
  write-region(1 18 "/tsreast:/user2/intouch/atstest" nil t "/tsreast:/user2/in$
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer()
  save-buffer(1)
* call-interactively(save-buffer)

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
I sold my sole to Satan. He's been floundering around ever since.

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

* Re: Bug in remote file save.
  2002-09-13  2:13 ` Bug in remote file save Richard Stallman
  2002-09-13  2:30   ` Alan Shutko
@ 2002-09-13 12:54   ` Mike Baranski
  2002-09-14 17:35     ` Richard Stallman
  1 sibling, 1 reply; 9+ messages in thread
From: Mike Baranski @ 2002-09-13 12:54 UTC (permalink / raw)
  Cc: emacs-devel

It was the time issue.  The time was ahead on the remote server by 4 minutes, 
so that fixed it.  Can this option thing be changed?  Some files are on our 
local network, so I can set the machines to have the correct time, but for 
editing really remote files, this can be a problem...  Sorry for the false 
alarm, but thanks for the prompt response.

Mike.

On Thursday 12 September 2002 10:13 pm, you wrote:
> Can you please tell us *exactly* what to type to reproduce this?
>
>     In GNU Emacs 21.2.1 (i386-redhat-linux-gnu, X toolkit, Xaw3d scroll
> bars) of 2002-04-08 on porky.devel.redhat.com
>     configured using `configure  i386-redhat-linux-gnu ...
>     ...
>
>     Please describe exactly what actions triggered the bug
>     and the precise symptoms of the bug:
>
>     I dired a directory remotely,  C-xd /me@server:/var/www/html/website,
> open and edit a file, it saves the first time correctly.  For each further
> edit, it gives a beep and the message "Keyboard macro terminated by command
> ringing the bell".  Then, emacs thinks that I have an old copy of the file,
> and gives the messages confirming that I want to edit an old version, and
> prompting the next time I save to verify that I want to overwrite a newer
> file.  When the beep comes, the file is not saved properly.

-- 
##############################
#          Mike Baranski                   #
# Security Management Consulting  #
#      http://www.secmgmt.com         #
#           919-788-9200                 #
#############################

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

* Re: Bug in remote file save.
  2002-09-13 23:23     ` Kim F. Storm
@ 2002-09-13 22:49       ` Alan Shutko
  2002-09-15  1:50         ` Richard Stallman
  2002-09-15  1:50       ` Richard Stallman
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Shutko @ 2002-09-13 22:49 UTC (permalink / raw)
  Cc: mike, rms, emacs-devel

storm@cua.dk (Kim F. Storm) writes:

> So my question is: Were you using (or had loaded) calc when this
> happened?

No, that machine doesn't have calc anywhere... it happens in Emacs
21.2 with emacs -q --no-site-file.  (I was too busy today to check
the backtrace with CVS, sorry.)  I'll look into it some more....

When this happens, you don't even see the first prompt.  It shouldn't
beep until after it's given you a chance to answer a question... but
I don't see it.

If I edebug-defun, it shows the question, and I can confirm that
executing-kbd-macro is t.  Ah, there it is!  In 21.2,
ange-ftp-write-region binds executing-kbd-macro.  RMS fixed this in
July, but the patch hasn't made its way to the RC branch.

2002-07-12  Richard M. Stallman  <rms@gnu.org>

	* net/ange-ftp.el (ange-ftp-write-region):
	Don't bind executing-kbd-macro; instead, pass non-nil VISIT arg
	to ange-ftp-real-write-region.


-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
She was only the undertaker's daughter, but any man cadaver.

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

* Re: Bug in remote file save.
  2002-09-13  2:30   ` Alan Shutko
@ 2002-09-13 23:23     ` Kim F. Storm
  2002-09-13 22:49       ` Alan Shutko
  2002-09-15  1:50       ` Richard Stallman
  0 siblings, 2 replies; 9+ messages in thread
From: Kim F. Storm @ 2002-09-13 23:23 UTC (permalink / raw)
  Cc: mike, rms, emacs-devel

Alan Shutko <ats@acm.org> writes:

> I don't know why it complains about a keyboard macro, but it does.

It is the (beep) call in ask-user-about-supersession-threat which
issues that warning.

However, for this to happen, the executing-kbd-macro variable must be
non-nil.  This normally only happens when executing a keyboard macro.

Looking through the code, I only found two places where a package
explicitly sets the executing-kbd-macro variable; both of them in the
`calc' package.

The purpose seems to be a kludge to avoid some form of message from
save-buffer, but at the same time calc seems to install some kind of
save-buffer hook (I haven't tried to understand that part), so if that
hook is called with executing-kbd-macro set to non-nil (or the hook
function sets that variable itself), you will get the keyboard macro
error message if an error occurs during save-buffer via ange-ftp...

So my question is: Were you using (or had loaded) calc when this
happened?


> 
> Debugger entered--Lisp error: (error "Keyboard macro terminated by a command ri$
>   beep()
>   byte-code("Æ^X^H\204l^@ÇÈÉ    !\"\210Ê^ZË )\227\211^[\fU\203^^^@Ì\202#^@Í^KÎ\$
>   ask-user-about-supersession-threat("/tsreast:/user2/intouch/atstest")
>   set-buffer-modified-p(t)
>   byte-code("^H^Q\n^SÅ\f!\207" [last-coding-system-used coding-system-used file$
>   ange-ftp-write-region(1 18 "/tsreast:/user2/intouch/atstest" nil t)
>   apply(ange-ftp-write-region (1 18 "/tsreast:/user2/intouch/atstest" nil t))
>   ange-ftp-hook-function(write-region 1 18 "/tsreast:/user2/intouch/atstest" ni$
>   write-region(1 18 "/tsreast:/user2/intouch/atstest" nil t "/tsreast:/user2/in$
>   basic-save-buffer-2()
>   basic-save-buffer-1()
>   basic-save-buffer()
>   save-buffer(1)
> * call-interactively(save-buffer)
> 

-- 
Kim F. Storm <storm@cua.dk> http://www.cua.dk

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

* Re: Bug in remote file save.
  2002-09-13 12:54   ` Mike Baranski
@ 2002-09-14 17:35     ` Richard Stallman
  2002-09-14 18:27       ` Alan Shutko
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2002-09-14 17:35 UTC (permalink / raw)
  Cc: ats, emacs-devel

It seems like a bug to me that a Emacs is unable to visit a file
because of a time mismatch.  And it is surely a bug that the error
message talks about keyboard macros.

Alan, do you know anything about why that happens, or where in the
code causes it?

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

* Re: Bug in remote file save.
  2002-09-14 17:35     ` Richard Stallman
@ 2002-09-14 18:27       ` Alan Shutko
  0 siblings, 0 replies; 9+ messages in thread
From: Alan Shutko @ 2002-09-14 18:27 UTC (permalink / raw)
  Cc: mike, emacs-devel

Richard Stallman <rms@gnu.org> writes:

> It seems like a bug to me that a Emacs is unable to visit a file
> because of a time mismatch.  And it is surely a bug that the error
> message talks about keyboard macros.

It's not unable to visit the file.  It's unable to save it.  And the
base cause makes sense, which is why I never reported it.

When you save a file to a machine with a clock significantly ahead of
yours, the timestamp on the remote file will be well past the time
Emacs thinks it saved it.  So it'll think it's been modified by some
other program and will check to make sure you really want to save it.

The only reason this doesn't work is the (beep) thinks it's in a
keyboard macro, which you fixed in July on HEAD.  That code should
probably be put in the RC branch, unless it depends on something
else... I didn't trace it too far.

-- 
Alan Shutko <ats@acm.org> - In a variety of flavors!
Start showing up early for work

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

* Re: Bug in remote file save.
  2002-09-13 23:23     ` Kim F. Storm
  2002-09-13 22:49       ` Alan Shutko
@ 2002-09-15  1:50       ` Richard Stallman
  1 sibling, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2002-09-15  1:50 UTC (permalink / raw)
  Cc: ats, mike, emacs-devel, walters

    However, for this to happen, the executing-kbd-macro variable must be
    non-nil.  This normally only happens when executing a keyboard macro.

    Looking through the code, I only found two places where a package
    explicitly sets the executing-kbd-macro variable; both of them in the
    `calc' package.

    The purpose seems to be a kludge to avoid some form of message from
    save-buffer, but at the same time calc seems to install some kind of
    save-buffer hook (I haven't tried to understand that part), 

I think it is wrong for any package to set executing-knd-macro except
because it is executing a keyboard macro.  I think Calc needs to be
fixed.

Colin, can you work on fixing this?

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

* Re: Bug in remote file save.
  2002-09-13 22:49       ` Alan Shutko
@ 2002-09-15  1:50         ` Richard Stallman
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2002-09-15  1:50 UTC (permalink / raw)
  Cc: storm, mike, emacs-devel

      RMS fixed this in
    July, but the patch hasn't made its way to the RC branch.

    2002-07-12  Richard M. Stallman  <rms@gnu.org>

	    * net/ange-ftp.el (ange-ftp-write-region):
	    Don't bind executing-kbd-macro; instead, pass non-nil VISIT arg
	    to ange-ftp-real-write-region.

I will put that fix into RC, but we still should fix Calc.
Thanks to both of you for tracking this down and reporting the
problem in Calc.

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

end of thread, other threads:[~2002-09-15  1:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <3d80920b$0$306$39cecf19@nnrp1.twtelecom.net>
2002-09-13  2:13 ` Bug in remote file save Richard Stallman
2002-09-13  2:30   ` Alan Shutko
2002-09-13 23:23     ` Kim F. Storm
2002-09-13 22:49       ` Alan Shutko
2002-09-15  1:50         ` Richard Stallman
2002-09-15  1:50       ` Richard Stallman
2002-09-13 12:54   ` Mike Baranski
2002-09-14 17:35     ` Richard Stallman
2002-09-14 18:27       ` Alan Shutko

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