Bug 970924 - rpm-goto-add-change-log-entry is not working as expected
rpm-goto-add-change-log-entry is not working as expected
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: emacs (Show other bugs)
18
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Petr Hracek
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-05 04:48 EDT by Jan Synacek
Modified: 2013-08-01 23:27 EDT (History)
3 users (show)

See Also:
Fixed In Version: emacs-24.2-20.fc18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-08-01 23:27:02 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Jan Synacek 2013-06-05 04:48:52 EDT
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@redhat.com> - 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 03:32:34 EDT
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 03:37:54 EDT
Thanks. I guess the whitespaces chars got eaten somehow.
Comment 3 Petr Hracek 2013-06-11 04:54:17 EDT
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 07:47:47 EDT
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-11 22:38:57 EDT
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-26 22:00:24 EDT
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 17:30:40 EDT
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 17:57:42 EDT
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-15 21:40:50 EDT
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-01 23:27:02 EDT
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.