* vc-cvs-global-switches and -f @ 2005-06-21 1:28 Juanma Barranquero 2005-06-21 20:49 ` Stefan Monnier 0 siblings, 1 reply; 10+ messages in thread From: Juanma Barranquero @ 2005-06-21 1:28 UTC (permalink / raw) I was running "emacs.exe -Q" today and was puzzled to see that the output of `vc-diff' talked about "conflicting specifications of output style", until I remembered that I have an entry on ~/.cvsrc which says: "diff -u2", and the default style for VC is "-c". So the question is: why does Emacs by default assume that it is safe to use .cvsrc? It seems to me that having "-f" as default for `vc-cvs-global-switches' would be more logical, specially because in a situation like mine above, having it set on my .emacs wouldn't have helped. -- /L/e/k/t/u ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-21 1:28 vc-cvs-global-switches and -f Juanma Barranquero @ 2005-06-21 20:49 ` Stefan Monnier 2005-06-21 22:24 ` Juanma Barranquero 0 siblings, 1 reply; 10+ messages in thread From: Stefan Monnier @ 2005-06-21 20:49 UTC (permalink / raw) Cc: emacs-devel > I was running "emacs.exe -Q" today and was puzzled to see that the > output of `vc-diff' talked about "conflicting specifications of output > style", until I remembered that I have an entry on ~/.cvsrc which > says: "diff -u2", and the default style for VC is "-c". > So the question is: why does Emacs by default assume that it is safe > to use .cvsrc? It seems to me that having "-f" as default for > `vc-cvs-global-switches' would be more logical, specially because in a > situation like mine above, having it set on my .emacs wouldn't have > helped. I for one would be annoyed to have to re-specify in Emacs the options I've already set globally in my ~/.cvsrc. In PCL-CVS I slove this dilemma by parsing the ~/.cvsrc file in order to set the default value of config vars. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-21 20:49 ` Stefan Monnier @ 2005-06-21 22:24 ` Juanma Barranquero 2005-06-22 3:31 ` Stefan Monnier 0 siblings, 1 reply; 10+ messages in thread From: Juanma Barranquero @ 2005-06-21 22:24 UTC (permalink / raw) Cc: emacs-devel On 6/21/05, Stefan Monnier <monnier@iro.umontreal.ca> wrote: > I for one would be annoyed to have to re-specify in Emacs the options I've > already set globally in my ~/.cvsrc. You can always set `vc-cvs-global-switches' to nil in your .emacs. The situation I'm trying to fix is precisely the one where the user is not using local configs (i.e., emacs -Q) and there are .cvsrc entries which conflict with Emacs defaults (as it happened with my "diff -u2" and the "-c" default of VC). So my proposed fix does not incommode you, other than forcing you to add an entry to your .emacs file *once*, while the default requires the user to remember doing "M-x set-variable vc-cvs-global-switches RET nil RET" *every time* he starts Emacs without loading .emacs. -- /L/e/k/t/u ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-21 22:24 ` Juanma Barranquero @ 2005-06-22 3:31 ` Stefan Monnier 2005-06-22 3:51 ` Juanma Barranquero 0 siblings, 1 reply; 10+ messages in thread From: Stefan Monnier @ 2005-06-22 3:31 UTC (permalink / raw) Cc: emacs-devel > RET nil RET" *every time* he starts Emacs without loading .emacs. Are you speaking seriously here? The "emacs -Q" scenario is not a normal use scenario, AFAIK, so its convenience doesn't really matter that much. At least not nearly as much as the convenience of the normal situation. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-22 3:31 ` Stefan Monnier @ 2005-06-22 3:51 ` Juanma Barranquero 2005-06-22 10:08 ` Andre Spiegel 0 siblings, 1 reply; 10+ messages in thread From: Juanma Barranquero @ 2005-06-22 3:51 UTC (permalink / raw) Cc: emacs-devel > Are you speaking seriously here? > The "emacs -Q" scenario is not a normal use scenario, AFAIK, so its > convenience doesn't really matter that much. At least not nearly as much as > the convenience of the normal situation. Let's put it other way: even on normal situation, it seems safer to make VC *not* use customized defaults it knows nothing about (and which can cause trouble), and let the user who uses a .cvsrc and knows what he's doing to put a simple (setq vc-cvs-global-switches nil) on their .emacs. For my use case to happen, it is not necessary to use -Q, it's just enough to have a .cvsrc with "diff -u" and not having configured any vc-cvs-* entry on .emacs. -- /L/e/k/t/u ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-22 3:51 ` Juanma Barranquero @ 2005-06-22 10:08 ` Andre Spiegel 2005-06-22 10:41 ` Juanma Barranquero 0 siblings, 1 reply; 10+ messages in thread From: Andre Spiegel @ 2005-06-22 10:08 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel On Wed, 2005-06-22 at 05:51 +0200, Juanma Barranquero wrote: > Let's put it other way: even on normal situation, it seems safer to > make VC *not* use customized defaults it knows nothing about (and > which can cause trouble), and let the user who uses a .cvsrc and knows > what he's doing to put a simple > > (setq vc-cvs-global-switches nil) > > on their .emacs. If we put implementation issues aside for the moment, I think the following behaviour would be desirable for VC: (1) Settings from .cvsrc should be effective during VC commands, unless a particular VC command would not work with that setting, in which case VC must override it (2) Customizations that the user makes inside Emacs should override settings in .cvsrc. In some cases, it may be good or tolerable to see a warning message if the settings are inconsistent, e.g. in your case where Emacs and .cvsrc don't agree on the diff format. (3) Generally, users who customize VC settings or who create .cvsrc files can be considered advanced users, and they can be bothered with some effort to make sure that both kinds of settings are consistent. Given this, I don't like the idea of making "-f" the default in VC, because it violates (1). A real solution would require something along the lines of Stefan's parsing of .cvsrc from within Emacs. Stefan, do you see a possibility that VC could use your code from pcvs.el to do this? However, given that we are in a feature freeze, and given (3), and given the fact that this is a rather exotic situation, I don't think we should change anything right now. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-22 10:08 ` Andre Spiegel @ 2005-06-22 10:41 ` Juanma Barranquero 2005-06-22 11:48 ` Andre Spiegel 2005-06-22 11:48 ` Stefan Monnier 0 siblings, 2 replies; 10+ messages in thread From: Juanma Barranquero @ 2005-06-22 10:41 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel > (1) Settings from .cvsrc should be effective during VC commands, unless > a particular VC command would not work with that setting, in > which case VC must override it I'm not going to fight over vc-cvs settings (no, really :-) but if we were creating VC from scratch, I would push for a `vc-cvs-use-cvsrc-settings', defaulting to nil. The equivalent functionality as of today is vc-cvs-global-settings '("-f"). > (2) Customizations that the user makes inside Emacs should override > settings in .cvsrc. In some cases, it may be good or tolerable to > see a warning message if the settings are inconsistent, e.g. in > your case where Emacs and .cvsrc don't agree on the diff format. Just a question: how do you do Emacs override a setting? Because if you've got "update -dP", how you would make Emacs do just "update -d" without passing -f? > (3) Generally, users who customize VC settings or who create .cvsrc > files can be considered advanced users, and they can be bothered > with some effort to make sure that both kinds of settings are > consistent. I'm not entirely sure why being knowledgeable on CVS should make you knowledgeable on Emacs. > However, given that we are in a feature freeze, and given (3), and given > the fact that this is a rather exotic situation, I don't think we should > change anything right now. Other than the (3) part, yeah, I agree with this. -- /L/e/k/t/u ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-22 10:41 ` Juanma Barranquero @ 2005-06-22 11:48 ` Andre Spiegel 2005-06-22 11:48 ` Stefan Monnier 1 sibling, 0 replies; 10+ messages in thread From: Andre Spiegel @ 2005-06-22 11:48 UTC (permalink / raw) Cc: Stefan Monnier, emacs-devel > > (2) Customizations that the user makes inside Emacs should override > > settings in .cvsrc. In some cases, it may be good or tolerable to > > see a warning message if the settings are inconsistent, e.g. in > > your case where Emacs and .cvsrc don't agree on the diff format. > > Just a question: how do you do Emacs override a setting? Because if > you've got "update -dP", how you would make Emacs do just "update -d" > without passing -f? As I said, I was not referring to the current implementation. Currently, Emacs cannot do this, and it likely requires "-f", along with a way to parse .cvsrc from within Emacs as pcvs.el does it. I was just saying that this seems the most reasonable behaviour, regardless of whether it can easily be implemented (especially during a feature freeze). ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-22 10:41 ` Juanma Barranquero 2005-06-22 11:48 ` Andre Spiegel @ 2005-06-22 11:48 ` Stefan Monnier 2005-06-22 13:03 ` Juanma Barranquero 1 sibling, 1 reply; 10+ messages in thread From: Stefan Monnier @ 2005-06-22 11:48 UTC (permalink / raw) Cc: Andre Spiegel, emacs-devel > I'm not going to fight over vc-cvs settings (no, really :-) but if we were > creating VC from scratch, I would push for a `vc-cvs-use-cvsrc-settings', > defaulting to nil. The equivalent functionality as of today is > vc-cvs-global-settings '("-f"). I'm curious why you think so. What kind of settings do you put in ~/.cvsrc? The nature of the ~/.cvsrc file is to contain settings which should basically always apply. I can't believe you'd spend so much time on this thread only for the -c/-u thingy with `cvs diff'. BTW, I consider it a bug in CVS that it complains when ~/.cvsrc says -u but the command line says -c (or vice-versa): the command line arg should take precedence. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: vc-cvs-global-switches and -f 2005-06-22 11:48 ` Stefan Monnier @ 2005-06-22 13:03 ` Juanma Barranquero 0 siblings, 0 replies; 10+ messages in thread From: Juanma Barranquero @ 2005-06-22 13:03 UTC (permalink / raw) Cc: Andre Spiegel, emacs-devel > I'm curious why you think so. What kind of settings do you put in ~/.cvsrc? > The nature of the ~/.cvsrc file is to contain settings which should > basically always apply. Nothing special: cvs -z9 diff -u2 tag -c edit -c update -dP release -d status -v "release -d", for example, is something I don't want a program to do for me, only when I explicitly type "cvs remove xxxx" on the command line. As I said earlier in the thread, this does not cause a problem for me; I have my customizations on .emacs and .cvsrc, and I knew enough to do M-x set-variable vc-cvs-global-options '("-f"). It just strikes me as a bad default. > BTW, I consider it a bug in CVS that it complains > when ~/.cvsrc says -u but the command line says -c (or vice-versa): the > command line arg should take precedence. Yes, I agree with that. But even if it didn't complain, I would still think the same (but I wouldn't have realized VC was using .cvsrc :-) -- /L/e/k/t/u ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2005-06-22 13:03 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-06-21 1:28 vc-cvs-global-switches and -f Juanma Barranquero 2005-06-21 20:49 ` Stefan Monnier 2005-06-21 22:24 ` Juanma Barranquero 2005-06-22 3:31 ` Stefan Monnier 2005-06-22 3:51 ` Juanma Barranquero 2005-06-22 10:08 ` Andre Spiegel 2005-06-22 10:41 ` Juanma Barranquero 2005-06-22 11:48 ` Andre Spiegel 2005-06-22 11:48 ` Stefan Monnier 2005-06-22 13:03 ` Juanma Barranquero
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.