unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Cannot use normal save (C-x C-s) when operating over network mount
@ 2009-06-11  8:35 Kim Christensen
  2009-06-11 13:32 ` Tassilo Horn
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-11  8:35 UTC (permalink / raw)
  To: help-gnu-emacs

Hi list,

I've been using Emacs on and off for the past couple of years but
recently started using it as main editor on my workstation. It took a
while to get into, mainly because I wanted to learn elisp and had to
get a grip of the customization possibilites before realising the
potential of this fine piece of software :-)

However, I have quite a disturbing problem when it comes to editing
files over a SMB/CIFS network mount. When trying to save a file that I
have opened from a mounted share, I cannot save it using basic-save-
buffer (C-x C-s or M-x basic-save-buffer). Emacs gives me this error:

basic-save-buffer-2: Opening output file: no such file or directory,
<file path>

When i try saving using write-file (C-x C-w) instead, it works just
fine. This is very disturbing since I have to specify the file name
each time :-)

If anyone has run into this problem and could give me some pointers on
how to start debugging it I would be grateful!

I'm running the following edition of Emacs:
GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.14.1) of
2008-09-05 on yellow, modified by Ubuntu

Best regards,
Kim Christensen


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

* Re: Cannot use normal save (C-x C-s) when operating over network mount
  2009-06-11  8:35 Cannot use normal save (C-x C-s) when operating over network mount Kim Christensen
@ 2009-06-11 13:32 ` Tassilo Horn
       [not found] ` <mailman.457.1244727146.2239.help-gnu-emacs@gnu.org>
  2009-06-11 22:01 ` Xah Lee
  2 siblings, 0 replies; 17+ messages in thread
From: Tassilo Horn @ 2009-06-11 13:32 UTC (permalink / raw)
  To: help-gnu-emacs

Kim Christensen <kim.christensen@gmail.com> writes:

Hi Kim,

> However, I have quite a disturbing problem when it comes to editing
> files over a SMB/CIFS network mount. When trying to save a file that I
> have opened from a mounted share, I cannot save it using basic-save-
> buffer (C-x C-s or M-x basic-save-buffer). Emacs gives me this error:

Did you redefine `C-x C-s' to be `basic-save-buffer'?  Normally, `C-x
C-s' is `save-buffer', and that will work over network.

Bye,
Tassilo
-- 
      "OS's and GUI's come and go, only Emacs has lasting power."
          Per Abrahamsen in <rjbsysc7n1.fsf@zuse.dina.kvl.dk>





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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
       [not found] ` <mailman.457.1244727146.2239.help-gnu-emacs@gnu.org>
@ 2009-06-11 14:13   ` Kim Christensen
  0 siblings, 0 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-11 14:13 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 11, 3:32 pm, Tassilo Horn <tass...@member.fsf.org> wrote:
> Kim Christensen <kim.christen...@gmail.com> writes:
>
> Hi Kim,
>
> > However, I have quite a disturbing problem when it comes to editing
> > files over a SMB/CIFS network mount. When trying to save a file that I
> > have opened from a mounted share, I cannot save it using basic-save-
> > buffer (C-x C-s or M-x basic-save-buffer). Emacs gives me this error:
>
> Did you redefine `C-x C-s' to be `basic-save-buffer'?  Normally, `C-x
> C-s' is `save-buffer', and that will work over network.

Hi Tassilo,

Thanks for your reply.

M-x save-buffer gives me the same error message:

basic-save-buffer-2: Opening output file: no such file or directory,
<file path>

It seems that "save-buffer" is just an alias for "basic-save-buffer";
the *Messages* buffer shows the same message for both of them.

Regards,
Kim


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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-11  8:35 Cannot use normal save (C-x C-s) when operating over network mount Kim Christensen
  2009-06-11 13:32 ` Tassilo Horn
       [not found] ` <mailman.457.1244727146.2239.help-gnu-emacs@gnu.org>
@ 2009-06-11 22:01 ` Xah Lee
  2009-06-11 22:49   ` Kim Christensen
  2 siblings, 1 reply; 17+ messages in thread
