all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
@ 2008-06-25  5:04 Thien-Thi Nguyen
  2008-06-25  5:36 ` Miles Bader
  0 siblings, 1 reply; 8+ messages in thread
From: Thien-Thi Nguyen @ 2008-06-25  5:04 UTC (permalink / raw)
  To: emacs-devel

While investigating the pgg-gpg.el bug report (another thread), i
did a cvs update and now `C-x C-q' bleats on a CVS-controlled
read-only file (w/ env var `CVSREAD' set to "1").  This used to
work before, so i consider the current situation a regression.

I see vc-toggle-read-only now reads:

| (defun vc-toggle-read-only (&optional verbose)
|   "Change read-only status of current buffer, perhaps via version control.
| 
| If the buffer is visiting a file registered with version control,
| throw an error, because this is not a safe or really meaningful operation
| on any version-control system newer than RCS.
| 
| Otherwise, just change the read-only flag of the buffer.
| 
| If you bind this function to \\[toggle-read-only], then Emacs
| will properly intercept all attempts to toggle the read-only flag
| on version-controlled buffer."
|   (interactive "P")
|   (if (vc-backend buffer-file-name)
|       (error "Toggling the readability of a version controlled file is likely to wreak havoc.")
|     (toggle-read-only)))

The "not a safe ... newer than RCS" blurb is (gratuitously) wrong,
but at least we know the authors' bias up front.  I suggest we
remove that blurb and use checkout-model info to make this command
DTRT again.

thi




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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25  5:04 vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1 Thien-Thi Nguyen
@ 2008-06-25  5:36 ` Miles Bader
  2008-06-25  9:35   ` Thien-Thi Nguyen
  0 siblings, 1 reply; 8+ messages in thread
From: Miles Bader @ 2008-06-25  5:36 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: emacs-devel

Thien-Thi Nguyen <ttn@gnuvola.org> writes:
> I see vc-toggle-read-only now reads:

> The "not a safe ... newer than RCS" blurb is (gratuitously) wrong,
> but at least we know the authors' bias up front.  I suggest we
> remove that blurb and use checkout-model info to make this command
> DTRT again.

It was always a stupid command (even 2,000,000 years ago when a few
people still used RCS), adding VC functionality in an unexpected and
confusing place in a misguided attempt at DWIM.

I say we just get rid of it and good riddance.  It's nothing more than
an ugly reminder of an ugly past.

-Miles

-- 
Would you like fries with that?




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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25  5:36 ` Miles Bader
@ 2008-06-25  9:35   ` Thien-Thi Nguyen
  2008-06-25 14:10     ` Miles Bader
  0 siblings, 1 reply; 8+ messages in thread
From: Thien-Thi Nguyen @ 2008-06-25  9:35 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

() Miles Bader <miles.bader@necel.com>
() Wed, 25 Jun 2008 14:36:00 +0900

   I say we just get rid of it and good riddance.

If/when we do that, many people's ~/.emacs will grow a
(unless (fboundp 'vc-toggle-read-only)
  (global-set-key
   "\C-x\C-q"
   (defun vc-toggle-read-only () "Damn Emacs 23!" (interactive)
     (if (or (and (boundp 'vc-dired-mode) vc-dired-mode)
             ;; use boundp because vc.el might not be loaded
             (vc-backend buffer-file-name))
         (vc-next-action nil)
       (toggle-read-only)))))

which will worm its way onto emacswiki DamnEmacs23, somehow.

But i'm ok w/ that (my ~/.emacs is already fortified :-D).

thi




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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25  9:35   ` Thien-Thi Nguyen
@ 2008-06-25 14:10     ` Miles Bader
  2008-06-25 14:40       ` Thien-Thi Nguyen
  2008-06-25 15:48       ` Stefan Monnier
  0 siblings, 2 replies; 8+ messages in thread
From: Miles Bader @ 2008-06-25 14:10 UTC (permalink / raw)
  To: Thien-Thi Nguyen; +Cc: emacs-devel

Thien-Thi Nguyen <ttn@gnuvola.org> writes:
>    I say we just get rid of it and good riddance.
>
> If/when we do that, many people's ~/.emacs will grow a
> (unless (fboundp 'vc-toggle-read-only)

Where "many" ≊ 3

On the other hand, the number of people who will avoid being confused
and annoyed by the stupidity of vc-toggle-read-only will be _vastly_
greater.

-Miles

-- 
Accord, n. Harmony.




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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25 14:10     ` Miles Bader
@ 2008-06-25 14:40       ` Thien-Thi Nguyen
  2008-07-23 10:02         ` Thien-Thi Nguyen
  2008-06-25 15:48       ` Stefan Monnier
  1 sibling, 1 reply; 8+ messages in thread
From: Thien-Thi Nguyen @ 2008-06-25 14:40 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

() Miles Bader <miles@gnu.org>
() Wed, 25 Jun 2008 23:10:03 +0900

   On the other hand, the number of people who will avoid being
   confused and annoyed by the stupidity of vc-toggle-read-only
   will be _vastly_ greater.

OK, you've convinced me.  The other ~2, well they will survive...

I will wait until ESR finishes wrangling w/ VC (end of July?)
and then delete vc-toggle-read-only with the (proposed) NEWS
entry:

* Incompatible Editing Changes in Emacs 23.1
** Command removed: vc-toggle-read-only
If you think you need this, ask yourself: "Self, don't i feel less
confused and annoyed now that that stupid vc-toggle-read-only
is gone?".  Realize the affirmative, take a deep breath, and
turn your gaze to vc-next-action (normally bound to `C-x v v').

(That is, unless anyone objects.)

thi





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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25 14:10     ` Miles Bader
  2008-06-25 14:40       ` Thien-Thi Nguyen
@ 2008-06-25 15:48       ` Stefan Monnier
  2008-06-25 16:27         ` Thien-Thi Nguyen
  1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2008-06-25 15:48 UTC (permalink / raw)
  To: Miles Bader; +Cc: Thien-Thi Nguyen, emacs-devel

>> I say we just get rid of it and good riddance.
>> 
>> If/when we do that, many people's ~/.emacs will grow a
>> (unless (fboundp 'vc-toggle-read-only)

> Where "many" ≊ 3

> On the other hand, the number of people who will avoid being confused
> and annoyed by the stupidity of vc-toggle-read-only will be _vastly_
> greater.

I do not understand the discussion: AFAIK, Emacs-22 already changed C-x
C-q to run toggle-read-only rather than vc-toggle-read-only.
AFAIK vc-toggle-read-only was only still used by bs.el and buff-menu.el
(both of which I've just fixed to use toggle-read-only).


        Stefan




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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25 15:48       ` Stefan Monnier
@ 2008-06-25 16:27         ` Thien-Thi Nguyen
  0 siblings, 0 replies; 8+ messages in thread
From: Thien-Thi Nguyen @ 2008-06-25 16:27 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

() Stefan Monnier <monnier@iro.umontreal.ca>
() Wed, 25 Jun 2008 11:48:21 -0400

   Emacs-22 already changed C-x C-q to run
   toggle-read-only rather than vc-toggle-read-only.

Since 2004-11-09 i bind it to `C-x C-q' (personally):

http://www.gnuvola.org/software/personal-elisp/dist/lisp/core.el
(line 1013)

But that will change (locally) when vc-toggle-read-only goes away.

thi




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

* Re: vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1
  2008-06-25 14:40       ` Thien-Thi Nguyen
@ 2008-07-23 10:02         ` Thien-Thi Nguyen
  0 siblings, 0 replies; 8+ messages in thread
From: Thien-Thi Nguyen @ 2008-07-23 10:02 UTC (permalink / raw)
  To: Miles Bader; +Cc: emacs-devel

() Thien-Thi Nguyen <ttn@gnuvola.org>
() Wed, 25 Jun 2008 16:40:29 +0200

   I will wait until ESR finishes wrangling w/ VC (end of July?)
   and then delete vc-toggle-read-only with the (proposed) NEWS
   entry: [...]

End of July soon, but i withdraw this plan, since NEWS.22 says:

  The function `vc-toggle-read-only' will continue to exist.

Maybe later.

thi




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

end of thread, other threads:[~2008-07-23 10:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-25  5:04 vc-toggle-read-only mishandles CVS ro file in presence of CVSREAD=1 Thien-Thi Nguyen
2008-06-25  5:36 ` Miles Bader
2008-06-25  9:35   ` Thien-Thi Nguyen
2008-06-25 14:10     ` Miles Bader
2008-06-25 14:40       ` Thien-Thi Nguyen
2008-07-23 10:02         ` Thien-Thi Nguyen
2008-06-25 15:48       ` Stefan Monnier
2008-06-25 16:27         ` Thien-Thi Nguyen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.