[21.5] Guard against non-error X I/O errors
10 years, 3 months
Stephen J. Turnbull
21.5
For some reason, when using the Quartz window manager to close an
XEmacs frame (close button or Cmd-W) on Mac OS X "Mavericks",
x_IO_error_handler gets invoked, with ENOERR as the current system
errno. This causes the frame's device to get deleted, which kills
XEmacs if there are no other frames open.
I suspect this is brain damage at Apple. I've checked several bug
trackers but seen nothing like this.
I've run with the following patch on Mavericks for a while, and also
on Gentoo (but I don't use X on that machine much and tend to close
frames with C-x 5 0 when I do -- still it's guaranteed crash on Mac,
so Linux is probably OK).
If somebody thinks I should conditionalize on Mac, I can do that, but
since X11 uses system errors here, testing against ENOERR should DTRT
on all platforms.
Will commit after a couple days if there is no objection.
Note: it's possible this function should be refactored but it is an
error handler so I'll leave that for another day. Also, on affected
platforms it will generate an annoying error message. Suppressing
that can wait for another day, too.
Steve
diff -r be3ca9e58c92 src/ChangeLog
--- a/src/ChangeLog Thu Jun 19 12:06:33 2014 +0900
+++ b/src/ChangeLog Thu Jun 19 15:27:47 2014 +0900
@@ -1,3 +1,18 @@
+2014-06-19 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * device-x.c (x_IO_error_handler): Check errno for a real error.
+
+ On Mac OS X 10.9 "Mavericks", x_IO_error_handler gets triggered by
+ Cmd-W or clicking on the WM's close button:
+
+ xemacs: Fatal I/O Error 0 (Undefined error: 0) on display connection \
+ "/tmp/launch-HpN0rX/org.macosforge.xquartz:0.0"
+ after 3746329 requests (3746329 known processed) \
+ with 0 events remaining.
+
+ This is inappropriate because there are other frames open on the
+ device.
+
2014-06-19 Stephen J. Turnbull <stephen(a)xemacs.org>
* buffer.c (case_fold_search): Improve docstring.
diff -r be3ca9e58c92 src/device-x.c
--- a/src/device-x.c Thu Jun 19 12:06:33 2014 +0900
+++ b/src/device-x.c Thu Jun 19 15:27:47 2014 +0900
@@ -1211,7 +1211,9 @@
assert (d != NULL);
dev = wrap_device (d);
- if (NILP (find_nonminibuffer_frame_not_on_device (dev)))
+ /* The test against ENOERR is a hack for Mac OS X 10.9, which invokes this
+ handler on successful deletion of a window. */
+ if (errno != ENOERR && NILP (find_nonminibuffer_frame_not_on_device (dev)))
{
int depth = begin_dont_check_for_quit ();
/* We're going down. */
@@ -1246,8 +1248,10 @@
/* According to X specs, we should not return from this function, or
Xlib might just decide to exit(). So we mark the offending
- console for deletion and throw to top level. */
- if (d)
+ console for deletion and throw to top level.
+ The test against ENOERR is a hack for Mac OS X 10.9, which invokes this
+ handler on successful deletion of a window. */
+ if (errno != ENOERR && d)
{
enqueue_magic_eval_event (io_error_delete_device, dev);
DEVICE_X_BEING_DELETED (d) = 1;
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/XEmacs: 2 new changesets
10 years, 4 months
Bitbucket
2 new commits in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/df691b681244/
Changeset: df691b681244
User: stephen_at_xemacs
Date: 2014-06-19 05:01:31
Summary: Improve docstring of 'case-fold-search.
Affected #: 2 files
diff -r b94d6e89ea5b88a2e428575dac03d665ca21bf0b -r df691b6812442ebeaa73275cdc0aeaaac91aca16 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -26,6 +26,10 @@
introduced by Ben's patch of
https://bitbucket.org/xemacs/xemacs/commits/047d37eb70d70f43803 .
+2014-06-19 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * buffer.c (case_fold_search): Improve docstring.
+
2014-05-08 Jerry James <james(a)xemacs.org>
* print.c (struct debug_bindings): Add print_circle field.
diff -r b94d6e89ea5b88a2e428575dac03d665ca21bf0b -r df691b6812442ebeaa73275cdc0aeaaac91aca16 src/buffer.c
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -2502,7 +2502,7 @@
*/ );
DEFVAR_BUFFER_LOCAL ("case-fold-search", case_fold_search /*
-*Non-nil if searches should ignore case.
+*If non-nil, searches and matches should ignore case.
Automatically becomes buffer-local when set in any fashion.
*/ );
https://bitbucket.org/xemacs/xemacs/commits/be3ca9e58c92/
Changeset: be3ca9e58c92
User: stephen_at_xemacs
Date: 2014-06-19 05:06:33
Summary: Reorder changelog.
Affected #: 1 file
diff -r df691b6812442ebeaa73275cdc0aeaaac91aca16 -r be3ca9e58c92a68d414210b217a4eef5bb6ea9d5 src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-19 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * buffer.c (case_fold_search): Improve docstring.
+
2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
Correct a couple of things in my last change.
@@ -26,10 +30,6 @@
introduced by Ben's patch of
https://bitbucket.org/xemacs/xemacs/commits/047d37eb70d70f43803 .
-2014-06-19 Stephen J. Turnbull <stephen(a)xemacs.org>
-
- * buffer.c (case_fold_search): Improve docstring.
-
2014-05-08 Jerry James <james(a)xemacs.org>
* print.c (struct debug_bindings): Add print_circle field.
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC21.5] Silly little doc patch
10 years, 4 months
Stephen J. Turnbull
APPROVE COMMIT 21.5
Like it says.
diff -r b94d6e89ea5b src/ChangeLog
--- a/src/ChangeLog Wed Jun 18 09:26:54 2014 +0100
+++ b/src/ChangeLog Thu Jun 19 12:08:42 2014 +0900
@@ -1,3 +1,7 @@
+2014-06-19 Stephen J. Turnbull <stephen(a)xemacs.org>
+
+ * buffer.c (case_fold_search): Improve docstring.
+
2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
Correct a couple of things in my last change.
diff -r b94d6e89ea5b src/buffer.c
--- a/src/buffer.c Wed Jun 18 09:26:54 2014 +0100
+++ b/src/buffer.c Thu Jun 19 12:08:42 2014 +0900
@@ -2502,7 +2502,7 @@
*/ );
DEFVAR_BUFFER_LOCAL ("case-fold-search", case_fold_search /*
-*Non-nil if searches should ignore case.
+*If non-nil, searches and matches should ignore case.
Automatically becomes buffer-local when set in any fashion.
*/ );
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/xemacs-packages: Jerry James: Fix "make bindist" when building with 21.4. See xemacs-beta message
10 years, 4 months
Bitbucket
1 new commit in xemacs-packages:
https://bitbucket.org/xemacs/xemacs-packages/commits/307b3ea3b0ef/
Changeset: 307b3ea3b0ef
User: Jerry James
Date: 2014-06-18 17:12:37
Summary: Fix "make bindist" when building with 21.4. See xemacs-beta message
<ygftx7l15ja.fsf(a)vserv.viteno.net> and xemacs-patches message
<CAHCOHQnxscxGCiLnaq-aQuXizLpOWFNZkKSUAQ7UJs3CvaLZ8w(a)mail.gmail.com>.
Affected #: 2 files
diff -r 9954f5555c86d01eb90ccbb4fa662988241fb58a -r 307b3ea3b0ef6b0754841779b4065ecf9e612689 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-06-18 Jerry James <james(a)xemacs.org>
+
+ * package-net-packages.el
+ (package-net-packages-batch-convert-index-to-ini): consume command
+ line arguments instead of just peeking at them.
+
2014-06-02 Jerry James <james(a)xemacs.org>
* Local.rules.template: Support texi2any. Drop support for
diff -r 9954f5555c86d01eb90ccbb4fa662988241fb58a -r 307b3ea3b0ef6b0754841779b4065ecf9e612689 package-net-packages.el
--- a/package-net-packages.el
+++ b/package-net-packages.el
@@ -145,8 +145,8 @@
"Convert the package index to ini file format."
(unless noninteractive
(error "`package-net-packages-batch-convert-index-to-ini' is to be used only with -batch"))
- (let ((dir (car command-line-args-left))
- (category (cadr command-line-args-left))
+ (let ((dir (pop command-line-args-left))
+ (category (pop command-line-args-left))
(package-get-require-signed-base-updates nil))
(package-net-packages-convert-index-to-ini dir nil category)))
Repository URL: https://bitbucket.org/xemacs/xemacs-packages/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC packages] Fix make bindist
10 years, 4 months
Jerry James
APPROVE COMMIT packages
On Wed, Jun 18, 2014 at 3:24 AM, Norbert Koch <viteno(a)xemacs.org> wrote:
> Thanks a lot! I've applied it by hand (too many mailers had their
> fingers into this :-)) and now the make works.
Ugh, sorry about the mailer damage. One of these days I am really,
really going to get gnus working again.... Anyway, thanks for the
confirmation. I tried building with 21.5 and this patch, and that
also worked.
>> And maybe that let should be a let*?
>
> Sounds reasonable.
Actually, no, that won't make any difference. I was just thinking it
would emphasize the serial nature of the operation: pop this argument
first, then pop that other argument. But as far as the operation of
the code goes, it doesn't matter.
I am committing the following patch, which means yet another top-level
push, Norbert.
diff -r 9954f5555c86 ChangeLog
--- a/ChangeLog Wed Jun 04 15:49:00 2014 -0600
+++ b/ChangeLog Wed Jun 18 09:09:35 2014 -0600
@@ -1,3 +1,9 @@
+2014-06-18 Jerry James <james(a)xemacs.org>
+
+ * package-net-packages.el
+ (package-net-packages-batch-convert-index-to-ini): consume command
+ line arguments instead of just peeking at them.
+
2014-06-02 Jerry James <james(a)xemacs.org>
* Local.rules.template: Support texi2any. Drop support for
diff -r 9954f5555c86 package-net-packages.el
--- a/package-net-packages.el Wed Jun 04 15:49:00 2014 -0600
+++ b/package-net-packages.el Wed Jun 18 09:09:35 2014 -0600
@@ -145,8 +145,8 @@
"Convert the package index to ini file format."
(unless noninteractive
(error "`package-net-packages-batch-convert-index-to-ini' is to
be used only with -batch"))
- (let ((dir (car command-line-args-left))
- (category (cadr command-line-args-left))
+ (let ((dir (pop command-line-args-left))
+ (category (pop command-line-args-left))
(package-get-require-signed-base-updates nil))
(package-net-packages-convert-index-to-ini dir nil category)))
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[COMMIT] Correct a couple of small things with my last change.
10 years, 4 months
Aidan Kehoe
APPROVE COMMIT
NOTE: This patch has been committed.
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1403080014 -3600
# Wed Jun 18 09:26:54 2014 +0100
# Node ID b94d6e89ea5b88a2e428575dac03d665ca21bf0b
# Parent a1808d52a34a15175e99534534b4a3668135bbda
Correct a couple of small things with my last change.
src/ChangeLog addition:
2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
Correct a couple of things in my last change.
* extents.h:
Make #'delete-extent available.
* window.c:
* window.c (delete_saved_point): New.
* window.c (Fdelete_window): Delete the saved point extents on
deletion of the window, since otherwise they will only be
garbage-collected when the buffer is.
* window.c (Fset_window_buffer): Correct a thinko here, use a
saved point when it *hasn't* been detached.
diff -r a1808d52a34a -r b94d6e89ea5b src/ChangeLog
--- a/src/ChangeLog Tue Jun 17 20:55:45 2014 +0100
+++ b/src/ChangeLog Wed Jun 18 09:26:54 2014 +0100
@@ -1,3 +1,16 @@
+2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Correct a couple of things in my last change.
+ * extents.h:
+ Make #'delete-extent available.
+ * window.c:
+ * window.c (delete_saved_point): New.
+ * window.c (Fdelete_window): Delete the saved point extents on
+ deletion of the window, since otherwise they will only be
+ garbage-collected when the buffer is.
+ * window.c (Fset_window_buffer): Correct a thinko here, use a
+ saved point when it *hasn't* been detached.
+
2014-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
* extents.h:
diff -r a1808d52a34a -r b94d6e89ea5b src/extents.h
--- a/src/extents.h Tue Jun 17 20:55:45 2014 +0100
+++ b/src/extents.h Wed Jun 18 09:26:54 2014 +0100
@@ -133,6 +133,7 @@
EXFUN (Fput_text_property, 5);
EXFUN (Fextent_detached_p, 1);
+EXFUN (Fdelete_extent, 1);
EXFUN (Fdetach_extent, 1);
EXFUN (Fextent_end_position, 1);
EXFUN (Fextent_object, 1);
diff -r a1808d52a34a -r b94d6e89ea5b src/window.c
--- a/src/window.c Tue Jun 17 20:55:45 2014 +0100
+++ b/src/window.c Wed Jun 18 09:26:54 2014 +0100
@@ -2206,6 +2206,14 @@
return 0;
}
+static int
+delete_saved_point (Lisp_Object UNUSED (buffer), Lisp_Object saved_point,
+ void *UNUSED (closure))
+{
+ Fdelete_extent (saved_point);
+ return 0;
+}
+
DEFUN ("delete-window", Fdelete_window, 0, 2, "", /*
Remove WINDOW from the display. Default is selected window.
If window is the only one on its frame, the frame is deleted as well.
@@ -2319,6 +2327,11 @@
w->buffer = Qnil;
}
+ /* Delete the saved point extents, since they will still be referenced
+ from the buffer and thus won't be garbage-collected until the buffer
+ is. */
+ elisp_maphash_unsafe (delete_saved_point, w->saved_point_cache, NULL);
+
/* close up the hole in the sibling list */
if (!NILP (w->next))
XWINDOW (w->next)->prev = w->prev;
@@ -3725,7 +3738,7 @@
{
Lisp_Object saved_point = Fgethash (buffer, w->saved_point_cache, Qnil);
Lisp_Object newpoint =
- (EXTENTP (saved_point) && !NILP (Fextent_detached_p (saved_point)))
+ (EXTENTP (saved_point) && NILP (Fextent_detached_p (saved_point)))
? Fextent_start_position (saved_point)
: make_fixnum (BUF_PT (XBUFFER (buffer)));
Lisp_Object marker;
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/XEmacs: kehoea: Correct a couple of small things with my last change.
10 years, 4 months
Bitbucket
1 new commit in XEmacs:
https://bitbucket.org/xemacs/xemacs/commits/b94d6e89ea5b/
Changeset: b94d6e89ea5b
User: kehoea
Date: 2014-06-18 10:26:54
Summary: Correct a couple of small things with my last change.
src/ChangeLog addition:
2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
Correct a couple of things in my last change.
* extents.h:
Make #'delete-extent available.
* window.c:
* window.c (delete_saved_point): New.
* window.c (Fdelete_window): Delete the saved point extents on
deletion of the window, since otherwise they will only be
garbage-collected when the buffer is.
* window.c (Fset_window_buffer): Correct a thinko here, use a
saved point when it *hasn't* been detached.
Affected #: 3 files
diff -r a1808d52a34a15175e99534534b4a3668135bbda -r b94d6e89ea5b88a2e428575dac03d665ca21bf0b src/ChangeLog
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,16 @@
+2014-06-18 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ Correct a couple of things in my last change.
+ * extents.h:
+ Make #'delete-extent available.
+ * window.c:
+ * window.c (delete_saved_point): New.
+ * window.c (Fdelete_window): Delete the saved point extents on
+ deletion of the window, since otherwise they will only be
+ garbage-collected when the buffer is.
+ * window.c (Fset_window_buffer): Correct a thinko here, use a
+ saved point when it *hasn't* been detached.
+
2014-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
* extents.h:
diff -r a1808d52a34a15175e99534534b4a3668135bbda -r b94d6e89ea5b88a2e428575dac03d665ca21bf0b src/extents.h
--- a/src/extents.h
+++ b/src/extents.h
@@ -133,6 +133,7 @@
EXFUN (Fput_text_property, 5);
EXFUN (Fextent_detached_p, 1);
+EXFUN (Fdelete_extent, 1);
EXFUN (Fdetach_extent, 1);
EXFUN (Fextent_end_position, 1);
EXFUN (Fextent_object, 1);
diff -r a1808d52a34a15175e99534534b4a3668135bbda -r b94d6e89ea5b88a2e428575dac03d665ca21bf0b src/window.c
--- a/src/window.c
+++ b/src/window.c
@@ -2206,6 +2206,14 @@
return 0;
}
+static int
+delete_saved_point (Lisp_Object UNUSED (buffer), Lisp_Object saved_point,
+ void *UNUSED (closure))
+{
+ Fdelete_extent (saved_point);
+ return 0;
+}
+
DEFUN ("delete-window", Fdelete_window, 0, 2, "", /*
Remove WINDOW from the display. Default is selected window.
If window is the only one on its frame, the frame is deleted as well.
@@ -2319,6 +2327,11 @@
w->buffer = Qnil;
}
+ /* Delete the saved point extents, since they will still be referenced
+ from the buffer and thus won't be garbage-collected until the buffer
+ is. */
+ elisp_maphash_unsafe (delete_saved_point, w->saved_point_cache, NULL);
+
/* close up the hole in the sibling list */
if (!NILP (w->next))
XWINDOW (w->next)->prev = w->prev;
@@ -3725,7 +3738,7 @@
{
Lisp_Object saved_point = Fgethash (buffer, w->saved_point_cache, Qnil);
Lisp_Object newpoint =
- (EXTENTP (saved_point) && !NILP (Fextent_detached_p (saved_point)))
+ (EXTENTP (saved_point) && NILP (Fextent_detached_p (saved_point)))
? Fextent_start_position (saved_point)
: make_fixnum (BUF_PT (XBUFFER (buffer)));
Lisp_Object marker;
Repository URL: https://bitbucket.org/xemacs/xemacs/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[COMMIT] If the position of a window's cached point is deleted, use buffer point instead
10 years, 4 months
Aidan Kehoe
APPROVE COMMIT
NOTE: Ths patch has been committed.
Ar an seachtú lá déag de mí Meitheamh, scríobh Michael Heinrich:
> I tested it with 21.5.34 and it works for me. Cursor-position stays at
> the right place in dired buffer after editing a file. Thank you.
Great!
# HG changeset patch
# User Aidan Kehoe <kehoea(a)parhasard.net>
# Date 1403034945 -3600
# Tue Jun 17 20:55:45 2014 +0100
# Node ID a1808d52a34a15175e99534534b4a3668135bbda
# Parent acf1c26e3019f3e8171b591c5b9e120f87187012
If the position of a window's cached point is deleted, use buffer point instead
src/ChangeLog addition:
2014-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
* extents.h:
* window.c:
* window.c (unshow_buffer):
* window.c (Fset_window_buffer):
Use extents, rather than markers, for the window buffer point
cache, so that when the text containing that window buffer point
is deleted, the window display code uses the buffer's actual point
instead of the position that the marker had been moved to.
Fixes Michael Heinrich's problem of
http://mid.gmane.org/6zr42uxtf5.fsf@elektra.science-computing.de ,
introduced by Ben's patch of
https://bitbucket.org/xemacs/xemacs/commits/047d37eb70d70f43803 .
diff -r acf1c26e3019 -r a1808d52a34a src/ChangeLog
--- a/src/ChangeLog Thu May 15 12:25:25 2014 -0600
+++ b/src/ChangeLog Tue Jun 17 20:55:45 2014 +0100
@@ -1,3 +1,18 @@
+2014-06-17 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * extents.h:
+ * window.c:
+ * window.c (unshow_buffer):
+ * window.c (Fset_window_buffer):
+ Use extents, rather than markers, for the window buffer point
+ cache, so that when the text containing that window buffer point
+ is deleted, the window display code uses the buffer's actual point
+ instead of the position that the marker had been moved to.
+ Fixes Michael Heinrich's problem of
+ http://mid.gmane.org/6zr42uxtf5.fsf@elektra.science-computing.de ,
+ introduced by Ben's patch of
+ https://bitbucket.org/xemacs/xemacs/commits/047d37eb70d70f43803 .
+
2014-05-08 Jerry James <james(a)xemacs.org>
* print.c (struct debug_bindings): Add print_circle field.
diff -r acf1c26e3019 -r a1808d52a34a src/extents.h
--- a/src/extents.h Thu May 15 12:25:25 2014 -0600
+++ b/src/extents.h Tue Jun 17 20:55:45 2014 +0100
@@ -132,6 +132,7 @@
EXFUN (Fextent_property, 3);
EXFUN (Fput_text_property, 5);
+EXFUN (Fextent_detached_p, 1);
EXFUN (Fdetach_extent, 1);
EXFUN (Fextent_end_position, 1);
EXFUN (Fextent_object, 1);
diff -r acf1c26e3019 -r a1808d52a34a src/window.c
--- a/src/window.c Thu May 15 12:25:25 2014 -0600
+++ b/src/window.c Tue Jun 17 20:55:45 2014 +0100
@@ -41,6 +41,7 @@
#include "commands.h"
#include "device-impl.h"
#include "elhash.h"
+#include "extents.h"
#include "faces.h"
#include "frame-impl.h"
#include "glyphs.h"
@@ -2047,17 +2048,29 @@
BUF_ZV (b)));
{
- Lisp_Object marker = Fgethash (buf, w->saved_point_cache, Qnil);
+ Lisp_Object marker;
+ Lisp_Object saved_point = Fgethash (buf, w->saved_point_cache, Qnil);
int selected = EQ (wrap_window (w), Fselected_window (Qnil));
- if (NILP (marker))
+ if (NILP (saved_point))
{
- marker = Fmake_marker ();
- Fputhash (buf, marker, w->saved_point_cache);
+ saved_point = Fmake_extent (Qnil, Qnil, buf);
+ Fset_extent_property (saved_point, Qstart_open, Qt);
+ Fputhash (buf, saved_point, w->saved_point_cache);
}
- Fset_marker (marker,
- selected ? make_fixnum (BUF_PT (b)) : w->pointm[CURRENT_DISP],
- buf);
+
+ if (selected)
+ {
+ set_extent_endpoints (XEXTENT (saved_point),
+ BYTE_BUF_PT (b), BYTE_BUF_PT (b), buf);
+ }
+ else
+ {
+ set_extent_endpoints (XEXTENT (saved_point),
+ byte_marker_position (w->pointm[CURRENT_DISP]),
+ byte_marker_position (w->pointm[CURRENT_DISP]),
+ buf);
+ }
marker = Fgethash (buf, w->saved_last_window_start_cache, Qnil);
@@ -3710,10 +3723,12 @@
buffer);
#else
{
- Lisp_Object marker = Fgethash (buffer, w->saved_point_cache, Qnil);
+ Lisp_Object saved_point = Fgethash (buffer, w->saved_point_cache, Qnil);
Lisp_Object newpoint =
- !NILP (marker) ? make_fixnum (marker_position (marker)) :
- make_fixnum (BUF_PT (XBUFFER (buffer)));
+ (EXTENTP (saved_point) && !NILP (Fextent_detached_p (saved_point)))
+ ? Fextent_start_position (saved_point)
+: make_fixnum (BUF_PT (XBUFFER (buffer)));
+ Lisp_Object marker;
/* Previously, we had in here set-window-point, which did one of the
following two, but not both. However, that could result in pointm
being in a different buffer from the window's buffer! Probably
--
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
commit/tramp: albinus: Sync with Tramp 2.2.10.
10 years, 4 months
Bitbucket
1 new commit in tramp:
https://bitbucket.org/xemacs/tramp/commits/2a6a5aaac4f9/
Changeset: 2a6a5aaac4f9
User: albinus
Date: 2014-06-15 18:28:15
Summary: Sync with Tramp 2.2.10.
Affected #: 17 files
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 ChangeLog
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-06-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * Makefile (AUTHOR_VERSION): Bump to 2.2.10.
+
2014-06-02 Jerry James <james(a)xemacs.org>
* .hgignore: Fix paths to _pkg.el, auto-autoloads.el,
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 ChangeLog.upstream
--- a/ChangeLog.upstream
+++ b/ChangeLog.upstream
@@ -1,3 +1,26 @@
+2014-06-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Version 2.2.10 released.
+
+ * configure.ac: Bump version.
+
+2014-05-05 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * CONTRIBUTORS: Removed, file is out-of-date.
+
+ * Makefile.in (XEMACS_FILES):
+ * README: Remove CONTRIBUTORS.
+
+2014-02-28 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * Makefile.in (test): New target.
+ (.PHONY): Add it.
+
+2014-02-19 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * configure.ac: Bump version (to 2.2.10-pre). Update merge
+ version to 2.2.9.
+
2014-02-16 Michael Albinus <michael.albinus(a)gmx.de>
Version 2.2.9 released.
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 Makefile
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
# Boston, MA 02111-1307, USA.
VERSION = 1.50
-AUTHOR_VERSION = 2.2.9
+AUTHOR_VERSION = 2.2.10
MAINTAINER = Michael Albinus <michael.albinus(a)gmx.de>
PACKAGE = tramp
PKG_TYPE = regular
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/ChangeLog
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,4 +1,89 @@
-2014-05-20 Michael Albinus <michael.albinus(a)gmx.de>
+2014-06-15 Michael Albinus <michael.albinus(a)gmx.de>
+
+ Version 2.2.10 released.
+
+ * tramp.el (tramp-check-cached-permissions): Use
+ `tramp-compat-file-attributes'.
+
+ * tramp-cache.el (tramp-flush-file-function): Do not flush file
+ properties of temporary buffers.
+
+ * tramp-sh.el (tramp-call-local-coding-command): Use nil as
+ argument of `tramp-call-process'.
+
+2014-06-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-call-process): Add new argument VEC.
+ (tramp-set-completion-function, tramp-parse-putty)
+ * tramp-adb.el (tramp-adb-execute-adb-command)
+ * tramp-sh.el (tramp-sh-handle-set-file-times)
+ (tramp-set-file-uid-gid, tramp-do-copy-or-rename-file-out-of-band)
+ (tramp-sh-handle-write-region, tramp-call-local-coding-command):
+ Adapt callees.
+
+ * tramp-adb.el (tramp-adb-maybe-open-connection): Don't set
+ `tramp-current-*' variables.
+
+ * tramp-gvfs.el (tramp-gvfs-handle-file-name-all-completions):
+ Use "-h" option for "gvfs-ls".
+ (tramp-gvfs-send-command): Simplify traces.
+
+ * tramp-smb.el (tramp-smb-handle-insert-directory): Use progress
+ reporter.
+
+2014-06-03 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-ssh-controlmaster-options): Improve search
+ regexp. (Bug#17653)
+
+2014-06-02 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-call-process): Add traces.
+ (tramp-handle-unhandled-file-name-directory): Return "/".
+
+2014-05-31 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-adb.el (tramp-adb-handle-write-region): Improve messages.
+
+ * tramp-efs.el (top):
+ * tramp-ftp.el (top): Remove special handling for URL syntax.
+
+ * tramp-gvfs.el (tramp-gvfs-handle-delete-file): Flush file
+ properties, not directory properties.
+
+ * tramp-smb.el (tramp-smb-handle-copy-directory)
+ (tramp-smb-handle-set-file-acl): Use `start-process'.
+ (tramp-smb-handle-rename-file): Flush also file properties of
+ FILENAME.
+
+2014-05-26 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-gvfs.el (tramp-gvfs-methods) <sftp>: Add.
+ (tramp-gvfs-handle-file-attributes): Use `string-to-number' when
+ reading "unix::mode".
+ (tramp-gvfs-url-file-name): `user' and `localname' could be nil.
+
+ * tramp-sh.el (tramp-methods) <sftp>: Remove. It has never worked
+ satisfactorily.
+ (top): Remove completion function for "sftp".
+
+2014-05-17 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-find-inline-encoding): Do not match "%%t" for
+ a temporary file name.
+
+2014-05-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-methods) <plinkx>: Reinsert. There are
+ cases, where "plink -ssh" is not desired.
+ (top): Reinsert completion function for "plinkx".
+
+2014-05-12 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-handle-file-accessible-directory-p): Check for
+ `file-readable-p' instead of `file-executable-p'.
+
+2014-05-06 Michael Albinus <michael.albinus(a)gmx.de>
* tramp-sh.el (tramp-uudecode): Replace the hard-coded temporary
file name by a format specifier.
@@ -7,6 +92,266 @@
name. (Bug#17415)
This is CVE-2014-3424.
+2014-05-05 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-remote-process-environment): Change :version
+ to "24.4".
+ (tramp-open-shell): Do not let-bind `tramp-end-of-output'.
+
+2014-04-22 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-name-all-completions):
+ Set IFS=" when using read builtin, in order to preserve spaces in
+ the file name.
+
+2014-04-16 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-run-real-handler, tramp-file-name-handler):
+ Do not autoload.
+ (tramp-file-name-handler, tramp-completion-file-name-handler):
+ Revert patch from 2014-04-10, it isn't necessary anymore.
+ (tramp-autoload-file-name-handler)
+ (tramp-register-autoload-file-name-handlers): New defuns.
+ (top): Autoload call of `tramp-register-autoload-file-name-handlers'.
+ (tramp-register-file-name-handlers): Remove also
+ `tramp-autoload-file-name-handler' from `file-name-handler-list'.
+ Do not autoload its invocation, but eval it after loading of 'tramp.
+
+2014-04-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Revert previous
+ patch, there are new problems with file names containing spaces.
+ Get rid of backticks. (Bug#17238)
+
+2014-04-11 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Quote the file name
+ twice due to backticks. (Bug#17238)
+ (tramp-sh-handle-expand-file-name): Tweak docstring.
+
+2014-04-10 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Tweak docstring.
+ (tramp-file-name-handler, tramp-completion-file-name-handler):
+ Avoid recursive loading.
+
+ * tramp-adb.el (tramp-unload-hook): Unload `tramp-adb'.
+
+ * tramp-compat.el (tramp-unload-hook): Unload `tramp-loaddefs'.
+
+ * tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
+ Tweak docstring.
+ (tramp-sh-handle-write-region): Tweak error message.
+ (tramp-make-copy-program-file-name): Tweak docstring. Quote
+ result also locally.
+
+2014-03-31 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-remote-process-environment): Remove HISTFILE
+ and HISTSIZE; it's too late to set them here. Add :version entry.
+ (tramp-open-shell): Add "HISTFILE=/dev/null" to the shell's env
+ arguments. Do not send extra "PSx=..." commands.
+ (tramp-maybe-open-connection): Setenv HISTFILE to /dev/null.
+
+2014-03-25 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-connection-timeout): Fix docstring.
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Revert change from
+ 2014-03-07, it decreases performance unnecessarily. Let-bind
+ `remote-file-name-inhibit-cache' to nil in the second pass.
+ (tramp-do-copy-or-rename-file-directly): In the `rename' case,
+ check whether source directory has set the sticky bit.
+
+2014-03-24 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-methods) <plinkx>: Remove. Use its
+ `tramp-login-args' for "plink", "pscp" and "psftp".
+ (top): Remove completion function for "plinkx". Completion
+ function for "psftp" is `tramp-completion-function-alist-ssh'.
+ (tramp-find-executable): Do not call "which" on SunOS.
+
+2014-03-23 Thierry Volpiatto <thierry.volpiatto(a)gmail.com>
+
+ * tramp.el (tramp-read-passwd): Suspend the timers while reading
+ the password.
+
+2014-03-21 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Add docstring for `tramp-login-env'
+ and `tramp-copy-env'.
+
+ * tramp-sh.el (tramp-methods) <sudo>: Add `tramp-login-env'.
+ (tramp-maybe-open-connection): Handle `tramp-login-env'.
+
+2014-03-20 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (vc-handled-backends, vc-bzr-program)
+ (vc-git-program, vc-hg-program): Declare.
+ (tramp-sh-handle-vc-registered): Remove backends when the remote
+ binary does not exist.
+
+2014-03-17 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-action-out-of-band): Read pending output.
+
+ * tramp-sh.el (tramp-methods) <telnet, nc>: Redirect stderr to
+ "/dev/null".
+ (tramp-do-copy-or-rename-file-out-of-band): Simplify assembling of
+ remote command.
+ (tramp-find-inline-encoding): Do not raise an error.
+ (tramp-send-command-and-check): Fix docstring.
+
+2014-03-16 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-methods) <nc>: Tune `tramp-remote-copy-*'.
+ (tramp-do-copy-or-rename-file-out-of-band): Fiddle with the remote
+ commands.
+
+2014-03-14 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Add docstring for
+ `tramp-remote-copy-program' and `tramp-remote-copy-args'.
+
+ * tramp-sh.el (tramp-methods) <nc>: Add `tramp-remote-copy-*'.
+ (tramp-do-copy-or-rename-file-out-of-band): Merge
+ `tramp-do-copy-or-rename-file-with-nc'.
+ (tramp-do-copy-or-rename-file-with-nc, tramp-get-remote-nc): Remove.
+ (tramp-make-copy-program-file-name): Handle also the "nc" case.
+
+2014-03-13 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-methods): Fix docstring for `tramp-copy-program'.
+ (tramp-call-process): Trace also DESTINATION.
+
+ * tramp-sh.el (tramp-methods, tramp-default-user-alist): Add "nc".
+ (top): Completion function for "nc" is
+ `tramp-completion-function-alist-telnet'.
+ (tramp-do-copy-or-rename-file-out-of-band): Call function if
+ adviced in `tramp-methods'. Do not set `default-directory' for
+ `start-process-shell-command' call, not needed anymore.
+ (tramp-do-copy-or-rename-file-with-nc, tramp-get-remote-nc): New defuns.
+
+2014-03-10 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-open-connection-setup-interactive-shell):
+ Do not add nil to the environment, when there's no remote `locale'.
+ (tramp-find-inline-encoding): Check, that the remote host has
+ installed perl, before sending scripts.
+
+2014-03-07 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass only
+ when `remote-file-name-inhibit-cache' is nil.
+ (tramp-sh-file-name-handler): Use `tramp-error'. Simplify code.
+
+2014-03-06 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-error): VEC-OR-PROC can be nil.
+ (tramp-action-password): Clear password cache if needed.
+ (tramp-read-passwd): Do not clear password cache.
+
+ * tramp-gvfs.el (tramp-gvfs-handler-askpassword): Clear password
+ cache unless it is the first password request.
+
+2014-03-04 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-vc-registered): Do not call
+ `tramp-send-command-and-check'.
+
+2014-02-28 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-adb.el (tramp-adb-parse-device-names):
+ Use `accept-process-output'.
+ (tramp-adb-handle-file-truename): Cache the localname only.
+ (tramp-adb-handle-make-directory)
+ (tramp-adb-handle-delete-directory): Flush file properties correctly.
+ (tramp-adb-handle-set-file-modes): Do not raise an error when file
+ modes cannot be changed.
+
+ * tramp-cache.el (tramp-flush-directory-property): Remove also
+ file properties of symlinks.
+
+2014-02-27 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-call-process): Improve trace message.
+ (tramp-handle-insert-file-contents): Trace error case.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist)
+ <insert-directory>: Use `tramp-handle-insert-directory'.
+ (tramp-adb-handle-insert-directory): Remove function.
+ (tramp-adb-send-command-and-check): New defun, replacing
+ `tramp-adb-command-exit-status'. Change all callees.
+ (tramp-adb-handle-file-attributes)
+ (tramp-adb-handle-directory-files-and-attributes): Use it.
+ (tramp-adb-ls-output-name-less-p): Use
+ `directory-listing-before-filename-regexp'.
+ (tramp-adb-handle-delete-directory): Flush also file properties of
+ the truename of directory.
+ (tramp-adb-handle-file-name-all-completions): Add "./" and "../".
+ (tramp-adb-handle-file-local-copy): Make the local copy readable.
+ (tramp-adb-handle-write-region): Implement APPEND.
+ (tramp-adb-handle-rename-file): Make it more robust. Flush file
+ properties correctly.
+ (tramp-adb-maybe-open-connection): Set `tramp-current-*'
+ variables. Check for connected devices only when needed.
+
+2014-02-27 Daniel Colascione <dancol(a)dancol.org>
+
+ * tramp-sh.el (tramp-get-remote-path): Don't signal error when
+ explicit tramp path is empty.
+
+2014-02-24 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename): Improve last fix.
+
+2014-02-23 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp-sh.el (tramp-sh-handle-file-truename):
+ Preserve trailing "/". (Bug#16851)
+
+2014-02-21 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-check-cached-permissions):
+ Call `file-attributes' with `suffix' being a symbol but a string.
+
+2014-02-20 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (ls-lisp-use-insert-directory-program): Declare.
+ (tramp-handle-insert-directory): New defun, taken from tramp-gvfs.el.
+
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
+ <insert-directory>: Use `tramp-handle-insert-directory'.
+ (tramp-gvfs-handle-insert-directory): Remove function.
+
+ * tramp-sh.el (tramp-sh-handle-insert-directory):
+ Call `tramp-handle-insert-directory'.
+
+2014-02-19 Michael Albinus <michael.albinus(a)gmx.de>
+
+ * tramp.el (tramp-handle-make-symbolic-link): New defun.
+ (tramp-check-cached-permissions): Call `file-attributes' if the
+ cache is empty.
+
+ * tramp-adb.el (tramp-adb-file-name-handler-alist)
+ <make-symbolic-link>: Use `tramp-handle-make-symbolic-link'.
+
+ * tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
+ <make-symbolic-link>: Use `tramp-handle-make-symbolic-link'.
+ (tramp-gvfs-maybe-open-connection): Set always connection
+ properties, even if target is mounted already.
+
+ * tramp-sh.el (tramp-color-escape-sequence-regexp):
+ Set tramp-autoload cookie.
+ (tramp-get-remote-touch): New defun.
+ (tramp-sh-handle-set-file-times): Use it.
+ (tramp-sh-handle-directory-files-and-attributes):
+ Use `tramp-handle-directory-files-and-attributes' if neither stat
+ nor perl are available on the remote host.
+
+ * tramp-smb.el (tramp-smb-handle-insert-directory): Mark trailing
+ "/". Write long listing only when "l" belongs to the switches.
+
2014-02-16 Michael Albinus <michael.albinus(a)gmx.de>
Version 2.2.9 released.
@@ -213,7 +558,7 @@
* tramp-smb.el (tramp-smb-acl-program): New customer option.
(tramp-smb-errors): Add error messages.
(tramp-smb-actions-with-acl): New defconst.
- (tramp-smb-file-name-handler-alist) [set-file-acl]: Add handler.
+ (tramp-smb-file-name-handler-alist) <set-file-acl>: Add handler.
(tramp-smb-action-with-acl, tramp-smb-handle-set-file-acl): New defuns.
(tramp-smb-handle-file-acl): Rewrite, using "smbcacls".
(tramp-smb-handle-file-attributes): Simplify test for "stat" capability.
@@ -483,18 +828,18 @@
* tramp-adb.el (tramp-adb-file-name-handler-alist): Order
alphabetically.
- [access-file, add-name-to-file, dired-call-process]:
- [dired-compress-file, file-acl, file-notify-rm-watch]:
- [file-ownership-preserved-p, file-selinux-context]:
- [make-directory-internal, make-symbolic-link, set-file-acl]:
- [set-file-selinux-context, set-visited-file-modtime]:
- [verify-visited-file-modtime]: Add handler.
+ <access-file, add-name-to-file, dired-call-process>:
+ <dired-compress-file, file-acl, file-notify-rm-watch>:
+ <file-ownership-preserved-p, file-selinux-context>:
+ <make-directory-internal, make-symbolic-link, set-file-acl>:
+ <set-file-selinux-context, set-visited-file-modtime>:
+ <verify-visited-file-modtime>: Add handler.
(tramp-adb-handle-write-region): Apply `set-visited-file-modtime'.
* tramp-gvfs.el (tramp-gvfs-file-name-handler-alist)
- [file-notify-add-watch, file-notify-rm-watch]:
- [set-file-times, set-visited-file-modtime]:
- [verify-visited-file-modtime]: Add handler.
+ <file-notify-add-watch, file-notify-rm-watch>:
+ <set-file-times, set-visited-file-modtime>:
+ <verify-visited-file-modtime>: Add handler.
(with-tramp-gvfs-error-message)
(tramp-gvfs-handle-set-visited-file-modtime)
(tramp-gvfs-fuse-file-name): Remove.
@@ -504,8 +849,8 @@
* tramp-sh.el (tramp-sh-file-name-handler-alist): Order
alphabetically.
- [file-notify-rm-watch ]: Use default Tramp handler.
- [executable-find]: Remove private handler.
+ <file-notify-rm-watch>: Use default Tramp handler.
+ <executable-find>: Remove private handler.
(tramp-do-copy-or-rename-file-out-of-band): Do not bind
`default-directory'.
(tramp-sh-handle-executable-find)
@@ -515,8 +860,8 @@
Do not use `format' in `tramp-message'.
* tramp-smb.el (tramp-smb-file-name-handler-alist)
- [file-notify-rm-watch, set-visited-file-modtime]:
- [verify-visited-file-modtime]: Add handler.
+ <file-notify-rm-watch, set-visited-file-modtime>:
+ <verify-visited-file-modtime>: Add handler.
(tramp-smb-call-winexe): Do not bind `default-directory'.
2013-07-29 Michael Albinus <michael.albinus(a)gmx.de>
@@ -574,7 +919,7 @@
* tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* tramp-sh.el (tramp-maybe-open-connection):
Use `tramp-connection-timeout'.
- (tramp-methods) [su, sudo, ksu]: Add method specific timeouts.
+ (tramp-methods) <su, sudo, ksu>: Add method specific timeouts.
2013-07-10 Michael Albinus <michael.albinus(a)gmx.de>
@@ -718,13 +1063,13 @@
(tramp-gvfs-methods-mounttracker, tramp-gvfs-listmounts)
(tramp-gvfs-mountlocation, tramp-gvfs-mountlocation-signature):
New defconst.
- (tramp-gvfs-file-name-handler-alist) [directory-files]:
- [directory-files-and-attributes, file-exists-p, file-modes]: Use
+ (tramp-gvfs-file-name-handler-alist) <directory-files>:
+ <directory-files-and-attributes, file-exists-p, file-modes>: Use
Tramp default handler.
- [file-acl, file-selinux-context, process-file, set-file-acl]:
- [set-file-modes, set-file-selinux-context, shell-command]:
- [start-file-process ]: Remove handler.
- [verify-visited-file-modtime]: New handler.
+ <file-acl, file-selinux-context, process-file, set-file-acl>:
+ <set-file-modes, set-file-selinux-context, shell-command>:
+ <start-file-process>: Remove handler.
+ <verify-visited-file-modtime>: New handler.
(tramp-gvfs-dbus-string-to-byte-array)
(tramp-gvfs-dbus-byte-array-to-string): New defuns. Replace all
calls of `dbus-string-to-byte-array' and
@@ -801,7 +1146,7 @@
(tramp-find-method): Check for obsolete methods. Map them to a
replacement method if appropriate.
- * tramp-sh.el (tramp-methods) [scp1, scp2, ssh1, ssh2, plink1]:
+ * tramp-sh.el (tramp-methods) <scp1, scp2, ssh1, ssh2, plink1>:
Remove methods.
(top): Remove completion functions for "scp1", "scp2", "ssh1",
"ssh2" and "plink1".
@@ -901,10 +1246,10 @@
replacing `tramp-detect-ssh-controlmaster'.
(tramp-default-method): Use it.
- * tramp-sh.el (tramp-methods) [scp, scp1, scp2, scpx, sftp]:
- [rsync, ssh, ssh1, ssh2, sshx]: Add ControlPath and ControlMaster
+ * tramp-sh.el (tramp-methods) <scp, scp1, scp2, scpx, sftp>:
+ <rsync, ssh, ssh1, ssh2, sshx>: Add ControlPath and ControlMaster
arguments.
- [scpc, rsyncc]: Remove methods.
+ <scpc, rsyncc>: Remove methods.
(top): Remove completion functions for "scpc", "rsyncc", "ssh1_old"
and "ssh2_old".
(tramp-do-copy-or-rename-file-out-of-band): Change trace level.
@@ -5541,7 +5886,7 @@
macros by their implementations where necessary. Requested by
Richard Stallman <rms(a)gnu.org>.
- * tramp.el (tramp-file-name-p, tramp-file-name-method,
+ * tramp.el (tramp-file-name-p, tramp-file-name-method)
(tramp-file-name-user, tramp-file-name-host)
(tramp-file-name-localname): New defuns, replacing defstruct
`tramp-file-name'.
@@ -6664,7 +7009,7 @@
2006-01-27 Michael Albinus <michael.albinus(a)gmx.de>
- * tramp.el, tramp-cache.el, tramp-ftp.el, tramp-util.el,
+ * tramp.el, tramp-cache.el, tramp-ftp.el, tramp-util.el:
* tramp-vc.el: Add code for unloading Tramp. See comment before
`tramp-unload-tramp' for checklist.
@@ -10246,8 +10591,8 @@
Version 2.0.10 released.
- * tramp.el (tramp-perl-encode-with-module,
- tramp-perl-decode-with-module)
+ * tramp.el (tramp-perl-encode-with-module)
+ (tramp-perl-decode-with-module)
(tramp-perl-encode, tramp-perl-decode): Doc fix. From Andreas
Schwab.
(tramp-bug): New variables to report.
@@ -11281,8 +11626,8 @@
meridian-enviro dot com.
(tramp-find-executable): Use a shell-based implementation for
tramp-find-executable. Suggestion from Francesco Potortì.
- (tramp-buffer-name, tramp-buffer-name-multi-method,
- tramp-debug-buffer-name): Better buffer name format for omitted
+ (tramp-buffer-name, tramp-buffer-name-multi-method)
+ (tramp-debug-buffer-name): Better buffer name format for omitted
user names.
2001-01-19 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
@@ -11292,9 +11637,9 @@
2001-01-18 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
- * tramp.el (tramp-open-connection-telnet,
- tramp-open-connection-rsh, tramp-open-connection-su,
- tramp-open-connection-multi): Locally bind TERM env var to "dumb"
+ * tramp.el (tramp-open-connection-telnet)
+ (tramp-open-connection-rsh, tramp-open-connection-su)
+ (tramp-open-connection-multi): Locally bind TERM env var to "dumb"
before starting the login on the remote host.
2001-01-13 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
@@ -11352,8 +11697,8 @@
2000-11-01 Kai Großjohann <Kai.Grossjohann(a)CS.Uni-Dortmund.DE>
* tramp.el (tramp-dos-coding-system): New variable.
- (tramp-open-connection-telnet, tramp-open-connection-rsh,
- tramp-open-connection-su, tramp-open-connection-multi): Use it.
+ (tramp-open-connection-telnet, tramp-open-connection-rsh)
+ (tramp-open-connection-su, tramp-open-connection-multi): Use it.
(tramp-coding-system-change-eol-conversion): New compat function.
(tramp-open-connection-setup-interactive-shell): Use it.
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-adb.el
--- a/lisp/tramp-adb.el
+++ b/lisp/tramp-adb.el
@@ -38,7 +38,6 @@
;; Pacify byte-compiler.
(defvar directory-sep-char)
-(defvar dired-move-to-filename-regexp)
(defcustom tramp-adb-program "adb"
"Name of the Android Debug Bridge program."
@@ -134,13 +133,13 @@
(find-backup-file-name . tramp-handle-find-backup-file-name)
;; `find-file-noselect' performed by default handler.
;; `get-file-buffer' performed by default handler.
- (insert-directory . tramp-adb-handle-insert-directory)
+ (insert-directory . tramp-handle-insert-directory)
(insert-file-contents . tramp-handle-insert-file-contents)
(load . tramp-handle-load)
(make-auto-save-file-name . tramp-handle-make-auto-save-file-name)
(make-directory . tramp-adb-handle-make-directory)
(make-directory-internal . ignore)
- (make-symbolic-link . ignore)
+ (make-symbolic-link . tramp-handle-make-symbolic-link)
(process-file . tramp-adb-handle-process-file)
(rename-file . tramp-adb-handle-rename-file)
(set-file-acl . ignore)
@@ -187,7 +186,8 @@
result)
(tramp-compat-set-process-query-on-exit-flag p nil)
(while (eq 'run (process-status p))
- (sleep-for 0.1))
+ (accept-process-output p 0.1))
+ (accept-process-output p 0.1)
(goto-char (point-min))
(while (search-forward-regexp "^\\(\\S-+\\)[[:space:]]+device$" nil t)
(add-to-list 'result (list nil (match-string 1))))
@@ -228,98 +228,105 @@
;; code could be shared?
(defun tramp-adb-handle-file-truename (filename)
"Like `file-truename' for Tramp files."
- (with-parsed-tramp-file-name (expand-file-name filename) nil
- (with-tramp-file-property v localname "file-truename"
- (let ((result nil)) ; result steps in reverse order
- (tramp-message v 4 "Finding true name for `%s'" filename)
- (let* ((directory-sep-char ?/)
- (steps (tramp-compat-split-string localname "/"))
- (localnamedir (tramp-run-real-handler
- 'file-name-as-directory (list localname)))
- (is-dir (string= localname localnamedir))
- (thisstep nil)
- (numchase 0)
- ;; Don't make the following value larger than
- ;; necessary. People expect an error message in a
- ;; timely fashion when something is wrong; otherwise
- ;; they might think that Emacs is hung. Of course,
- ;; correctness has to come first.
- (numchase-limit 20)
- symlink-target)
- (while (and steps (< numchase numchase-limit))
- (setq thisstep (pop steps))
- (tramp-message
- v 5 "Check %s"
- (mapconcat 'identity
- (append '("") (reverse result) (list thisstep))
- "/"))
- (setq symlink-target
- (nth 0 (file-attributes
- (tramp-make-tramp-file-name
- method user host
- (mapconcat 'identity
- (append '("")
- (reverse result)
- (list thisstep))
- "/")))))
- (cond ((string= "." thisstep)
- (tramp-message v 5 "Ignoring step `.'"))
- ((string= ".." thisstep)
- (tramp-message v 5 "Processing step `..'")
- (pop result))
- ((stringp symlink-target)
- ;; It's a symlink, follow it.
- (tramp-message v 5 "Follow symlink to %s" symlink-target)
- (setq numchase (1+ numchase))
- (when (file-name-absolute-p symlink-target)
- (setq result nil))
- ;; If the symlink was absolute, we'll get a string
- ;; like "/user@host:/some/target"; extract the
- ;; "/some/target" part from it.
- (when (tramp-tramp-file-p symlink-target)
- (unless (tramp-equal-remote filename symlink-target)
- (tramp-error
- v 'file-error
- "Symlink target `%s' on wrong host" symlink-target))
- (setq symlink-target localname))
- (setq steps
- (append (tramp-compat-split-string
- symlink-target "/")
- steps)))
- (t
- ;; It's a file.
- (setq result (cons thisstep result)))))
- (when (>= numchase numchase-limit)
- (tramp-error
- v 'file-error
- "Maximum number (%d) of symlinks exceeded" numchase-limit))
- (setq result (reverse result))
- ;; Combine list to form string.
- (setq result
- (if result
- (mapconcat 'identity (cons "" result) "/")
- "/"))
- (when (and is-dir (or (string= "" result)
- (not (string= (substring result -1) "/"))))
- (setq result (concat result "/"))))
+ (format
+ "%s%s"
+ (with-parsed-tramp-file-name (expand-file-name filename) nil
+ (tramp-make-tramp-file-name
+ method user host
+ (with-tramp-file-property v localname "file-truename"
+ (let ((result nil)) ; result steps in reverse order
+ (tramp-message v 4 "Finding true name for `%s'" filename)
+ (let* ((directory-sep-char ?/)
+ (steps (tramp-compat-split-string localname "/"))
+ (localnamedir (tramp-run-real-handler
+ 'file-name-as-directory (list localname)))
+ (is-dir (string= localname localnamedir))
+ (thisstep nil)
+ (numchase 0)
+ ;; Don't make the following value larger than
+ ;; necessary. People expect an error message in a
+ ;; timely fashion when something is wrong; otherwise
+ ;; they might think that Emacs is hung. Of course,
+ ;; correctness has to come first.
+ (numchase-limit 20)
+ symlink-target)
+ (while (and steps (< numchase numchase-limit))
+ (setq thisstep (pop steps))
+ (tramp-message
+ v 5 "Check %s"
+ (mapconcat 'identity
+ (append '("") (reverse result) (list thisstep))
+ "/"))
+ (setq symlink-target
+ (nth 0 (file-attributes
+ (tramp-make-tramp-file-name
+ method user host
+ (mapconcat 'identity
+ (append '("")
+ (reverse result)
+ (list thisstep))
+ "/")))))
+ (cond ((string= "." thisstep)
+ (tramp-message v 5 "Ignoring step `.'"))
+ ((string= ".." thisstep)
+ (tramp-message v 5 "Processing step `..'")
+ (pop result))
+ ((stringp symlink-target)
+ ;; It's a symlink, follow it.
+ (tramp-message v 5 "Follow symlink to %s" symlink-target)
+ (setq numchase (1+ numchase))
+ (when (file-name-absolute-p symlink-target)
+ (setq result nil))
+ ;; If the symlink was absolute, we'll get a string
+ ;; like "/user@host:/some/target"; extract the
+ ;; "/some/target" part from it.
+ (when (tramp-tramp-file-p symlink-target)
+ (unless (tramp-equal-remote filename symlink-target)
+ (tramp-error
+ v 'file-error
+ "Symlink target `%s' on wrong host" symlink-target))
+ (setq symlink-target localname))
+ (setq steps
+ (append (tramp-compat-split-string
+ symlink-target "/")
+ steps)))
+ (t
+ ;; It's a file.
+ (setq result (cons thisstep result)))))
+ (when (>= numchase numchase-limit)
+ (tramp-error
+ v 'file-error
+ "Maximum number (%d) of symlinks exceeded" numchase-limit))
+ (setq result (reverse result))
+ ;; Combine list to form string.
+ (setq result
+ (if result
+ (mapconcat 'identity (cons "" result) "/")
+ "/"))
+ (when (and is-dir (or (string= "" result)
+ (not (string= (substring result -1) "/"))))
+ (setq result (concat result "/"))))
- (tramp-message v 4 "True name of `%s' is `%s'" filename result)
- (tramp-make-tramp-file-name method user host result)))))
+ (tramp-message v 4 "True name of `%s' is `%s'" localname result)
+ result))))
+
+ ;; Preserve trailing "/".
+ (if (string-equal (file-name-nondirectory filename) "") "/" "")))
(defun tramp-adb-handle-file-attributes (filename &optional id-format)
"Like `file-attributes' for Tramp files."
(unless id-format (setq id-format 'integer))
- (ignore-errors
- (with-parsed-tramp-file-name filename nil
- (with-tramp-file-property
- v localname (format "file-attributes-%s" id-format)
- (tramp-adb-barf-unless-okay
- v (format "%s -d -l %s"
- (tramp-adb-get-ls-command v)
- (tramp-shell-quote-argument localname)) "")
- (with-current-buffer (tramp-get-buffer v)
- (tramp-adb-sh-fix-ls-output)
- (cdar (tramp-do-parse-file-attributes-with-ls v id-format)))))))
+ (with-parsed-tramp-file-name filename nil
+ (with-tramp-file-property
+ v localname (format "file-attributes-%s" id-format)
+ (and
+ (tramp-adb-send-command-and-check
+ v (format "%s -d -l %s"
+ (tramp-adb-get-ls-command v)
+ (tramp-shell-quote-argument localname)))
+ (with-current-buffer (tramp-get-buffer v)
+ (tramp-adb-sh-fix-ls-output)
+ (cdar (tramp-do-parse-file-attributes-with-ls v id-format)))))))
(defun tramp-do-parse-file-attributes-with-ls (vec &optional id-format)
"Parse `file-attributes' for Tramp files using the ls(1) command."
@@ -366,11 +373,19 @@
(with-tramp-file-property
v localname (format "directory-files-attributes-%s-%s-%s-%s"
full match id-format nosort)
- (tramp-adb-barf-unless-okay
- v (format "%s -a -l %s"
- (tramp-adb-get-ls-command v)
- (tramp-shell-quote-argument localname)) "")
(with-current-buffer (tramp-get-buffer v)
+ (when (tramp-adb-send-command-and-check
+ v (format "%s -a -l %s"
+ (tramp-adb-get-ls-command v)
+ (tramp-shell-quote-argument localname)))
+ ;; We insert also filename/. and filename/.., because "ls" doesn't.
+ (narrow-to-region (point) (point))
+ (tramp-adb-send-command
+ v (format "%s -d -a -l %s %s"
+ (tramp-adb-get-ls-command v)
+ (concat (file-name-as-directory localname) ".")
+ (concat (file-name-as-directory localname) "..")))
+ (widen))
(tramp-adb-sh-fix-ls-output)
(let ((result (tramp-do-parse-file-attributes-with-ls
v (or id-format 'integer))))
@@ -392,8 +407,7 @@
(defun tramp-adb-get-ls-command (vec)
(with-tramp-connection-property vec "ls"
(tramp-message vec 5 "Finding a suitable `ls' command")
- (if (zerop (tramp-adb-command-exit-status
- vec "ls --color=never -al /dev/null"))
+ (if (tramp-adb-send-command-and-check vec "ls --color=never -al /dev/null")
;; On CyanogenMod based system BusyBox is used and "ls" output
;; coloring is enabled by default. So we try to disable it
;; when possible.
@@ -417,35 +431,6 @@
(and (not (string-match "\\(^--\\|^[^-]\\)" s)) s))
switches))))))
-(defun tramp-adb-handle-insert-directory
- (filename switches &optional _wildcard _full-directory-p)
- "Like `insert-directory' for Tramp files."
- (when (stringp switches)
- (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches))))
- (with-parsed-tramp-file-name (file-truename filename) nil
- (with-current-buffer (tramp-get-buffer v)
- (let ((name (tramp-shell-quote-argument (directory-file-name localname)))
- (switch-d (member "-d" switches))
- (switch-t (member "-t" switches))
- (switches (mapconcat 'identity (remove "-t" switches) " ")))
- (tramp-adb-barf-unless-okay
- v (format "%s %s %s" (tramp-adb-get-ls-command v) switches name)
- "Cannot insert directory listing: %s" filename)
- (unless switch-d
- ;; We insert also filename/. and filename/.., because "ls" doesn't.
- (narrow-to-region (point) (point))
- (ignore-errors
- (tramp-adb-barf-unless-okay
- v (format "%s -d %s %s %s"
- (tramp-adb-get-ls-command v)
- switches
- (concat (file-name-as-directory name) ".")
- (concat (file-name-as-directory name) ".."))
- "Cannot insert directory listing: %s" filename))
- (widen))
- (tramp-adb-sh-fix-ls-output switch-t)))
- (insert-buffer-substring (tramp-get-buffer v))))
-
(defun tramp-adb-sh-fix-ls-output (&optional sort-by-time)
"Insert dummy 0 in empty size columns.
Androids \"ls\" command doesn't insert size column for directories:
@@ -489,9 +474,9 @@
(defun tramp-adb-ls-output-name-less-p (a b)
"Sort \"ls\" output by name, ascending."
(let (posa posb)
- (string-match dired-move-to-filename-regexp a)
+ (string-match directory-listing-before-filename-regexp a)
(setq posa (match-end 0))
- (string-match dired-move-to-filename-regexp b)
+ (string-match directory-listing-before-filename-regexp b)
(setq posb (match-end 0))
(string-lessp (substring a posa) (substring b posb))))
@@ -506,7 +491,8 @@
(tramp-adb-barf-unless-okay
v (format "mkdir %s" (tramp-shell-quote-argument localname))
"Couldn't make directory %s" dir)
- (tramp-flush-directory-property v (file-name-directory localname))))
+ (tramp-flush-file-property v (file-name-directory localname))
+ (tramp-flush-directory-property v localname)))
(defun tramp-adb-handle-delete-directory (directory &optional recursive)
"Like `delete-directory' for Tramp files."
@@ -538,20 +524,22 @@
(with-tramp-file-property v localname "file-name-all-completions"
(save-match-data
(tramp-adb-send-command
- v (format "%s %s"
+ v (format "%s -a %s"
(tramp-adb-get-ls-command v)
(tramp-shell-quote-argument localname)))
(mapcar
(lambda (f)
- (if (file-directory-p f)
+ (if (file-directory-p (expand-file-name f directory))
(file-name-as-directory f)
f))
(with-current-buffer (tramp-get-buffer v)
- (delq
- nil
- (mapcar
- (lambda (l) (and (not (string-match "^[[:space:]]*$" l)) l))
- (split-string (buffer-string) "\n"))))))))))
+ (append
+ '("." "..")
+ (delq
+ nil
+ (mapcar
+ (lambda (l) (and (not (string-match "^[[:space:]]*$" l)) l))
+ (split-string (buffer-string) "\n")))))))))))
(defun tramp-adb-handle-file-local-copy (filename)
"Like `file-local-copy' for Tramp files."
@@ -567,7 +555,10 @@
(delete-file tmpfile)
(tramp-error
v 'file-error "Cannot make local copy of file `%s'" filename))
- (set-file-modes tmpfile (file-modes filename)))
+ (set-file-modes
+ tmpfile
+ (logior (or (file-modes filename) 0)
+ (tramp-compat-octal-to-decimal "0400"))))
tmpfile)))
(defun tramp-adb-handle-file-writable-p (filename)
@@ -577,9 +568,8 @@
(with-tramp-file-property v localname "file-writable-p"
(if (tramp-adb-find-test-command v)
(if (file-exists-p filename)
- (zerop
- (tramp-adb-command-exit-status
- v (format "test -w %s" (tramp-shell-quote-argument localname))))
+ (tramp-adb-send-command-and-check
+ v (format "test -w %s" (tramp-shell-quote-argument localname)))
(and
(file-directory-p (file-name-directory filename))
(file-writable-p (file-name-directory filename))))
@@ -599,9 +589,6 @@
"Like `write-region' for Tramp files."
(setq filename (expand-file-name filename))
(with-parsed-tramp-file-name filename nil
- (when append
- (tramp-error
- v 'file-error "Cannot append to file using Tramp (`%s')" filename))
(when (and confirm (file-exists-p filename))
(unless (y-or-n-p (format "File %s exists; overwrite anyway? "
filename))
@@ -612,14 +599,20 @@
(tramp-flush-file-property v localname)
(let* ((curbuf (current-buffer))
(tmpfile (tramp-compat-make-temp-file filename)))
+ (when (and append (file-exists-p filename))
+ (copy-file filename tmpfile 'ok)
+ (set-file-modes
+ tmpfile
+ (logior (or (file-modes tmpfile) 0)
+ (tramp-compat-octal-to-decimal "0600"))))
(tramp-run-real-handler
'write-region
(list start end tmpfile append 'no-message lockname confirm))
(with-tramp-progress-reporter
- v 3 (format "Moving tmp file %s to %s" tmpfile filename)
+ v 3 (format "Moving tmp file `%s' to `%s'" tmpfile filename)
(unwind-protect
(when (tramp-adb-execute-adb-command v "push" tmpfile localname)
- (tramp-error v 'file-error "Cannot write: `%s' filename"))
+ (tramp-error v 'file-error "Cannot write: `%s'" filename))
(delete-file tmpfile)))
(when (or (eq visit t) (stringp visit))
@@ -634,9 +627,8 @@
"Like `set-file-modes' for Tramp files."
(with-parsed-tramp-file-name filename nil
(tramp-flush-file-property v localname)
- (tramp-adb-barf-unless-okay
- v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname)
- "Error while changing file's mode %s" filename)))
+ (tramp-adb-send-command-and-check
+ v (format "chmod %s %s" (tramp-compat-decimal-to-octal mode) localname))))
(defun tramp-adb-handle-set-file-times (filename &optional time)
"Like `set-file-times' for Tramp files."
@@ -645,8 +637,8 @@
(let ((time (if (or (null time) (equal time '(0 0)))
(current-time)
time)))
- (tramp-adb-command-exit-status
- ;; use shell arithmetic because of Emacs integer size limit
+ (tramp-adb-send-command-and-check
+ ;; Use shell arithmetic because of Emacs integer size limit.
v (format "touch -t $(( %d * 65536 + %d )) %s"
(car time) (cadr time)
(tramp-shell-quote-argument localname))))))
@@ -704,32 +696,36 @@
(setq filename (expand-file-name filename)
newname (expand-file-name newname))
- (with-parsed-tramp-file-name
- (if (tramp-tramp-file-p filename) filename newname) nil
- (with-tramp-progress-reporter
- v 0 (format "Renaming %s to %s" newname filename)
+ (let ((t1 (tramp-tramp-file-p filename))
+ (t2 (tramp-tramp-file-p newname)))
+ (with-parsed-tramp-file-name (if t1 filename newname) nil
+ (with-tramp-progress-reporter
+ v 0 (format "Renaming %s to %s" filename newname)
- (if (and (tramp-equal-remote filename newname)
- (not (file-directory-p filename)))
- (progn
- (when (and (not ok-if-already-exists)
- (file-exists-p newname))
- (tramp-error v 'file-already-exists newname))
- ;; We must also flush the cache of the directory, because
- ;; `file-attributes' reads the values from there.
- (tramp-flush-file-property v (file-name-directory localname))
- (tramp-flush-file-property v localname)
- ;; Short track.
- (tramp-adb-barf-unless-okay
- v (format
- "mv %s %s"
- (tramp-file-name-handler 'file-remote-p filename 'localname)
- localname)
- "Error renaming %s to %s" filename newname))
+ (if (and t1 t2
+ (tramp-equal-remote filename newname)
+ (not (file-directory-p filename)))
+ (let ((l1 (tramp-file-name-handler
+ 'file-remote-p filename 'localname))
+ (l2 (tramp-file-name-handler
+ 'file-remote-p newname 'localname)))
+ (when (and (not ok-if-already-exists)
+ (file-exists-p newname))
+ (tramp-error v 'file-already-exists newname))
+ ;; We must also flush the cache of the directory, because
+ ;; `file-attributes' reads the values from there.
+ (tramp-flush-file-property v (file-name-directory l1))
+ (tramp-flush-file-property v l1)
+ (tramp-flush-file-property v (file-name-directory l2))
+ (tramp-flush-file-property v l2)
+ ;; Short track.
+ (tramp-adb-barf-unless-okay
+ v (format "mv %s %s" l1 l2)
+ "Error renaming %s to %s" filename newname))
- ;; Rename by copy.
- (copy-file filename newname ok-if-already-exists t t)
- (delete-file filename)))))
+ ;; Rename by copy.
+ (copy-file filename newname ok-if-already-exists t t)
+ (delete-file filename))))))
(defun tramp-adb-handle-process-file
(program &optional infile destination display &rest args)
@@ -1002,7 +998,8 @@
(with-temp-buffer
(prog1
(unless
- (zerop (apply 'tramp-call-process tramp-adb-program nil t nil args))
+ (zerop
+ (apply 'tramp-call-process vec tramp-adb-program nil t nil args))
(buffer-string))
(tramp-message vec 6 "%s" (buffer-string)))))
@@ -1010,7 +1007,7 @@
"Checks, whether the ash has a builtin \"test\" command.
This happens for Android >= 4.0."
(with-tramp-connection-property vec "test"
- (zerop (tramp-adb-command-exit-status vec "type test"))))
+ (tramp-adb-send-command-and-check vec "type test")))
;; Connection functions
@@ -1033,9 +1030,9 @@
(while (re-search-forward "\r+$" nil t)
(replace-match "" nil nil)))))
-(defun tramp-adb-command-exit-status
+(defun tramp-adb-send-command-and-check
(vec command)
- "Run COMMAND and return its exit status.
+ "Run COMMAND and and check its exit status.
Sends `echo $?' along with the COMMAND for checking the exit status. If
COMMAND is nil, just sends `echo $?'. Returns the exit status found."
(tramp-adb-send-command
@@ -1049,14 +1046,14 @@
vec 'file-error "Couldn't find exit status of `%s'" command))
(skip-chars-forward "^ ")
(prog1
- (read (current-buffer))
+ (zerop (read (current-buffer)))
(let (buffer-read-only)
(delete-region (match-beginning 0) (point-max))))))
(defun tramp-adb-barf-unless-okay (vec command fmt &rest args)
"Run COMMAND, check exit status, throw error if exit status not okay.
FMT and ARGS are passed to `error'."
- (unless (zerop (tramp-adb-command-exit-status vec command))
+ (unless (tramp-adb-send-command-and-check vec command)
(apply 'tramp-error vec 'file-error fmt args)))
(defun tramp-adb-wait-for-output (proc &optional timeout)
@@ -1099,7 +1096,7 @@
(p (get-buffer-process buf))
(host (tramp-file-name-host vec))
(user (tramp-file-name-user vec))
- (devices (mapcar 'cadr (tramp-adb-parse-device-names nil))))
+ devices)
;; Maybe we know already that "su" is not supported. We cannot
;; use a connection property, because we have not checked yet
@@ -1111,6 +1108,7 @@
(and p (processp p) (memq (process-status p) '(run open)))
(save-match-data
(when (and p (processp p)) (delete-process p))
+ (setq devices (mapcar 'cadr (tramp-adb-parse-device-names nil)))
(if (not devices)
(tramp-error vec 'file-error "No device connected"))
(if (and (> (length host) 0) (not (member host devices)))
@@ -1165,7 +1163,7 @@
;; Change user if indicated.
(when user
(tramp-adb-send-command vec (format "su %s" user))
- (unless (zerop (tramp-adb-command-exit-status vec nil))
+ (unless (tramp-adb-send-command-and-check vec nil)
(delete-process p)
(tramp-set-file-property vec "" "su-command-p" nil)
(tramp-error
@@ -1183,5 +1181,9 @@
(read (current-buffer)))
":" 'omit-nulls))))))))
+(add-hook 'tramp-unload-hook
+ (lambda ()
+ (unload-feature 'tramp-adb 'force)))
+
(provide 'tramp-adb)
;;; tramp-adb.el ends here
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-cache.el
--- a/lisp/tramp-cache.el
+++ b/lisp/tramp-cache.el
@@ -168,7 +168,7 @@
;;;###tramp-autoload
(defun tramp-flush-file-property (key file)
"Remove all properties of FILE in the cache context of KEY."
- ;; Remove file property of symlinks.
+ ;; Remove file properties of symlinks.
(let ((truename (tramp-get-file-property key file "file-truename" nil)))
(when (and (stringp truename)
(not (string-equal file truename)))
@@ -183,8 +183,13 @@
(defun tramp-flush-directory-property (key directory)
"Remove all properties of DIRECTORY in the cache context of KEY.
Remove also properties of all files in subdirectories."
- (let ((directory (tramp-run-real-handler
- 'directory-file-name (list directory))))
+ (let* ((directory (tramp-run-real-handler
+ 'directory-file-name (list directory)))
+ (truename (tramp-get-file-property key directory "file-truename" nil)))
+ ;; Remove file properties of symlinks.
+ (when (and (stringp truename)
+ (not (string-equal directory truename)))
+ (tramp-flush-directory-property key truename))
(tramp-message key 8 "%s" directory)
(maphash
(lambda (key _value)
@@ -198,13 +203,15 @@
;; not show proper directory contents when a file has been copied or
;; deleted before.
(defun tramp-flush-file-function ()
- "Flush all Tramp cache properties from `buffer-file-name'."
- (let ((bfn (if (stringp (buffer-file-name))
- (buffer-file-name)
- default-directory)))
- (when (tramp-tramp-file-p bfn)
- (with-parsed-tramp-file-name bfn nil
- (tramp-flush-file-property v localname)))))
+ "Flush all Tramp cache properties from `buffer-file-name'.
+This is suppressed for temporary buffers."
+ (unless (string-match "^ \\*temp\\*" (or (buffer-name) ""))
+ (let ((bfn (if (stringp (buffer-file-name))
+ (buffer-file-name)
+ default-directory)))
+ (when (tramp-tramp-file-p bfn)
+ (with-parsed-tramp-file-name bfn nil
+ (tramp-flush-file-property v localname))))))
(add-hook 'before-revert-hook 'tramp-flush-file-function)
(add-hook 'eshell-pre-command-hook 'tramp-flush-file-function)
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-compat.el
--- a/lisp/tramp-compat.el
+++ b/lisp/tramp-compat.el
@@ -587,6 +587,7 @@
(add-hook 'tramp-unload-hook
(lambda ()
+ (unload-feature 'tramp-loaddefs 'force)
(unload-feature 'tramp-compat 'force)))
(provide 'tramp-compat)
diff -r cb7f3960d3fec0b936d1a3ff4498407466884f84 -r 2a6a5aaac4f982497ce8c38509396c9008aa0dd6 lisp/tramp-efs.el
--- a/lisp/tramp-efs.el
+++ b/lisp/tramp-efs.el
@@ -171,10 +171,6 @@
tramp-efs-method
'((tramp-parse-netrc "~/.netrc"))))
-;; If there is URL syntax, `substitute-in-file-name' needs special
-;; handling.
-(put 'substitute-in-file-name 'efs 'tramp-handle-substitute-in-file-name)
-
;;;###tramp-autoload
(defun tramp-efs-file-name-handler (operation &rest args)
"Invoke the EFS handler for OPERATION.
This diff is so big that we needed to truncate the remainder.
Repository URL: https://bitbucket.org/xemacs/tramp/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
[AC ispell] Specify encoding to aspell
10 years, 4 months
Jerry James
APPROVE COMMIT
On Wed, Jun 11, 2014 at 9:57 AM, Jerry James <james(a)xemacs.org> wrote:
> PATCH ispell
>
> This is another patch that Fedora has carried for years. If aspell
> version 0.60 or later is in use, specify the text encoding. Since
> version 0.60 was released very close to a decade ago (August 2004), I
> think we can safely assume that older versions can be ignored.
I have committed this patch.
--
Jerry James
http://www.jamezone.org/
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-patches