Bug 970924 - rpm-goto-add-change-log-entry is not working as expected
Summary: rpm-goto-add-change-log-entry is not working as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs
Version: 18
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Petr Hracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-05 08:48 UTC by Jan Synacek
Modified: 2013-08-02 03:27 UTC (History)
3 users (show)

Fixed In Version: emacs-24.2-20.fc18
Clone Of:
Environment:
Last Closed: 2013-08-02 03:27:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch (440 bytes, patch)
2013-06-05 08:48 UTC, Jan Synacek
no flags Details | Diff

Description Jan Synacek 2013-06-05 08:48:52 UTC
Created attachment 757078 [details]
Patch

Description of problem:
Supposed I have a %changelog part of my spec file that's looking like this:

%changelog
* Wed Jun  5 2013 Jan Synáček <jsynacek> - 1:24.3-9
- change 1
- change 2

Executing rpm-goto-add-change-log-entry results in the next entry being positioned between those two entries (always after the first one).


Version-Release number of selected component (if applicable):
emacs-24.2-18.fc18.x86_64


How reproducible:
Always.


Actual results:
Next entry is always inserted after the first one.

Expected results:
Next entry is always inserted as the last one.

Comment 1 Petr Hracek 2013-06-11 07:32:34 UTC
Hi Jan,

thanks for the bug,

I have improve them so that it looks now:
diff --git a/site-lisp/rpm-spec-mode.el b/site-lisp/rpm-spec-mode.el
index 63c37fa..88a7247 100644
--- a/site-lisp/rpm-spec-mode.el
+++ b/site-lisp/rpm-spec-mode.el
@@ -739,12 +739,16 @@ If `rpm-change-log-uses-utc' is nil, \"today\" means the local time zone."
   (interactive "sChange log entry: ")
   (save-excursion
     (rpm-goto-add-change-log-header)
+      (while (looking-at "^-")
+             (forward line))
       (insert "- " change-log-entry "\n")))
 
 (defun rpm-goto-add-change-log-entry ()
   "Goto change log and add an header for today (if needed)."
   (interactive)
   (rpm-goto-add-change-log-header)
+  (while (looking-at "^-")
+         (forward line))
   (insert "- \n")
   (end-of-line '0))

Comment 2 Jan Synacek 2013-06-11 07:37:54 UTC
Thanks. I guess the whitespaces chars got eaten somehow.

Comment 3 Petr Hracek 2013-06-11 08:54:17 UTC
This bug has been fixed in f18.
scm-commit (https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20130610/1037403.html) -> MODIFIED

Comment 4 Fedora Update System 2013-06-11 11:47:47 UTC
emacs-24.2-19.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/emacs-24.2-19.fc18

Comment 5 Fedora Update System 2013-06-12 02:38:57 UTC
Package emacs-24.2-19.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing emacs-24.2-19.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-10635/emacs-24.2-19.fc18
then log in and leave karma (feedback).

Comment 6 Fedora Update System 2013-06-27 02:00:24 UTC
emacs-24.2-19.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 7 Michael Schwendt 2013-07-14 21:30:40 UTC
I've repaired the patch to call "forward-line" instead of "forward line".
http://koji.fedoraproject.org/koji/taskinfo?taskID=5606967

Update for F18 coming shortly...

Comment 8 Fedora Update System 2013-07-14 21:57:42 UTC
emacs-24.2-20.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/emacs-24.2-20.fc18

Comment 9 Fedora Update System 2013-07-16 01:40:50 UTC
Package emacs-24.2-20.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing emacs-24.2-20.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-13024/emacs-24.2-20.fc18
then log in and leave karma (feedback).

Comment 10 Fedora Update System 2013-08-02 03:27:02 UTC
emacs-24.2-20.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.