From: Xah Lee @ 2009-06-11 22:01 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 11, 1:35 am, Kim Christensen <kim.christen...@gmail.com> wrote:
> Hi list,
>
> I've been using Emacs on and off for the past couple of years but
> recently started using it as main editor on my workstation. It took a
> while to get into, mainly because I wanted to learn elisp and had to
> get a grip of the customization possibilites before realising the
> potential of this fine piece of software :-)
>
> However, I have quite a disturbing problem when it comes to editing
> files over a SMB/CIFS network mount. When trying to save a file that I
> have opened from a mounted share, I cannot save it using basic-save-
> buffer (C-x C-s or M-x basic-save-buffer). Emacs gives me this error:
>
> basic-save-buffer-2: Opening output file: no such file or directory,
> <file path>
>
> When i try saving using write-file (C-x C-w) instead, it works just
> fine. This is very disturbing since I have to specify the file name
> each time :-)
>
> If anyone has run into this problem and could give me some pointers on
> how to start debugging it I would be grateful!
>
> I'm running the following edition of Emacs:
> GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.14.1) of
> 2008-09-05 on yellow, modified by Ubuntu
>
> Best regards,
> Kim Christensen

not sure what's your networking setup... is it linux to windows?

anyway, i have local network between Windows and Mac. I work in
Windows using emacsW32 (based on emacs v23). It works fine.

for example, on windows, using emacs, accessing files on my Mac, and
the file path shows this syntax:
//169.254.223.41/xah/Documents/somefile.txt

don't know if this info helps at all.

not sure what you mean by “SMB/CIFS network mount”. As far as i know,
smb/cifs is network protocol, not a network file system such as nfs,
so you don't really mount it... maybe this has nothing to do with your
problem...

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-11 22:01 ` Xah Lee
@ 2009-06-11 22:49   ` Kim Christensen
  2009-06-12  9:41     ` Tassilo Horn
                       ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-11 22:49 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 12, 12:01 am, Xah Lee <xah...@gmail.com> wrote:
> On Jun 11, 1:35 am, Kim Christensen <kim.christen...@gmail.com> wrote:
>
>
>
> > Hi list,
>
> > I've been using Emacs on and off for the past couple of years but
> > recently started using it as main editor on my workstation. It took a
> > while to get into, mainly because I wanted to learn elisp and had to
> > get a grip of the customization possibilites before realising the
> > potential of this fine piece of software :-)
>
> > However, I have quite a disturbing problem when it comes to editing
> > files over a SMB/CIFS network mount. When trying to save a file that I
> > have opened from a mounted share, I cannot save it using basic-save-
> > buffer (C-x C-s or M-x basic-save-buffer). Emacs gives me this error:
>
> > basic-save-buffer-2: Opening output file: no such file or directory,
> > <file path>
>
> > When i try saving using write-file (C-x C-w) instead, it works just
> > fine. This is very disturbing since I have to specify the file name
> > each time :-)
>
> > If anyone has run into this problem and could give me some pointers on
> > how to start debugging it I would be grateful!
>
> > I'm running the following edition of Emacs:
> > GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.14.1) of
> > 2008-09-05 on yellow, modified by Ubuntu
>
> > Best regards,
> > Kim Christensen
>
> not sure what's your networking setup... is it linux to windows?
>
> anyway, i have local network between Windows and Mac. I work in
> Windows using emacsW32 (based on emacs v23). It works fine.
>
> for example, on windows, using emacs, accessing files on my Mac, and
> the file path shows this syntax:
> //169.254.223.41/xah/Documents/somefile.txt
>
> don't know if this info helps at all.
>
> not sure what you mean by “SMB/CIFS network mount”. As far as i know,
> smb/cifs is network protocol, not a network file system such as nfs,
> so you don't really mount it... maybe this has nothing to do with your
> problem...

Hi Lee,

I am actually mounting the Samba share via the cifs network protocol,
which allows me to mount it as a network file system (using "cifs" as
the vfstype argument to the "mount" application).

Are you using tramp for accessing the files? I could try that
tomorrow, without mounting it at all -- just accessing it directly.

Regards,
Kim


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

* Re: Cannot use normal save (C-x C-s) when operating over network mount
  2009-06-11 22:49   ` Kim Christensen
