unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files
@ 2018-09-04 10:34 Uwe Brauer
  2018-09-04 17:11 ` Karl Fogel
  2018-09-04 17:20 ` Karl Fogel
  0 siblings, 2 replies; 6+ messages in thread
From: Uwe Brauer @ 2018-09-04 10:34 UTC (permalink / raw)
  To: emacs-devel


Hi 

My problem is, if I am in a subdirectory of my mercurial (or git)
repository and run add-change-log-entry, does not open the ChangeLog
file in the «root» directory but tries to open the none existing
ChangeLog file in the current subdirectory, which I don't want.

Any ideas how to deal with this situation?


I tried to set 

,----
[+]
| change-log-directory-files is a variable defined in ‘add-log.el’.
| Its value is (".bzr" ".git" "../.hg" ".hg" ".svn")
| Original value was 
| (".bzr" ".git" ".hg" ".svn")
`----

Did not help. Is this feature not implemented? By this I mean: suppose
in a directory under VC, there is only one ChangeLog file in the root
directory, then if I call add-change-log-entry there is no way to tell
emacs that he only looks for that file?

Thanks 

Uwe Brauer 







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

* Re: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files
  2018-09-04 10:34 feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files Uwe Brauer
@ 2018-09-04 17:11 ` Karl Fogel
  2018-09-04 17:20 ` Karl Fogel
  1 sibling, 0 replies; 6+ messages in thread
From: Karl Fogel @ 2018-09-04 17:11 UTC (permalink / raw)
  To: emacs-devel

Uwe Brauer <oub@mat.ucm.es> writes:
>My problem is, if I am in a subdirectory of my mercurial (or git)
>repository and run add-change-log-entry, does not open the ChangeLog
>file in the «root» directory but tries to open the none existing
>ChangeLog file in the current subdirectory, which I don't want.
>
>Any ideas how to deal with this situation?
>
>
>I tried to set 
>
>,----
>[+]
>| change-log-directory-files is a variable defined in ‘add-log.el’.
>| Its value is (".bzr" ".git" "../.hg" ".hg" ".svn")
>| Original value was 
>| (".bzr" ".git" ".hg" ".svn")
>`----
>
>Did not help. Is this feature not implemented? By this I mean: suppose
>in a directory under VC, there is only one ChangeLog file in the root
>directory, then if I call add-change-log-entry there is no way to tell
>emacs that he only looks for that file?

A simple proposal:

Have `add-change-log-entry' walk up the tree, starting from the current directory, and use the first ChangeLog file found.  Most of the time, it'll be in the root of the version-controlled tree, but for projects (like Emacs) that have separate ChangeLogs in some subdirectories, the proper ChangeLog would still be found.

When a project wants to start using a ChangeLog in a subdirectory, someone just needs to manually initialize the ChangeLog there (creating it as an empty file would be enough), and afterwards `add-change-log-entry' will do the right thing.

Thoughts?

Best regards,
-Karl



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

* Re: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files
  2018-09-04 10:34 feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files Uwe Brauer
  2018-09-04 17:11 ` Karl Fogel
@ 2018-09-04 17:20 ` Karl Fogel
  2018-09-05  8:01   ` Uwe Brauer
                     ` (2 more replies)
  1 sibling, 3 replies; 6+ messages in thread
From: Karl Fogel @ 2018-09-04 17:20 UTC (permalink / raw)
  To: emacs-devel

Uwe Brauer <oub@mat.ucm.es> writes:
>My problem is, if I am in a subdirectory of my mercurial (or git)
>repository and run add-change-log-entry, does not open the ChangeLog
>file in the «root» directory but tries to open the none existing
>ChangeLog file in the current subdirectory, which I don't want.
>
>Any ideas how to deal with this situation?
>
>
>I tried to set 
>
>,----
>[+]
>| change-log-directory-files is a variable defined in ‘add-log.el’.
>| Its value is (".bzr" ".git" "../.hg" ".hg" ".svn")
>| Original value was 
>| (".bzr" ".git" ".hg" ".svn")
>`----
>
>Did not help. Is this feature not implemented? By this I mean: suppose
>in a directory under VC, there is only one ChangeLog file in the root
>directory, then if I call add-change-log-entry there is no way to tell
>emacs that he only looks for that file?

A moment ago, I followed up with a proposal to walk up the tree -- which turns out to be what the current behavior is supposed to be anyway, and is what you expected -- because I didn't realize that that behavior was already implemented.

Then I read the doc string for `find-change-log' and the behavior described there seems to be exactly what you wanted and expected.

