[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tramp (2.1.20); dired buffers have modified bit set

From: Michael Albinus
Subject: Re: tramp (2.1.20); dired buffers have modified bit set
Date: Fri, 08 Jul 2011 14:24:32 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

Dave Abrahams <address@hidden> writes:

> Hi,

Hi Dave,

> Modified dired buffers seem to cause problems for some packages,
> e.g. magit:
> The only ones I've seen have been tramp buffers, so I thought maybe
> you'd want to look at it.

It doesn't seem to be a pure Tramp problem. The backtrace you have
published indicates a problem in `magit-save-buffers-predicate-tree-only':

(defun magit-save-buffers-predicate-tree-only ()
  "Only prompt to save buffers which are within the current git project (as
  determined by the dir passed to `magit-status'."
  (let ((current-buf-dir
         (file-name-directory (buffer-file-name (current-buffer)))))

(buffer-file-name (current-buffer)) implies, that every buffer has a
file name. This is not the case; the call could return
`nil'. `file-name-directory' returns an error then.

A better approach might be to use `default-directory', which is bound
locally in every buffer.

> Cheers,
> Dave

Best regards, Michael.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]