@ 2009-06-12  9:41     ` Tassilo Horn
       [not found]     ` <mailman.506.1244799704.2239.help-gnu-emacs@gnu.org>
  2009-06-12 13:24     ` Xah Lee
  2 siblings, 0 replies; 17+ messages in thread
From: Tassilo Horn @ 2009-06-12  9:41 UTC (permalink / raw)
  To: help-gnu-emacs

Kim Christensen <kim.christensen@gmail.com> writes:

Hi Kim!

> I am actually mounting the Samba share via the cifs network protocol,
> which allows me to mount it as a network file system (using "cifs" as
> the vfstype argument to the "mount" application).

Ah, then I didn't understand you correctly.  If you mounted a SMB share,
then to emacs those should be local files.  Please try the following:

  1. Open a file on that share and edit it
  2. M-x toggle-debug-on-error
  3. Save if with `C-x C-s'
  4. Poste the contents of the *Backtrace* buffer here

> Are you using tramp for accessing the files? I could try that
> tomorrow, without mounting it at all -- just accessing it directly.

You can try, but working with files on a mounted smb share should work
anyway...

Bye,
Tassilo





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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
       [not found]     ` <mailman.506.1244799704.2239.help-gnu-emacs@gnu.org>
@ 2009-06-12 10:31       ` Kim Christensen
  2009-06-12 11:12         ` Lennart Borgman
                           ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-12 10:31 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 12, 11:41 am, Tassilo Horn <tass...@member.fsf.org> wrote:
> Kim Christensen <kim.christen...@gmail.com> writes:
>
> Hi Kim!
>
> > I am actually mounting the Samba share via the cifs network protocol,
> > which allows me to mount it as a network file system (using "cifs" as
> > the vfstype argument to the "mount" application).
>
> Ah, then I didn't understand you correctly.  If you mounted a SMB share,
> then to emacs those should be local files.  Please try the following:
>
>   1. Open a file on that share and edit it
>   2. M-x toggle-debug-on-error
>   3. Save if with `C-x C-s'
>   4. Poste the contents of the *Backtrace* buffer here
>
> > Are you using tramp for accessing the files? I could try that
> > tomorrow, without mounting it at all -- just accessing it directly.
>
> You can try, but working with files on a mounted smb share should work
> anyway...
>
> Bye,
> Tassilo

Hi again,

I have enabled the debugger and receive the following trace when
trying to save ('C-x C-s'):