So I *think* the behavior you want is the behavior Emacs is already supposed to have.  Have you simply discovered a bug, or is there something subtle about your situation that is not covered by the current intended behavior of `find-change-log'?

Best regards,
-Karl



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

* Re: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files
  2018-09-04 17:20 ` Karl Fogel
@ 2018-09-05  8:01   ` Uwe Brauer
  2018-09-05 11:07   ` Uwe Brauer
  2018-09-05 13:32   ` [SOLVED] (was: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files) Uwe Brauer
  2 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2018-09-05  8:01 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]


   > Uwe Brauer <oub@mat.ucm.es> writes:

   > A moment ago, I followed up with a proposal to walk up the tree --
   > which turns out to be what the current behavior is supposed to be
   > anyway, and is what you expected -- because I didn't realize that that
   > behavior was already implemented.



   > Then I read the doc string for `find-change-log' and the behavior
   > described there seems to be exactly what you wanted and expected.

This is my understanding too, reading the documentation. However in my case
emacs *does* not walk up the tree, it offers me to open a (non existing)
ChangeLog file in the current directory, which I found annoying.

   > So I *think* the behavior you want is the behavior Emacs is already
   > supposed to have. Have you simply discovered a bug, or is there
   > something subtle about your situation that is not covered by the
   > current intended behavior of `find-change-log'?

I think I have to debug it, starting with emacs -q.

Thanks

Uwe 


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

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

* Re: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files
  2018-09-04 17:20 ` Karl Fogel
  2018-09-05  8:01   ` Uwe Brauer
@ 2018-09-05 11:07   ` Uwe Brauer
  2018-09-05 13:32   ` [SOLVED] (was: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files) Uwe Brauer
  2 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2018-09-05 11:07 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]


   > Uwe Brauer <oub@mat.ucm.es> writes:

   > A moment ago, I followed up with a proposal to walk up the tree --
   > which turns out to be what the current behavior is supposed to be
   > anyway, and is what you expected -- because I didn't realize that that
   > behavior was already implemented.

   > Then I read the doc string for `find-change-log' and the behavior
   > described there seems to be exactly what you wanted and expected.

   > So I *think* the behavior you want is the behavior Emacs is already
   > supposed to have. Have you simply discovered a bug, or is there
   > something subtle about your situation that is not covered by the
   > current intended behavior of `find-change-log'?

So when I start emacs -q, everything works as expected. 
So the culprit must be in my init file somewhere. 

However, I started (with my init file enabled) to debug the function
add-change-log-entry, which reads like


(defun add-change-log-entry (&optional whoami file-name other-window new-entry
				       put-new-entry-on-new-line)
  "....."
  (interactive (list current-prefix-arg
		     (prompt-for-change-log-name)))

So the debugger jumps to current-prefix-arg which is nil, and then
execute prompt-for-change-log-name, which he shouldn't.

I am really puzzled by this.



[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

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

* [SOLVED] (was: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files)
  2018-09-04 17:20 ` Karl Fogel
  2018-09-05  8:01   ` Uwe Brauer
  2018-09-05 11:07   ` Uwe Brauer
@ 2018-09-05 13:32   ` Uwe Brauer
  2 siblings, 0 replies; 6+ messages in thread
From: Uwe Brauer @ 2018-09-05 13:32 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 827 bytes --]


   > Uwe Brauer <oub@mat.ucm.es> writes:

   > A moment ago, I followed up with a proposal to walk up the tree --
   > which turns out to be what the current behavior is supposed to be
   > anyway, and is what you expected -- because I didn't realize that that
   > behavior was already implemented.

   > Then I read the doc string for `find-change-log' and the behavior
   > described there seems to be exactly what you wanted and expected.

   > So I *think* the behavior you want is the behavior Emacs is already
   > supposed to have. Have you simply discovered a bug, or is there
   > something subtle about your situation that is not covered by the
   > current intended behavior of `find-change-log'?

Indeed I found an advice for add-change-log-entry, so I removed it and
everything is now fine, sorry for the noise.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5025 bytes --]

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

end of thread, other threads:[~2018-09-05 13:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-04 10:34 feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files Uwe Brauer
2018-09-04 17:11 ` Karl Fogel
2018-09-04 17:20 ` Karl Fogel
2018-09-05  8:01   ` Uwe Brauer
2018-09-05 11:07   ` Uwe Brauer
2018-09-05 13:32   ` [SOLVED] (was: feature proposal? add-change-log-entry does not find the ChangeLog file: change-log-directory-files) Uwe Brauer

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).