Article View: gnu.emacs.bug
Article #87193[19.27]: NFS filelocking and font-lock-mode
From: Kevin Broadey
Date: Wed, 12 Oct 1994 05:38
Date: Wed, 12 Oct 1994 05:38
41 lines
2355 bytes
2355 bytes
First of all I'd like to thank Karl for giving us a workable file
locking scheme under NFS. I know it isn't perfect, but it works in
the situation most UNIX system users find themselves in -- they do
have write permission to the directory, they do have symbolic links
and they do have long filename support. Like I said, it ain't
perfect, but its a whole lot better than nothing at all.
And now for the complaint...
I use font-lock-mode to highlight the text in my buffers. I've got it
set up in many major-mode hooks so it cuts in whenever I visit a file.
The problem is that changing text properties counts as a file
modification so the filelock code cuts in and asks whether I want to
steal the file. Since I only want to look at it I reply `q', and I
get the message:
File mode specification error: (file-locked "File is locked"
"/cgw_ibm/cgw_users/KevinB/.emacs" "KevinB@mended_drum (pid
24333)")
Susbsequent attempts to font-lock-fontify-buffer also cause the "file
locked" prompt, though now when I answer `q' emacs beeps and says
File is locked: /cgw_ibm/cgw_users/KevinB/.emacs,
KevinB@mended_drum (pid 24333)
I guess the initial error signal is being trapped somewhere in the
file-file code.
The problem is this: why does setting a text property count as a file
modification? I've never understood this. I don't see why someone
else locking a file should preclude me from colouring in my buffer
that happens to be visiting the file.
Perhaps filelock should have another response "continue without
stealing" to allow non-file-affecting changes like this.
Or perhaps font-lock-mode should use overlays like hilit19 :-)
--
Kevin
Technical Details
Message-ID:
<9410111504.AA17102@bartley>Path:
arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!bartley.demon.co.uk!KevinBShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,9dc0d32abddc5959,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1994-10-13 17:07:41 PST Path: arc1-ca.pugleaf.net!bga.com!news.sprintlink.net!howland.reston.ans.net!math.ohio-state.edu!cis.ohio-state.edu!bartley.demon.co.uk!KevinB From: KevinB@bartley.demon.co.uk (Kevin Broadey) Newsgroups: gnu.emacs.bug Subject: [19.27]: NFS filelocking and font-lock-mode Date: 12 Oct 1994 01:38:34 -0400 Organization: GNUs Not Usenet Lines: 41 Sender: daemon@cis.ohio-state.edu Approved: bug-gnu-emacs@prep.ai.mit.edu Distribution: gnu Message-ID: <9410111504.AA17102@bartley>