Debugger entered--Lisp error: (file-error "Opening output file" "no
such file or directory" "/mnt/effie/foo.bar/www/mulang/
basket_options.php")
  write-region(1 4688 "/mnt/effie/foo.bar/www/mulang/
basket_options.php" nil t "/mnt/effie/foo.bar/www/mulang/
basket_options.php")
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer()
  save-buffer(1)
  call-interactively(save-buffer)

That doesn't give me much information to proceed with though...

What is the difference between saving a file with 'C-x C-s' and 'C-x C-
w', filesystem-wise? Maybe this error is related to the actual
procedure done on the filesystem; I recall gedit having some trouble
when saving files that were accessed through SMB/CIFS because of the
way it saved the file with a temporary name at first - then renaming
it to the original file. I am not sure how Emacs do this, but it could
be related.

Regards,
Kim


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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-12 10:31       ` Kim Christensen
@ 2009-06-12 11:12         ` Lennart Borgman
       [not found]         ` <mailman.510.1244805160.2239.help-gnu-emacs@gnu.org>
                           ` (2 subsequent siblings)
  3 siblings, 0 replies; 17+ messages in thread
From: Lennart Borgman @ 2009-06-12 11:12 UTC (permalink / raw)
  To: Kim Christensen; +Cc: help-gnu-emacs

Kim, what version of Emacs are you using? Does this happen with
pretest Emacs 23?


On Fri, Jun 12, 2009 at 12:31 PM, Kim
Christensen<kim.christensen@gmail.com> wrote:
> On Jun 12, 11:41 am, Tassilo Horn <tass...@member.fsf.org> wrote:
>> Kim Christensen <kim.christen...@gmail.com> writes:
>>
>> Hi Kim!
>>
>> > I am actually mounting the Samba share via the cifs network protocol,
>> > which allows me to mount it as a network file system (using "cifs" as
>> > the vfstype argument to the "mount" application).
>>
>> Ah, then I didn't understand you correctly.  If you mounted a SMB share,
>> then to emacs those should be local files.  Please try the following:
>>
>>   1. Open a file on that share and edit it
>>   2. M-x toggle-debug-on-error
>>   3. Save if with `C-x C-s'
>>   4. Poste the contents of the *Backtrace* buffer here
>>
>> > Are you using tramp for accessing the files? I could try that
>> > tomorrow, without mounting it at all -- just accessing it directly.
>>
>> You can try, but working with files on a mounted smb share should work
>> anyway...
>>
>> Bye,
>> Tassilo
>
> Hi again,
>
> I have enabled the debugger and receive the following trace when
> trying to save ('C-x C-s'):
>
> Debugger entered--Lisp error: (file-error "Opening output file" "no
> such file or directory" "/mnt/effie/foo.bar/www/mulang/
> basket_options.php")
>  write-region(1 4688 "/mnt/effie/foo.bar/www/mulang/
> basket_options.php" nil t "/mnt/effie/foo.bar/www/mulang/
> basket_options.php")
>  basic-save-buffer-2()
>  basic-save-buffer-1()
>  basic-save-buffer()
>  save-buffer(1)
>  call-interactively(save-buffer)
>
> That doesn't give me much information to proceed with though...
>
> What is the difference between saving a file with 'C-x C-s' and 'C-x C-
> w', filesystem-wise? Maybe this error is related to the actual
> procedure done on the filesystem; I recall gedit having some trouble
> when saving files that were accessed through SMB/CIFS because of the
> way it saved the file with a temporary name at first - then renaming
> it to the original file. I am not sure how Emacs do this, but it could
> be related.
>
> Regards,
> Kim
>




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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
       [not found]         ` <mailman.510.1244805160.2239.help-gnu-emacs@gnu.org>
@ 2009-06-12 11:50           ` Kim Christensen
  2009-06-12 14:00             ` Lennart Borgman
                               ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-12 11:50 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 12, 1:12 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote:
> Kim, what version of Emacs are you using? Does this happen with
> pretest Emacs 23?

Hi Lennart,

I grabbed the latest version from CVS (23.0.94.1), still the same
issue.

Here is the (possibly) related gedit bug I mentioned earlier:
https://bugs.launchpad.net/sambaserver/+bug/34813

It seems that the problem is gedit trying to rename a file which has
an open file descriptor, which is not supported on (some) non-Linux
filesystems as is the case with SMB/CIFS. Maybe this is the case with
Emacs too? I'm not too much of a wizard to check the behaviour
myself :-)

Regards,
Kim


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

* Re: Cannot use normal save (C-x C-s) when operating over network mount
  2009-06-12 10:31       ` Kim Christensen
  2009-06-12 11:12         ` Lennart Borgman
       [not found]         ` <mailman.510.1244805160.2239.help-gnu-emacs@gnu.org>
@ 2009-06-12 11:52         ` Tassilo Horn
       [not found]         ` <mailman.512.1244807597.2239.help-gnu-emacs@gnu.org>
  3 siblings, 0 replies; 17+ messages in thread
From: Tassilo Horn @ 2009-06-12 11:52 UTC (permalink / raw)
  To: help-gnu-emacs

Kim Christensen <kim.christensen@gmail.com> writes:

Hi Kim,

> I have enabled the debugger and receive the following trace when
> trying to save ('C-x C-s'):
>
> Debugger entered--Lisp error: (file-error "Opening output file" "no
> such file or directory" "/mnt/effie/foo.bar/www/mulang/
> basket_options.php")
>   write-region(1 4688 "/mnt/effie/foo.bar/www/mulang/
> basket_options.php" nil t "/mnt/effie/foo.bar/www/mulang/
> basket_options.php")

Is the wrapping done by your mail client, or does emacs really think the
file is

/mnt/effie/foo.bar/www/mulang/
basket_options.php

What does `C-h v buffer-file-name RET" in that buffer say?

Bye,
Tassilo
-- 
      "DRM manages rights in the same way a jail manages freedom"





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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-11 22:49   ` Kim Christensen
  2009-06-12  9:41     ` Tassilo Horn
       [not found]     ` <mailman.506.1244799704.2239.help-gnu-emacs@gnu.org>
@ 2009-06-12 13:24     ` Xah Lee
  2 siblings, 0 replies; 17+ messages in thread
From: Xah Lee @ 2009-06-12 13:24 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 11, 3:49 pm, Kim Christensen <kim.christen...@gmail.com> wrote:
> On Jun 12, 12:01 am, Xah Lee <xah...@gmail.com> wrote:
>
>
>
>
>
> > On Jun 11, 1:35 am, Kim Christensen <kim.christen...@gmail.com> wrote:
>
> > > Hi list,
>
> > > I've been using Emacs on and off for the past couple of years but
> > > recently started using it as main editor on my workstation. It took a
> > > while to get into, mainly because I wanted to learn elisp and had to
> > > get a grip of the customization possibilites before realising the
> > > potential of this fine piece of software :-)
>
> > > However, I have quite a disturbing problem when it comes to editing
> > > files over a SMB/CIFS network mount. When trying to save a file that I
> > > have opened from a mounted share, I cannot save it using basic-save-
> > > buffer (C-x C-s or M-x basic-save-buffer). Emacs gives me this error:
>
> > > basic-save-buffer-2: Opening output file: no such file or directory,
> > > <file path>
>
> > > When i try saving using write-file (C-x C-w) instead, it works just
> > > fine. This is very disturbing since I have to specify the file name
> > > each time :-)
>
> > > If anyone has run into this problem and could give me some pointers on
> > > how to start debugging it I would be grateful!
>
> > > I'm running the following edition of Emacs:
> > > GNU Emacs 22.2.1 (x86_64-pc-linux-gnu, GTK+ Version 2.14.1) of
> > > 2008-09-05 on yellow, modified by Ubuntu
>
> > > Best regards,
> > > Kim Christensen
>
> > not sure what's your networking setup... is it linux to windows?
>
> > anyway, i have local network between Windows and Mac. I work in
> > Windows using emacsW32 (based on emacs v23). It works fine.
>
> > for example, on windows, using emacs, accessing files on my Mac, and
> > the file path shows this syntax:
> > //169.254.223.41/xah/Documents/somefile.txt
>
> > don't know if this info helps at all.
>
> > not sure what you mean by “SMB/CIFS network mount”. As far as i know,
> > smb/cifs is network protocol, not a network file system such as nfs,
> > so you don't really mount it... maybe this has nothing to do with your
> > problem...
>
> Hi Lee,
>
> I am actually mounting the Samba share via the cifs network protocol,
> which allows me to mount it as a network file system (using "cifs" as
> the vfstype argument to the "mount" application).

