all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* PCL-CVS: `A' removes cvs-mode from buffer *cvs*
@ 2007-08-20 19:28 Reiner Steib
  2007-08-21 15:32 ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2007-08-20 19:28 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

Hi,

in Emacs 22.1 on Windows, I noticed that (sometimes?) `A'
(cvs-mode-add-change-log-entry-other-window) removes the cvs-mode key
bindings from the buffer *cvs*.  The buffer *cvs* then is read-only
and not in cvs-mode anymore (fundamental-mode?).

I couldn't reproduce the problem on GNU/Linux up to now.  Has anyone
else observed this?  If it happens next time on Windows: what kind of
further information could be useful to find the problem?

Sorry for the imprecise report.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-20 19:28 PCL-CVS: `A' removes cvs-mode from buffer *cvs* Reiner Steib
@ 2007-08-21 15:32 ` Stefan Monnier
  2007-08-25 12:13   ` Reiner Steib
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2007-08-21 15:32 UTC (permalink / raw)
  To: emacs-devel

> in Emacs 22.1 on Windows, I noticed that (sometimes?) `A'
> (cvs-mode-add-change-log-entry-other-window) removes the cvs-mode key
> bindings from the buffer *cvs*.  The buffer *cvs* then is read-only
> and not in cvs-mode anymore (fundamental-mode?).

> I couldn't reproduce the problem on GNU/Linux up to now.  Has anyone
> else observed this?  If it happens next time on Windows: what kind of
> further information could be useful to find the problem?

I've seen reports of such problems in the past, but have never been able
to track it down.  It seems difficult to reproduce.  It's interesting that
you link it to Windows, tho: I had not noted any such correlation yet.

Maybe you can try to track it down by adding to your .emacs something like:

   (add-hook 'cvs-mode-hook
             (lambda ()
               (add-hook 'change-major-mode-hook 'debug nil t)))

hopefully it will not trigger in normal use.


        Stefan

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-21 15:32 ` Stefan Monnier
@ 2007-08-25 12:13   ` Reiner Steib
  2007-08-25 19:36     ` Stefan Monnier
  0 siblings, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2007-08-25 12:13 UTC (permalink / raw)
  To: emacs-devel; +Cc: Stefan Monnier

On Tue, Aug 21 2007, Stefan Monnier wrote:

>> in Emacs 22.1 on Windows, I noticed that (sometimes?) `A'
>> (cvs-mode-add-change-log-entry-other-window) removes the cvs-mode key
>> bindings from the buffer *cvs*.  The buffer *cvs* then is read-only
>> and not in cvs-mode anymore (fundamental-mode?).
>
>> I couldn't reproduce the problem on GNU/Linux up to now.  Has anyone
>> else observed this?  If it happens next time on Windows: what kind of
>> further information could be useful to find the problem?
>
> I've seen reports of such problems in the past, but have never been able
> to track it down.  It seems difficult to reproduce.  It's interesting that
> you link it to Windows, tho: I had not noted any such correlation yet.

Now, for the first time, I saw it on GNU/Linux as well.  Maybe because
I didn't use `A' very often before.

The buffer (*cvs*[emacs/lisp]<2>) is in change-log-mode.  

Here are the related (?) messages:

