Add a function to automatically format a line like this: # Dev E. Loper <developer@gentoo.org> (2019-07-01)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/ebuild-mode.git/commit/?id=3ed1c08e5c6906b9817c309bb07f4f8d4f9f9f17 commit 3ed1c08e5c6906b9817c309bb07f4f8d4f9f9f17 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-01-10 19:07:48 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-01-10 19:07:48 +0000 Add function for inserting package.mask tag lines * ebuild-mode.el (ebuild-mode-insert-tag-line): New function, inserts a tag line with user's name and date stamp, for use in package.mask and similar configuration files. Bug 830796. (ebuild-mode-full-name, ebuild-mode-mail-address): New custom variables. (ebuild-repo-mode): Add :keymap argument. (ebuild-repo-mode-map): New keymap. (ebuild-repo-mode-menu): New menu. Bug: https://bugs.gentoo.org/830796 Signed-off-by: Ulrich Müller <ulm@gentoo.org> ChangeLog | 11 +++++++++++ ebuild-mode.el | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+)
I have committed a first version to git. @juippis: You can test with ebuild-mode-9999 from the emacs overlay.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/ebuild-mode.git/commit/?id=eb589ff7283522fd71eff3566c4f745b5911bc6c commit eb589ff7283522fd71eff3566c4f745b5911bc6c Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-01-10 19:07:48 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-01-10 19:13:49 +0000 Add function for inserting package.mask tag lines * ebuild-mode.el (ebuild-mode-insert-tag-line): New function, inserts a tag line with user's name and date stamp, for use in package.mask and similar configuration files. Bug 830796. (ebuild-mode-full-name, ebuild-mode-mail-address): New custom variables. (ebuild-repo-mode): Add :keymap argument. (ebuild-repo-mode-map): New keymap. (ebuild-repo-mode-menu): New menu. Bug: https://bugs.gentoo.org/830796 Signed-off-by: Ulrich Müller <ulm@gentoo.org> ChangeLog | 9 +++++++++ ebuild-mode.el | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+)
(setq ebuild-mode-full-name "Joonas Niilola") (setq ebuild-mode-mail-address "juippis@gentoo.org") results in: # Joonas Niilola <juippis@gentoo.org> (2022-01-11) Works like a charm! Maybe I'll get used to C-c-, it looked bad but feels okay. (And ofc I can just rebind it if-needed). stable emacs.
(In reply to Joonas Niilola from comment #4) > Works like a charm! Good. :) > Maybe I'll get used to C-c-, it looked bad but feels okay. I am open for suggestions. It should be C-c followed by a punctuation character, and AFAICS we can use any except the following: {}<>:;"'
(In reply to Ulrich Müller from comment #5) > > I am open for suggestions. It should be C-c followed by a punctuation > character, and AFAICS we can use any except the following: {}<>:;"' I don't really understand "why", must be some emacs principle as you hinted. From those you listed I don't think any is better than "-". Personally, I was thinking about C-c h, and I can still bind it there if I wish. However, I was quite happy with C-c- after all since it's easy and fast to type. Definitely easier than any of {}<>:;". For reference: C-c h is undefined
(In reply to Joonas Niilola from comment #6) > Definitely easier than any of {}<>:;". This should had been "any that requires shift/alt" since these were the unavailable ones.
Thank you!
(In reply to Joonas Niilola from comment #6) > I don't really understand "why", must be some emacs principle as you hinted. > From those you listed I don't think any is better than "-". Personally, I > was thinking about C-c h, and I can still bind it there if I wish. However, > I was quite happy with C-c- after all since it's easy and fast to type. > Definitely easier than any of {}<>:;". It is mentioned in the appendix of the Emacs Lisp reference manual: * Don’t define C-c letter as a key in Lisp programs. Sequences consisting of C-c and a letter (either upper or lower case) are reserved for users; they are the only sequences reserved for users, so do not block them. [...] * Sequences consisting of C-c followed by a control character or a digit are reserved for major modes. * Sequences consisting of C-c followed by {, }, <, >, : or ; are also reserved for major modes. * Sequences consisting of C-c followed by any other ASCII punctuation or symbol character are allocated for minor modes. [...] https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html (Or if you prefer PDF, it's on page 1197: https://www.gnu.org/software/emacs/manual/pdf/elisp.pdf)
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a15b5885769929f043a473c28beea0c1737760e8 commit a15b5885769929f043a473c28beea0c1737760e8 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-01-16 11:40:30 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-01-16 11:47:03 +0000 app-emacs/ebuild-mode: Version bump to 1.55 Closes: https://bugs.gentoo.org/830796 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-emacs/ebuild-mode/Manifest | 1 + app-emacs/ebuild-mode/ebuild-mode-1.55.ebuild | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+)