thanks for the clarification.

> Are you using tramp for accessing the files? I could try that
> tomorrow, without mounting it at all -- just accessing it directly.

No, it is not going thru tramp. I think emacs passes the file access
request to windows. Because, on windows, in emacs, when i open the
file  //169.254.223.41/xah/Documents/somefile.txt
for the first time, Windows pops up the file sharing login dialog.

  Xah
∑ http://xahlee.org/^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-12 11:50           ` Kim Christensen
@ 2009-06-12 14:00             ` Lennart Borgman
  2009-06-13  1:16             ` Jason Rumney
  2009-06-13  6:46             ` Tim X
  2 siblings, 0 replies; 17+ messages in thread
From: Lennart Borgman @ 2009-06-12 14:00 UTC (permalink / raw)
  To: Kim Christensen; +Cc: help-gnu-emacs

Thanks Kim, then I think the best would be to submit a bug report with
the pretest Emacs 23 version.


On Fri, Jun 12, 2009 at 1:50 PM, Kim
Christensen<kim.christensen@gmail.com> wrote:
> On Jun 12, 1:12 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote:
>> Kim, what version of Emacs are you using? Does this happen with
>> pretest Emacs 23?
>
> Hi Lennart,
>
> I grabbed the latest version from CVS (23.0.94.1), still the same
> issue.
>
> Here is the (possibly) related gedit bug I mentioned earlier:
> https://bugs.launchpad.net/sambaserver/+bug/34813
>
> It seems that the problem is gedit trying to rename a file which has
> an open file descriptor, which is not supported on (some) non-Linux
> filesystems as is the case with SMB/CIFS. Maybe this is the case with
> Emacs too? I'm not too much of a wizard to check the behaviour
> myself :-)
>
> Regards,
> Kim
>




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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
       [not found]         ` <mailman.512.1244807597.2239.help-gnu-emacs@gnu.org>
@ 2009-06-12 14:18           ` Kim Christensen
  0 siblings, 0 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-12 14:18 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 12, 1:52 pm, Tassilo Horn <tass...@member.fsf.org> wrote:

> > Debugger entered--Lisp error: (file-error "Opening output file" "no
> > such file or directory" "/mnt/effie/foo.bar/www/mulang/
> > basket_options.php")
> >   write-region(1 4688 "/mnt/effie/foo.bar/www/mulang/
> > basket_options.php" nil t "/mnt/effie/foo.bar/www/mulang/
> > basket_options.php")
>
> Is the wrapping done by your mail client, or does emacs really think the
> file is
>
> /mnt/effie/foo.bar/www/mulang/
> basket_options.php

The wrapping was done by my MUA.

> What does `C-h v buffer-file-name RET" in that buffer say?

