bug#3869: 23.1.50; vc-rcs toggles read-only-mode even when a file is checked out by the same user who has the lock

Maurizio Vitale <[email protected]>
Newsgroups gmane.emacs.bugs,gmane.emacs.pretest.bugs
Organization Polymath Solutions, Inc.
Message-ID <[email protected]>
Please write in English if possible, because the Emacs maintainers
usually do not have translators to read other languages for them.

Your bug report will be posted to the [email protected] mailing list.

Please describe exactly what actions triggered the bug
and the precise symptoms of the bug:

If you open a file under RCS that has been saved but not checked back in
the file is open read-only. It seems like this is due to

(defun vc-rcs-find-file-hook ()
  ;; If the file is locked by some other user, make
  ;; the buffer read-only.  Like this, even root
  ;; cannot modify a file that someone else has locked.
  (stringp (vc-state buffer-file-name 'RCS))
  (setq buffer-read-only t))

that should be something like:

(defun vc-rcs-find-file-hook ()
  ;; If the file is locked by some other user, make
  ;; the buffer read-only.  Like this, even root
  ;; cannot modify a file that someone else has locked.
  (and (stringp (vc-state buffer-file-name 'RCS))
       (setq buffer-read-only t)))


If Emacs crashed, and you have the Emacs process in the gdb debugger,
please include the output from the following gdb commands:
    `bt full' and `xbacktrace'.
If you would like to further debug the crash, please read the file
/usr/local/emacs-07112009/share/emacs/23.1.50/etc/DEBUG for instructions.


In GNU Emacs 23.1.50.3 (x86_64-unknown-linux-gnu, GTK+ Version 2.16.1)
 of 2009-07-11 on cuma
Windowing system distributor `The X.Org Foundation', version 11.0.10600000
configured using `configure  '--prefix=/usr/local/emacs-07112009/''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: ERC

Minor modes in effect:
  diff-auto-refine-mode: t
  erc-list-mode: t
  erc-menu-mode: t
  erc-ring-mode: t
  erc-pcomplete-mode: t
  erc-button-mode: t
  erc-netsplit-mode: t
  iswitchb-mode: t
  recentf-mode: t
  display-time-mode: t
  show-paren-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-match-mode: t
  erc-services-mode: t
  erc-networks-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-spelling-mode: t
  flyspell-mode: t
  erc-autojoin-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-move-to-prompt-mode: t
  erc-readonly-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
u r n s SPC a SPC s t r i n g SPC i f f SPC t h e SPC 
s u i l e <backspace> <backspace> <backspace> <backspace> 
<backspace> f i l e SPC i s SPC l o c k e d SPC b y 
SPC s o m e SPC o t h e r SPC u s e e <backspace> r 
SPC a n d SPC t h e SPC i n f o r m a t i o n SPC s 
h o u l d SPC b e SPC u s e d SPC t o SPC d e c i d 
e SPC w h e t h e r SPC t o SPC t o g g l e SPC t h 
e SPC r e a d - o n l y SPC m o d e . <return> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> C-h 
a b u g <return> <escape> C-v <escape> C-v <escape> 
C-v C-x o <escape> < s r e p o r t C-SPC C-s r e p 
o r t C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-x o 
<help-echo> <help-echo> l e <tab> b u t SPC i t SPC 
d e o <backspace> <backspace> o e s n ' t SPC h e l 
p SPC i f SPC i t SPC <help-echo> d o e s n ' t SPC 
g e t SPC i n t o SPC t h e SPC r e l e a s e d SPC 
v e r s i o n . <return> <escape> x r e p o r <tab> 
b <tab> <return>

Recent messages:
Mark activated
Mark set [2 times]
Contacting host: pastebin.com:80
Mark set [2 times]
Contacting host: pastebin.com:80
Mark set
Type C-x 1 to remove help window.  
Mark set
Buffer is read-only: #<buffer *Apropos*> [7 times]
Mark set

--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.