| Wrote [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog
| (No files need saving)
| Running cvs update ...
| add-change-log-entry-other-window: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
| Saving file [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog...
| Wrote [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog
| error in process sentinel: cvs-sentinel: Symbol's value as variable is void: cvs-cookies
| error in process sentinel: Symbol's value as variable is void: cvs-cookies
| Mark set [3 times]
| insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
| Mark set
| insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
| Mark set
| insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
| ((lambda nil (add-hook (quote change-major-mode-hook) (quote debug) nil t)) (lambda nil (rename-buffer (generate-new-buffer-name ...)) (local-set-key (kbd "RET") (lambda ... ... ...)) (local-set-key (kbd "~") (lambda ... ... ...)) (local-set-key (kbd "*") (lambda nil ... ...))))

The last one was after evaluating your suggestion (see below).  The
other hooks are not relevant to the problem, because I don't use them
on the Windows machine.

Is there anything else I can investigate now?

> Maybe you can try to track it down by adding to your .emacs something like:
>
>    (add-hook 'cvs-mode-hook
>              (lambda ()
>                (add-hook 'change-major-mode-hook 'debug nil t)))
>
> hopefully it will not trigger in normal use.

I added it, but only on Windows, so it didn't catch.  Sorry.  (Now
added on GNU/Linux as well.)

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-25 12:13   ` Reiner Steib
@ 2007-08-25 19:36     ` Stefan Monnier
  2007-08-25 19:51       ` David Kastrup
  2007-08-25 21:12       ` Reiner Steib
  0 siblings, 2 replies; 11+ messages in thread
From: Stefan Monnier @ 2007-08-25 19:36 UTC (permalink / raw)
  To: emacs-devel

> Now, for the first time, I saw it on GNU/Linux as well.

OK.  So at least we know it's not specific to Windows.

> | Wrote [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog
> | (No files need saving)
> | Running cvs update ...
> | add-change-log-entry-other-window: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
> | Saving file [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog...
> | Wrote [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog
> | error in process sentinel: cvs-sentinel: Symbol's value as variable is void: cvs-cookies
> | error in process sentinel: Symbol's value as variable is void: cvs-cookies
> | Mark set [3 times]
> | insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
> | Mark set
> | insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
> | Mark set
> | insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
> | ((lambda nil (add-hook (quote change-major-mode-hook) (quote debug) nil t)) (lambda nil (rename-buffer (generate-new-buffer-name ...)) (local-set-key (kbd "RET") (lambda ... ... ...)) (local-set-key (kbd "~") (lambda ... ... ...)) (local-set-key (kbd "*") (lambda nil ... ...))))

> The last one was after evaluating your suggestion (see below).  The
> other hooks are not relevant to the problem, because I don't use them
> on the Windows machine.

Could you tell me what you've done during the above time, in which order.
Ideally correlate the above messages with the actions you've taken?
It looks like you've first run cvs(-mode)?-update, then hit A while the
update was running, then what?  When did the above messages show up?

Did you then manually switch to the ChangeLog buffer edit it and save it
(causing the message about saving/writing emacs/lisp/ChangeLog?).  If so
there probably isn't enough info to do much useful.  All it then says is
that cvs-cookie is not bound, because the major-mode change removed the
buffer-local setting.

> Is there anything else I can investigate now?

I'm afraid not.

> I added it, but only on Windows, so it didn't catch.  Sorry.  (Now
> added on GNU/Linux as well.)

Let's hope it catches it next time,


        Stefan

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-25 19:36     ` Stefan Monnier
@ 2007-08-25 19:51       ` David Kastrup
  2007-08-25 21:12       ` Reiner Steib
  1 sibling, 0 replies; 11+ messages in thread
From: David Kastrup @ 2007-08-25 19:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> Now, for the first time, I saw it on GNU/Linux as well.
>
> OK.  So at least we know it's not specific to Windows.
>
> Could you tell me what you've done during the above time, in which
> order.  Ideally correlate the above messages with the actions you've
> taken?  It looks like you've first run cvs(-mode)?-update, then hit
> A while the update was running, then what?  When did the above
> messages show up?

That reminds me: I seem to remember that vc reacted rather flippantly
to deletion of *vc-commit*: it then picked any existing buffer
starting with *vc in its name for the commit message.

And some of those buffers were not really reacting favorably to that.

-- 
David Kastrup, Kriemhildstr. 15, 44793 Bochum

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-25 19:36     ` Stefan Monnier
  2007-08-25 19:51       ` David Kastrup
@ 2007-08-25 21:12       ` Reiner Steib
  2007-08-29 19:10         ` Reiner Steib
  1 sibling, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2007-08-25 21:12 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Sat, Aug 25 2007, Stefan Monnier wrote:

>> Now, for the first time, I saw it on GNU/Linux as well.
>
> OK.  So at least we know it's not specific to Windows.

Yes.

>> | Wrote [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog
>> | (No files need saving)
>> | Running cvs update ...
>> | add-change-log-entry-other-window: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
>> | Saving file [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog...
>> | Wrote [...]/cvs-EMACS_22_BASE/emacs/lisp/ChangeLog
>> | error in process sentinel: cvs-sentinel: Symbol's value as variable is void: cvs-cookies
>> | error in process sentinel: Symbol's value as variable is void: cvs-cookies
>> | Mark set [3 times]
>> | insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
>> | Mark set
>> | insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
>> | Mark set
>> | insert-for-yank: Buffer is read-only: #<buffer *cvs*[emacs/lisp]<2>>
[...]
> Could you tell me what you've done during the above time, in which order.
> Ideally correlate the above messages with the actions you've taken?

I'm afraid I don't remember everything.  I should have looked at
`view-lossage', but I forgot.

> It looks like you've first run cvs(-mode)?-update, then hit A while the
> update was running, then what?  When did the above messages show up?

>From my memory, maybe not quite correct: I wanted to commit my patch
to `pcvs.el'.

> Did you then manually switch to the ChangeLog buffer

Not sure, either I did `M-x add-change-log-entry-other-window RET' (in
`pcvs.el' or the diff buffer) or `A' in the *cvs* buffer.

> edit it and save it (causing the message about saving/writing
> emacs/lisp/ChangeLog?).  

Then probably saved it and later realized that it wasn't up to date,
so I removed my modification, saved and ran cvs-update.  I think then
(as you say before it completed?) I tried `A', being curious if the
bug kicks in, expecting it doesn't.

> Let's hope it catches it next time,

I added it to my init files.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-25 21:12       ` Reiner Steib
@ 2007-08-29 19:10         ` Reiner Steib
  2007-08-30 17:09           ` Reiner Steib
  2007-09-08  3:12           ` Stefan Monnier
  0 siblings, 2 replies; 11+ messages in thread
From: Reiner Steib @ 2007-08-29 19:10 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Sat, Aug 25 2007, Reiner Steib wrote:

[ (add-hook 'cvs-mode-hook
            (lambda ()
              (add-hook 'change-major-mode-hook 'debug nil t))) ]
> I added it to my init files.

... and today it triggered (on Windows; Emacs 22.1).  Here's the
backtrace (byte code stripped, lines wrapped):

--8<---------------cut here---------------start------------->8---
Debugger entered: nil
  run-hooks(change-major-mode-hook)
  kill-all-local-variables()
  text-mode()
  change-log-mode()
  add-change-log-entry(nil nil t)
  add-change-log-entry-other-window()
  #[nil "[BYTE-CODE DELETED]" [fi --cl-dolist-temp--
    cl-struct-cvs-fileinfo-tags d default-directory buffer-file-name
    cvs-mode-marked nil 0 error "cvs-fileinfo->dir accessing a
    non-cvs-fileinfo" 4 file-name-as-directory expand-file-name
    "cvs-fileinfo->file accessing a non-cvs-fileinfo" 5
    kill-local-variable change-log-default-name
    add-change-log-entry-other-window] 4]()
  #[nil "[BYTE-CODE DELETED]" [-cvs-mode!-fun commandp
    call-interactively] 2]()
  cvs-mode!(#[nil "[BYTE-CODE DELETED]" [fi --cl-dolist-temp--
    cl-struct-cvs-fileinfo-tags d default-directory buffer-file-name
    cvs-mode-marked nil 0 error "cvs-fileinfo->dir accessing a
    non-cvs-fileinfo" 4 file-name-as-directory expand-file-name
    "cvs-fileinfo->file accessing a non-cvs-fileinfo" 5
    kill-local-variable change-log-default-name
    add-change-log-entry-other-window] 4])
  cvs-mode-add-change-log-entry-other-window()
  call-interactively(cvs-mode-add-change-log-entry-other-window)
--8<---------------cut here---------------end--------------->8---

*Messages* didn't show anything interesting:

--8<---------------cut here---------------start------------->8---
Running cvs update ...
CVS process has completed in *cvs*
Loading debug...done
Entering debugger...
--8<---------------cut here---------------end--------------->8---

The *cvs* buffer looked as follows.  On the line "m.sh", I hit `A':

--8<---------------cut here---------------start------------->8---
Repository : d:/Repository
Module     : foo/tools
Working dir: d:/work/foo/tools/

In directory .:
committed   * Up-To-Date  1.81        ChangeLog
              Modified                c.sh
            * Modified                m.sh
              Unknown                 u.sh.TEST

--------------------- End ---------------------
-- last cmd: cvs -f update -d -P --
--8<---------------cut here---------------end--------------->8---

Additionally, I noticed that the content of the ChangeLog file had
been erased (!!!) and content belonging to the *cvs* buffer has been
put in the ChangeLog buffer:

--8<---------------cut here---------------start------------->8---
2007-08-29  Reiner Steib  <reiner.steib@...>

	* m.sh (Module, Usage): 

Repository : d:/Repository
Module     : foo/tools
Working dir: d:/work/foo/tools/

In directory .:
            * Modified                ChangeLog
              Modified                c.sh
            * Modified                m.sh
              Unknown                 u.sh.TEST

--------------------- End ---------------------
-- last cmd: cvs -f update -d -P --

--8<---------------cut here---------------end--------------->8---

I have ChangeLog under VC so it was no big deal to restore it (and
probably) undo would have worked as well, but erasing data in such a
situation is a serious problem.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-29 19:10         ` Reiner Steib
@ 2007-08-30 17:09           ` Reiner Steib
  2007-09-08  2:55             ` Stefan Monnier
  2007-09-08  3:12           ` Stefan Monnier
  1 sibling, 1 reply; 11+ messages in thread
From: Reiner Steib @ 2007-08-30 17:09 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-devel

On Wed, Aug 29 2007, Reiner Steib wrote:

> ... and today it triggered (on Windows; Emacs 22.1).  Here's the
> backtrace (byte code stripped, lines wrapped): [...]

Again, today.  Different CVS module, same repository (names changed).

--8<---------------cut here---------------start------------->8---
Repository : d:/foo/bar/Repository
Module     : baz/Dokumentation
Working dir: d:/foo/bar/VersionControl/baz/Dokumentation/

In directory .:
              Unknown                 Anforderungen.txt
              Unknown                 Manual.txt
            * Modified                Namenskonventionen.txt
              Unknown                 Notizen.txt

--------------------- Empty ---------------------
-- last cmd: cvs -f update -d -P --
--8<---------------cut here---------------end--------------->8---

==> Everything okay upto here.

The I made some changes in ChangeLog and save it.  Then I selected
ChangeLog in *cvs* too, and then hit `A' on `Namenskonventionen.txt'.

==> The debug hook triggered.

Output of `<f1> l':

--8<---------------cut here---------------start------------->8---
<down-mouse-1> <mouse-movement> <mouse-1> <up> <up>
<up> <up> <up> A <left> <left> <left> <C-left> <left>
<left> C-M-k C-x C-s <switch-frame> <down-mouse-1>
<mouse-movement> <mouse-1> <up> <up> <up> <up> <up>
A C-a C-k C-k <up> <end> A d d SPC <help-echo> <switch-frame>
<down-mouse-1> <mouse-movement> <mouse-movement> <drag-mouse-1>
<help-echo> <switch-frame> <down-mouse-1> <mouse-1>
<down-mouse-2> <mouse-2> <down-mouse-1> <mouse-movement>
<mouse-1> , SPC C-k <delete> <delete> <delete> <delete>
<delete> <delete> <C-right> <right> a n d C-k <delete>
<delete> <delete> <delete> <delete> <end> . C-x C-s
<switch-frame> <down-mouse-1> <mouse-movement> <mouse-1>
<down-mouse-2> <mouse-2> <down-mouse-1> <mouse-1> A
<switch-frame> <switch-frame> <switch-frame> <help-echo>
<help-echo> <help-echo> C-x 5 b s c r <return> <f1>
l
--8<---------------cut here---------------end--------------->8---

*cvs* buffer:

--8<---------------cut here---------------start------------->8---
Repository : d:/foo/bar/Repository
Module     : baz/Dokumentation
Working dir: d:/foo/bar/VersionControl/baz/Dokumentation/

In directory .:
              Unknown                 Anforderungen.txt
            * Modified                ChangeLog
              Unknown                 Manual.txt
            * Modified                Namenskonventionen.txt
              Unknown                 Notizen.txt

--------------------- Empty ---------------------
-- last cmd: cvs -f update -d -P --
--8<---------------cut here---------------end--------------->8---

Debugger output:

--8<---------------cut here---------------start------------->8---
Debugger entered: nil
  run-hooks(change-major-mode-hook)
  kill-all-local-variables()
  text-mode()
  change-log-mode()
  add-change-log-entry(nil nil t)
  add-change-log-entry-other-window()
  #[nil "[BYTE-CODE-DELETED]" [fi --cl-dolist-temp-- cl-struct-cvs-fileinfo-tags
    d default-directory buffer-file-name cvs-mode-marked nil 0 error
    "cvs-fileinfo->dir accessing a non-cvs-fileinfo" 4
    file-name-as-directory expand-file-name "cvs-fileinfo->file
    accessing a non-cvs-fileinfo" 5 kill-local-variable
    change-log-default-name add-change-log-entry-other-window] 4]()
  #[nil "[BYTE-CODE-DELETED]" [-cvs-mode!-fun commandp call-interactively] 2]()
  cvs-mode!(#[nil "" [fi --cl-dolist-temp--
    cl-struct-cvs-fileinfo-tags d default-directory buffer-file-name
    cvs-mode-marked nil 0 error "cvs-fileinfo->dir accessing a
    non-cvs-fileinfo" 4 file-name-as-directory expand-file-name
    "cvs-fileinfo->file accessing a non-cvs-fileinfo" 5
    kill-local-variable change-log-default-name
    add-change-log-entry-other-window] 4])
  cvs-mode-add-change-log-entry-other-window()
  call-interactively(cvs-mode-add-change-log-entry-other-window)
--8<---------------cut here---------------end--------------->8---

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-30 17:09           ` Reiner Steib
@ 2007-09-08  2:55             ` Stefan Monnier
  2007-09-23 20:09               ` Reiner Steib
  0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2007-09-08  2:55 UTC (permalink / raw)
  To: Reiner Steib; +Cc: emacs-devel

> The I made some changes in ChangeLog and save it.  Then I selected
> ChangeLog in *cvs* too, and then hit `A' on `Namenskonventionen.txt'.

Oh, I got it: the trick is to hit `A' when you're on the ChangeLog
file itself.  It's obvious now, but it kept me strumped for a looong time.
Thanks for helping me catch this guy.

I don't have a good fix for it yet, but that'll come soon,


        Stefan

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-08-29 19:10         ` Reiner Steib
  2007-08-30 17:09           ` Reiner Steib
@ 2007-09-08  3:12           ` Stefan Monnier
  1 sibling, 0 replies; 11+ messages in thread
From: Stefan Monnier @ 2007-09-08  3:12 UTC (permalink / raw)
  To: Reiner Steib; +Cc: emacs-devel

> [ (add-hook 'cvs-mode-hook
>             (lambda ()
>               (add-hook 'change-major-mode-hook 'debug nil t))) ]
>> I added it to my init files.

> ... and today it triggered (on Windows; Emacs 22.1).  Here's the
> backtrace (byte code stripped, lines wrapped):

I've installed the patch below in the 22 branch.
Thanks again,


        Stefan


Index: lisp/pcvs.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/pcvs.el,v
retrieving revision 1.98.2.9
diff -u -r1.98.2.9 pcvs.el
--- lisp/pcvs.el	25 Aug 2007 12:18:42 -0000	1.98.2.9
+++ lisp/pcvs.el	8 Sep 2007 03:09:31 -0000
@@ -2210,13 +2210,21 @@
 (defun-cvs-mode cvs-mode-add-change-log-entry-other-window ()
   "Add a ChangeLog entry in the ChangeLog of the current directory."
   (interactive)
+  ;; Require `add-log' explicitly, because if it gets autoloaded when we call
+  ;; add-change-log-entry-other-window below, the
+  ;; add-log-buffer-file-name-function ends up unbound when we leave the `let'.
+  (require 'add-log)
   (dolist (fi (cvs-mode-marked nil nil))
     (let* ((default-directory (cvs-expand-dir-name (cvs-fileinfo->dir fi)))
-	   (buffer-file-name (expand-file-name (cvs-fileinfo->file fi))))
-      (if (file-directory-p buffer-file-name)
-          ;; Be careful to use a directory name, otherwise add-log starts
-          ;; looking for a ChangeLog file in the parent dir.
-          (setq buffer-file-name (file-name-as-directory buffer-file-name)))
+	   (add-log-buffer-file-name-function
+            (lambda ()
+              (let ((file (expand-file-name (cvs-fileinfo->file fi))))
+                (if (file-directory-p file)
+                    ;; Be careful to use a directory name, otherwise add-log
+                    ;; starts looking for a ChangeLog file in the
+                    ;; parent dir.
+                    (file-name-as-directory file)
+                  file)))))
       (kill-local-variable 'change-log-default-name)
       (save-excursion (add-change-log-entry-other-window)))))

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

* Re: PCL-CVS: `A' removes cvs-mode from buffer *cvs*
  2007-09-08  2:55             ` Stefan Monnier
@ 2007-09-23 20:09               ` Reiner Steib
  0 siblings, 0 replies; 11+ messages in thread
From: Reiner Steib @ 2007-09-23 20:09 UTC (permalink / raw)
  To: emacs-devel

On Sat, Sep 08 2007, Stefan Monnier wrote:

>> The I made some changes in ChangeLog and save it.  Then I selected
>> ChangeLog in *cvs* too, and then hit `A' on `Namenskonventionen.txt'.
>
> Oh, I got it: the trick is to hit `A' when you're on the ChangeLog
> file itself.  It's obvious now, but it kept me strumped for a looong time.
> Thanks for helping me catch this guy.
[...]

On Sat, Sep 08 2007, Stefan Monnier wrote:

> I've installed the patch below in the 22 branch.

Thanks.

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/

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

end of thread, other threads:[~2007-09-23 20:09 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-20 19:28 PCL-CVS: `A' removes cvs-mode from buffer *cvs* Reiner Steib
2007-08-21 15:32 ` Stefan Monnier
2007-08-25 12:13   ` Reiner Steib
2007-08-25 19:36     ` Stefan Monnier
2007-08-25 19:51       ` David Kastrup
2007-08-25 21:12       ` Reiner Steib
2007-08-29 19:10         ` Reiner Steib
2007-08-30 17:09           ` Reiner Steib
2007-09-08  2:55             ` Stefan Monnier
2007-09-23 20:09               ` Reiner Steib
2007-09-08  3:12           ` Stefan Monnier

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.