buffer-file-name is a variable defined in `C source code'.
Its value is
"/mnt/effie/foo.bar/www/mulang/basket_options.php"
Local in buffer basket_options.php; global value is nil
Automatically becomes buffer-local when set in any fashion.

Regards,
Kim


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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-12 11:50           ` Kim Christensen
  2009-06-12 14:00             ` Lennart Borgman
@ 2009-06-13  1:16             ` Jason Rumney
  2009-06-15  7:29               ` Kim Christensen
  2009-06-13  6:46             ` Tim X
  2 siblings, 1 reply; 17+ messages in thread
From: Jason Rumney @ 2009-06-13  1:16 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 12, 7:50 pm, Kim Christensen <kim.christen...@gmail.com> wrote:

> Here is the (possibly) related gedit bug I mentioned earlier:https://bugs.launchpad.net/sambaserver/+bug/34813
>
> It seems that the problem is gedit trying to rename a file which has
> an open file descriptor, which is not supported on (some) non-Linux
> filesystems as is the case with SMB/CIFS. Maybe this is the case with
> Emacs too? I'm not too much of a wizard to check the behaviour
> myself :-)

Emacs doesn't generally hold files open, it reads the contents into a
buffer and closes the fle descriptor. So is another program holding
the file open?


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

* Re: Cannot use normal save (C-x C-s) when operating over network mount
  2009-06-12 11:50           ` Kim Christensen
  2009-06-12 14:00             ` Lennart Borgman
  2009-06-13  1:16             ` Jason Rumney
@ 2009-06-13  6:46             ` Tim X
  2009-06-15  7:40               ` Kim Christensen
  2 siblings, 1 reply; 17+ messages in thread
From: Tim X @ 2009-06-13  6:46 UTC (permalink / raw)
  To: help-gnu-emacs

Kim Christensen <kim.christensen@gmail.com> writes:

> On Jun 12, 1:12 pm, Lennart Borgman <lennart.borg...@gmail.com> wrote:
>> Kim, what version of Emacs are you using? Does this happen with
>> pretest Emacs 23?
>
> Hi Lennart,
>
> I grabbed the latest version from CVS (23.0.94.1), still the same
> issue.
>
> Here is the (possibly) related gedit bug I mentioned earlier:
> https://bugs.launchpad.net/sambaserver/+bug/34813
>
> It seems that the problem is gedit trying to rename a file which has
> an open file descriptor, which is not supported on (some) non-Linux
> filesystems as is the case with SMB/CIFS. Maybe this is the case with
> Emacs too? I'm not too much of a wizard to check the behaviour
> myself :-)
>
I edit data on a remote windows server by mounting a partition locally
using smbfs. 

I have only ever had problems with saving files when either my quota has
been exceeded or the windows service running the quota software has
stopped running or got stuck. 

I know nothing about windows, but when I asked the windows admins what
was going on, I was somewhat surprised regarding how the quota software
seems to operate under windows. I don't know what the software is, ut I
believe it is some third party software. 

At any rate, I get similar errors/behavior to what you have outlined
when there are issues with the disk quota software is playing up. 

My suggestions would be 

1. Check there are no quota or space issues on the remote system. Keep
in mind there often needs to be twice your file size space available to
handle temp files etc. (which reminds me, where is emacs putting its
backup files?). 

2. Run emacs in bare bones mode using emacs -q and emacs -Q to make sure
that its not something in your customization or site wide customization
that is breaking things. Just try editing a small file and saving it -
do it in fundamental mode rather than a special purpose mode, just in
case it is something with the mode that is causing the problem. 

3. Try editing the file with tramp and see if you get the same issue

4. Try editing the file with vi/nano/pico/whatever and see if there are
any problems. This may help to determine if its an emacs issue, a file
mount issue or a windows/smb issue

HTH

Tim


-- 
tcross (at) rapttech dot com dot au


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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-13  1:16             ` Jason Rumney
@ 2009-06-15  7:29               ` Kim Christensen
  0 siblings, 0 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-15  7:29 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 13, 3:16 am, Jason Rumney <jasonrum...@gmail.com> wrote:

Hi Jason,

> Emacs doesn't generally hold files open, it reads the contents into a
> buffer and closes the fle descriptor. So is another program holding
> the file open?

No, these files are only opened by my Emacs client.

Regards,
Kim



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

* Re: Cannot use normal save (C-x C-s) when operating over network  mount
  2009-06-13  6:46             ` Tim X
