Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 830796 - app-emacs/ebuild-mode: Create name/date header for package.mask entries
Summary: app-emacs/ebuild-mode: Create name/date header for package.mask entries
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Emacs project
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2022-01-08 13:47 UTC by Ulrich Müller
Modified: 2022-01-16 11:47 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Müller gentoo-dev 2022-01-08 13:47:11 UTC
Add a function to automatically format a line like this:

# Dev E. Loper <developer@gentoo.org> (2019-07-01)
Comment 1 Larry the Git Cow gentoo-dev 2022-01-10 19:10:46 UTC
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(+)
Comment 2 Ulrich Müller gentoo-dev 2022-01-10 19:12:39 UTC
I have committed a first version to git.

@juippis: You can test with ebuild-mode-9999 from the emacs overlay.
Comment 3 Larry the Git Cow gentoo-dev 2022-01-10 19:14:08 UTC
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(+)
Comment 4 Joonas Niilola gentoo-dev 2022-01-11 06:16:45 UTC
(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.
Comment 5 Ulrich Müller gentoo-dev 2022-01-11 07:53:01 UTC
(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: {}<>:;"'
Comment 6 Joonas Niilola gentoo-dev 2022-01-11 13:52:04 UTC
(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
Comment 7 Joonas Niilola gentoo-dev 2022-01-11 13:53:13 UTC
(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.
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-01-11 13:55:14 UTC
Thank you!
Comment 9 Ulrich Müller gentoo-dev 2022-01-11 16:43:53 UTC
(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)
Comment 10 Larry the Git Cow gentoo-dev 2022-01-16 11:47:19 UTC
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(+)