unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#23883: 24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity
@ 2016-07-02  1:55 MICHAEL J MCCLENNEN
  2016-07-03 11:55 ` Michael Albinus
  0 siblings, 1 reply; 4+ messages in thread
From: MICHAEL J MCCLENNEN @ 2016-07-02  1:55 UTC (permalink / raw)
  To: 23883


To reproduce this bug:

1) Edit a remote file using tramp.
2) Wait for at least 24 hours.
3) Make a change to the file in the local buffer.  Emacs will then attempt to query
   the remote system using tramp in order to check whether it has changed on disk
   before allowing any local editing.
4) Sometimes (not always) this check aborts with the error message "Args out of range".
   The buffer is left in read-only mode, preventing you from working on the file.

I have actually figured out where in the code the error occurs, and have a fix for it.  The
error occurs at the last line of the function `tramp-process-actions' in tramp.el, in the
call to `delete-region'.

The following patch will fix the problem:
3593c3593
< 	  (let (buffer-read-only) (if (< pos (point)) (delete-region pos (point)))))))))
---
> 	  (let (buffer-read-only) (delete-region pos (point))))))))

I have tested this patch, and it solves the problem without causing any other 
problems that I can detect.  I would appreciate if you would apply this patch 
to the Emacs source.



In Aquamacs 3.2 GNU Emacs 24.4.51.2
(x86_64-apple-darwin14.0.0, NS apple-appkit-1343.14)
of 2014-11-07 (Aquamacs-3.2) on watson.local
Operating System: OS X Version 10.8.5 (Build 12F2560)
Configured using:
`configure --with-ns --without-x 'CFLAGS=-arch x86_64 -O3 -g
-mtune=corei7 -mmacosx-version-min=10.6' 'LDFLAGS=-arch x86_64 -O3 -g
-mtune=corei7 -mmacosx-version-min=10.6''

Important settings:
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  savehist-mode: t
  smart-frame-positioning-mode: t
  shell-dirtrack-mode: t
  aquamacs-autoface-mode: t
  recentf-mode: t
  osx-key-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  cua-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t



Memory information:
((conses 16 866516 175475)
(symbols 48 45081 0)
(miscs 40 2907 3571)
(strings 32 103591 20533)
(string-bytes 1 4546451)
(vectors 16 50097)
(vector-slots 8 1858179 143262)
(floats 8 1921 792)
(intervals 56 167401 177)
(buffers 960 779))





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

end of thread, other threads:[~2016-08-08  9:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-02  1:55 bug#23883: 24.4.51; tramp sometimes reports "Args out of range" error when resuming editing a remote file after a period of inactivity MICHAEL J MCCLENNEN
2016-07-03 11:55 ` Michael Albinus
     [not found]   ` <858C806B-049F-45DE-9768-68A6CB8727E3@wisc.edu>
2016-07-29 13:03     ` Michael Albinus
2016-08-08  9:28       ` Michael Albinus

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