stigbjorlykke / rpm-spec-mode

RPM spec file editing commands for Emacs/XEmacs
GNU General Public License v2.0
11 stars 22 forks source link

Update RPM related stuff to 4.16.1.3 #19

Open Thaodan opened 1 year ago

Thaodan commented 1 year ago

(cherry picked from commit ​4fdad909b8d2d47b9d776d4fadecb38a6f6bc6be)

jn64 commented 1 year ago

Most of the functions changed here don't work for me on Emacs 28.2. Specifically, all of the functions that have no arguments after the removal of &optional arg, but still contain (interactive "p"), don't work when called interactively with M-x.

For example doing M-x rpm-insert-tag results in this error:

funcall-interactively: Wrong number of arguments: ((t) nil "Insert or change a tag." (interactive "p") (if current-prefix-arg (rpm-change) (rpm-insert))), 1

Should the (interactive "p") for those functions with no args be changed to (interactive)? It seems to fix the problem for me, but I don't fully understand the implication of the "p".


I also had to pick https://github.com/stigbjorlykke/rpm-spec-mode/pull/17/commits/e95001cf4e85d9d67a43a5c5f8f088fbf4492c15 to get the package working at all. So the problem can be repro'd with master + https://github.com/stigbjorlykke/rpm-spec-mode/pull/17/commits/e95001cf4e85d9d67a43a5c5f8f088fbf4492c15 + https://github.com/stigbjorlykke/rpm-spec-mode/pull/19/commits/93259f78d963db75c531e91c185bcb929914aa0b (this PR) on Emacs 28.2.

Same with the version at https://github.com/Thaodan/rpm-spec-mode/tree/thaodan/personal_merger, meaning the other collected patches don't affect this problem.

jn64 commented 1 year ago

I guess this is why @zzndb reverted most of these changes in https://github.com/zzndb/rpm-spec-mode/commit/9fd15364d6109aa091dcca9973f85383f7e457c3 (leaving only the changes actually related to RPM 4.16.1.3). Problem is solved by picking https://github.com/zzndb/rpm-spec-mode/commit/9fd15364d6109aa091dcca9973f85383f7e457c3 on top of previously mentioned.

You might want to pick that for https://github.com/Thaodan/rpm-spec-mode/tree/thaodan/personal_merger too.

Thaodan commented 1 year ago

Can amend the PR with the revert squashed in. To be honest I haven't tested Emacs 28.2

jn64 commented 1 year ago

Do you mean that the functions work for you when called interactively? And on what version of Emacs?

Anyway no hurry to update the PR. I will study more on interactive functions and try to fix it up properly. It looks like maybe rpm-insert-tags is the only function that needs (interactive "p") as it makes use of the prefix arg; the rest of the functions could have both args and "p" removed.

Thaodan commented 6 months ago

Do you mean that the functions work for you when called interactively? And on what version of Emacs?

Sorry for the late reply. I didn't test, the functions did not work fine, I just didn't test all of the changes. I reverted the changes that were causing the errors.