@ 2009-06-15  7:40               ` Kim Christensen
  0 siblings, 0 replies; 17+ messages in thread
From: Kim Christensen @ 2009-06-15  7:40 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 13, 8:46 am, Tim X <t...@nospam.dev.null> wrote:

Hi Tim,

Thanks for your reply.

> I edit data on a remote windows server by mounting a partition locally
> using smbfs.
>
> I have only ever had problems with saving files when either my quota has
> been exceeded or the windows service running the quota software has
> stopped running or got stuck.
>
> I know nothing about windows, but when I asked the windows admins what
> was going on, I was somewhat surprised regarding how the quota software
> seems to operate under windows. I don't know what the software is, ut I
> believe it is some third party software.
>
> At any rate, I get similar errors/behavior to what you have outlined
> when there are issues with the disk quota software is playing up.

Our Samba solution is implemented on Linux, with no quota rules
applied whatsoever. As I described in the OP, the problem I am having
does only occur when trying to save (overwrite) a file using the
standard save command ('C-x C-s'). If I use the "Save as" command ('C-
x C-w') instead, and specify the file name which I currently have open
and want to save, everything works as expected.

> My suggestions would be
>
> 1. Check there are no quota or space issues on the remote system. Keep
> in mind there often needs to be twice your file size space available to
> handle temp files etc. (which reminds me, where is emacs putting its
> backup files?).

My backup files reside under my home directory, specified with the
'backup-directory-alist' variable.

> 2. Run emacs in bare bones mode using emacs -q and emacs -Q to make sure
> that its not something in your customization or site wide customization
> that is breaking things. Just try editing a small file and saving it -
> do it in fundamental mode rather than a special purpose mode, just in
> case it is something with the mode that is causing the problem.

I started emacs with the -q and -Q arguments and the problem persists.

> 3. Try editing the file with tramp and see if you get the same issue

Now, here is where it gets interesting - TRAMP works flawlessly. I set
it up this Friday and did some testing for a few hours and it haven't
had a hiccup yet.

If I open a file using the mounted Samba share, edit it for a bit and
try to save it (using 'C-x C-s'), Emacs gives me the error that it
can't find the file or directory. When opening it with TRAMP (using
the '/smb:/') keyword, I can save it without any problems at all!

> 4. Try editing the file with vi/nano/pico/whatever and see if there are
> any problems. This may help to determine if its an emacs issue, a file
> mount issue or a windows/smb issue

I just tried editing a few files over the samba share with vim and it
works without any problems.

Regards,
Kim



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

end of thread, other threads:[~2009-06-15  7:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-11  8:35 Cannot use normal save (C-x C-s) when operating over network mount Kim Christensen
2009-06-11 13:32 ` Tassilo Horn
     [not found] ` <mailman.457.1244727146.2239.help-gnu-emacs@gnu.org>
2009-06-11 14:13   ` Kim Christensen
2009-06-11 22:01 ` Xah Lee
2009-06-11 22:49   ` Kim Christensen
2009-06-12  9:41     ` Tassilo Horn
     [not found]     ` <mailman.506.1244799704.2239.help-gnu-emacs@gnu.org>
2009-06-12 10:31       ` Kim Christensen
2009-06-12 11:12         ` Lennart Borgman
     [not found]         ` <mailman.510.1244805160.2239.help-gnu-emacs@gnu.org>
2009-06-12 11:50           ` Kim Christensen
2009-06-12 14:00             ` Lennart Borgman
2009-06-13  1:16             ` Jason Rumney
2009-06-15  7:29               ` Kim Christensen
2009-06-13  6:46             ` Tim X
2009-06-15  7:40               ` Kim Christensen
2009-06-12 11:52         ` Tassilo Horn
     [not found]         ` <mailman.512.1244807597.2239.help-gnu-emacs@gnu.org>
2009-06-12 14:18           ` Kim Christensen
2009-06-12 13:24     ` Xah Lee

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