LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to edit files with xemacs over Samba share? Samba problem? (https://www.linuxquestions.org/questions/linux-software-2/how-to-edit-files-with-xemacs-over-samba-share-samba-problem-682610/)

rylan76 11-11-2008 08:10 AM

How to edit files with xemacs over Samba share? Samba problem?
 
Hi all

I have a pretty unique problem with xemacs and editing a file accesible via a samba share on a remote machine.

I can only open the file once. If I try to save the file at all, or close it an open it again, xemacs hangs solildy. I have ssh'ed into the remote machine, and ran smbstatus. I've noticed that xemacs creates locks when you edit a file, but never releases them (ever). Samba then apparently thinks that the file is being written by somebody else, and never allows any other application on my machine to open or work with that file again.

I. e. when I edit a file with kedit on the remove machine, this is momentarily there while opening the file over the network:

[root@linuxdev1 ~]# smbstatus

Samba version 3.0.23c
PID Username Group Machine
-------------------------------------------------------------------

Service pid machine Connected at
-------------------------------------------------------
shared 20431 41.246.154.10 Tue Nov 11 13:50:12 2008
shared 20529 41.242.190.214 Tue Nov 11 13:56:44 2008
shared 20802 10.0.0.100 Tue Nov 11 14:39:15 2008
IPC$ 20674 41.242.32.191 Tue Nov 11 14:12:56 2008

Locked files:
20431 99 DENY_NONE 0x2019f RDWR EXCLUSIVE+BATCH /usr/local/apache2/htdocs/php generic/render_center5.php Tue Nov 11 16:06:16 2008
[root@linuxdev1 ~]#
----------------------------------------------

The moment the file is loaded into kedit, the lock is gone:
[root@linuxdev1 ~]# smbstatus

Samba version 3.0.23c
PID Username Group Machine
-------------------------------------------------------------------

Service pid machine Connected at
-------------------------------------------------------
shared 20431 41.246.154.10 Tue Nov 11 13:50:12 2008
shared 20529 41.242.190.214 Tue Nov 11 13:56:44 2008
shared 20802 10.0.0.100 Tue Nov 11 14:39:15 2008
IPC$ 20674 41.242.32.191 Tue Nov 11 14:12:56 2008

No locked files.

[root@linuxdev1 ~]#
-------------------------------------------------

However, Emacs -NEVER- releases the lock - it keeps on looking like it looks above ONLY while kedit / vi / kate / whatever is opening the file and reading its contents.

Any idea how to make Emacs behave like any other editor, and just leave the file alone once it has opened it?

If it maintains a lock as it currently does, it is impossible to use xemacs to edit any files over a samba share... can this be??

I have noticed that emacs-nox does NOT do this (i. e. keep a constant read lock on the samba'ed file) - why can't xemacs do the same??

Thanks!

rylan76 11-13-2008 01:00 AM

This issue is RESOLVED - I upgraded to the newest Emacs version I could find (2008-11-13) and it now edits well over a samba connection...


All times are GMT -5. The time now is 07:56 AM.