GNU bug report logs -
#46660
[PATCH] 28.0.50; Support for PKGBUILD files on Arch Linux
Previous Next
Reported by: Utkarsh Singh <utkarsh190601 <at> gmail.com>
Date: Sat, 20 Feb 2021 08:20:01 UTC
Severity: normal
Tags: fixed, patch
Fixed in version 28.1
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 46660 in the body.
You can then email your comments to 46660 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46660
; Package
emacs
.
(Sat, 20 Feb 2021 08:20:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Utkarsh Singh <utkarsh190601 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sat, 20 Feb 2021 08:20:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi,
Can we add support for PKGBUILD(1) files for Emacs which are used to
install packages from AUR(Arch User Repository).
PKGBUILD are just normal shell script files, so we just have to add
sh mode to it:
diff --git a/lisp/files.el b/lisp/files.el
index 68e883513c..7d01938144 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2723,6 +2723,7 @@ auto-mode-alist
("\\.scm\\.[0-9]*\\'" . scheme-mode)
("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
("\\.bash\\'" . sh-mode)
+ ("PKGBUILD$" . sh-mode)
("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" . sh-mode)
("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode)
There is also a special pkgbuild-mode(2) for editing these files which
is also an derivation of sh-mode.
[1]: https://wiki.archlinux.org/index.php/PKGBUILD
[2]: https://github.com/juergenhoetzel/pkgbuild-mode
--
Utkarsh Singh
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46660
; Package
emacs
.
(Sat, 20 Feb 2021 08:43:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 46660 <at> debbugs.gnu.org (full text, mbox):
On Feb 20 2021, Utkarsh Singh wrote:
> diff --git a/lisp/files.el b/lisp/files.el
> index 68e883513c..7d01938144 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -2723,6 +2723,7 @@ auto-mode-alist
> ("\\.scm\\.[0-9]*\\'" . scheme-mode)
> ("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
> ("\\.bash\\'" . sh-mode)
> + ("PKGBUILD$" . sh-mode)
Use "\\'" instead of "$". Is this supposed to match "fooPKGBUILD"?
Andreas.
--
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46660
; Package
emacs
.
(Sat, 20 Feb 2021 14:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 46660 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Andreas Schwab <schwab <at> linux-m68k.org> writes:
> Use "\\'" instead of "$". Is this supposed to match "fooPKGBUILD"?
Thanks I was unaware of this particular regex!
diff --git a/lisp/files.el b/lisp/files.el
index 68e883513c..393b3472f7 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2723,6 +2723,7 @@ auto-mode-alist
("\\.scm\\.[0-9]*\\'" . scheme-mode)
("\\.[ckz]?sh\\'\\|\\.shar\\'\\|/\\.z?profile\\'" . sh-mode)
("\\.bash\\'" . sh-mode)
+ ("PKGBUILD\\'" . sh-mode)
("\\(/\\|\\`\\)\\.\\(bash_\\(profile\\|history\\|log\\(in\\|out\\)\\)\\|z?log\\(in\\|out\\)\\)\\'" .
sh-mode)
("\\(/\\|\\`\\)\\.\\(shrc\\|zshrc\\|m?kshrc\\|bashrc\\|t?cshrc\\|esrc\\)\\'" . sh-mode)
("\\(/\\|\\`\\)\\.\\([kz]shenv\\|xinitrc\\|startxrc\\|xsession\\)\\'" . sh-mode)
--
Utkarsh Singh
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46660
; Package
emacs
.
(Mon, 22 Feb 2021 15:09:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 46660 <at> debbugs.gnu.org (full text, mbox):
Utkarsh Singh <utkarsh190601 <at> gmail.com> writes:
> Andreas Schwab <schwab <at> linux-m68k.org> writes:
>
>> Use "\\'" instead of "$". Is this supposed to match "fooPKGBUILD"?
>
> Thanks I was unaware of this particular regex!
[...]
> + ("PKGBUILD\\'" . sh-mode)
Thanks, but this will still match "fooPKGBUILD". Is that the intention,
or are these files called only "PKGBUILD" without any prefix?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46660
; Package
emacs
.
(Tue, 23 Feb 2021 04:30:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 46660 <at> debbugs.gnu.org (full text, mbox):
> Thanks, but this will still match "fooPKGBUILD". Is that the intention,
> or are these files called only "PKGBUILD" without any prefix?
Yes, these file are only called PKGBUILD without any post-fix.
For prefix shouldn't they match the file path for ex:
'/home/user/emacs/PKGBUILD' or is file path ignored in this case?
--
Utkarsh Singh
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#46660
; Package
emacs
.
(Tue, 23 Feb 2021 15:44:01 GMT)
Full text and
rfc822 format available.
Message #20 received at 46660 <at> debbugs.gnu.org (full text, mbox):
Utkarsh Singh <utkarsh190601 <at> gmail.com> writes:
>> Thanks, but this will still match "fooPKGBUILD". Is that the intention,
>> or are these files called only "PKGBUILD" without any prefix?
>
> Yes, these file are only called PKGBUILD without any post-fix.
>
> For prefix shouldn't they match the file path for ex:
> '/home/user/emacs/PKGBUILD' or is file path ignored in this case?
I interpret this to mean that the files are called "PKGBUILD", with no
prefix, and I've committed your patch (with a change to match exactly
that) to Emacs 28. (The fix is to add a "/" to the start of the regexp,
since we're matching on the entire file name.)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 23 Feb 2021 15:44:02 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 28.1, send any further explanations to
46660 <at> debbugs.gnu.org and Utkarsh Singh <utkarsh190601 <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Tue, 23 Feb 2021 15:44:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 24 Mar 2021 11:24:07 GMT)
Full text and
rfc822 format available.
This bug report was last modified 3 years and 33 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.