* [PATCH] project.el: Use list of strings p for safe local variable
@ 2023-08-26 4:38 Joseph Turner
2023-08-26 11:59 ` Stefan Kangas
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Joseph Turner @ 2023-08-26 4:38 UTC (permalink / raw)
To: Emacs Devel Mailing List
[-- Attachment #1: Type: text/plain, Size: 43 bytes --]
Might make sense to merge this into 29.2?
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-project.el-Use-list-of-strings-p-for-safe-local-vari.patch --]
[-- Type: text/x-diff, Size: 1587 bytes --]
From 8237eb21c81b3e5ededd42a3a2d5b9770d45ca92 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Fri, 25 Aug 2023 21:31:06 -0700
Subject: [PATCH] project.el: Use list-of-strings-p for safe-local-variable
predicate
* lisp/progmodes/project.el (project-vc-ignores)
(project-vc-extra-root-markers)
---
lisp/progmodes/project.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 8d8bf594628..882173a65d0 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -397,7 +397,7 @@ the buffer's value of `default-directory'."
(defcustom project-vc-ignores nil
"List of patterns to add to `project-ignores'."
:type '(repeat string))
-;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'listp)
+;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'list-of-strings-p)
(defcustom project-vc-merge-submodules t
"Non-nil to consider submodules part of the parent project.
@@ -452,7 +452,7 @@ variables, such as `project-vc-ignores' or `project-vc-name'."
:type '(repeat string)
:version "29.1"
:package-version '(project . "0.9.0"))
-;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable (lambda (val) (and (listp val) (not (memq nil (mapcar #'stringp val))))))
+;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable #'list-of-strings-p)
;; FIXME: Using the current approach, major modes are supposed to set
;; this variable to a buffer-local value. So we don't have access to
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-26 4:38 [PATCH] project.el: Use list of strings p for safe local variable Joseph Turner
@ 2023-08-26 11:59 ` Stefan Kangas
2023-08-26 12:51 ` Dmitry Gutov
2023-08-30 7:10 ` bug#65608: Fwd: " Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2 siblings, 0 replies; 8+ messages in thread
From: Stefan Kangas @ 2023-08-26 11:59 UTC (permalink / raw)
To: Joseph Turner; +Cc: Emacs Devel Mailing List
Thanks for the patch. I recommend re-sending it to
bug-gnu-emacs@gnu.org so that we don't lose track of it.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-26 4:38 [PATCH] project.el: Use list of strings p for safe local variable Joseph Turner
2023-08-26 11:59 ` Stefan Kangas
@ 2023-08-26 12:51 ` Dmitry Gutov
2023-08-30 7:10 ` bug#65608: Fwd: " Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2 siblings, 0 replies; 8+ messages in thread
From: Dmitry Gutov @ 2023-08-26 12:51 UTC (permalink / raw)
To: Joseph Turner, Emacs Devel Mailing List
On 26/08/2023 07:38, Joseph Turner wrote:
> Might make sense to merge this into 29.2?
Thank you, but the function list-of-strings-p has only been added very
recently.
project.el is a "core ELPA package", meaning we publish every
version-tagged release to ELPA as well, maintaining compatibility with
Emacs 26.1+. So this won't fly just yet.
Maybe in 4-5 years or so.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-26 4:38 [PATCH] project.el: Use list of strings p for safe local variable Joseph Turner
2023-08-26 11:59 ` Stefan Kangas
2023-08-26 12:51 ` Dmitry Gutov
@ 2023-08-30 7:10 ` Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-30 11:22 ` Dmitry Gutov
2 siblings, 1 reply; 8+ messages in thread
From: Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2023-08-30 7:10 UTC (permalink / raw)
To: 65608; +Cc: dmitry, stefankangas
[-- Attachment #1: Type: text/plain, Size: 312 bytes --]
Stefan Kangas suggested I resend this patch to this mailing list so that
it's not lost even though it can't be applied yet.
Joseph Turner <joseph@breatheoutbreathe.in> writes:
> Might make sense to merge this into 29.2?
>
> [2. text/x-diff; 0001-project.el-Use-list-of-strings-p-for-safe-local-vari.patch]...
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-project.el-Use-list-of-strings-p-for-safe-local-vari.patch --]
[-- Type: text/x-diff, Size: 1587 bytes --]
From 8237eb21c81b3e5ededd42a3a2d5b9770d45ca92 Mon Sep 17 00:00:00 2001
From: Joseph Turner <joseph@breatheoutbreathe.in>
Date: Fri, 25 Aug 2023 21:31:06 -0700
Subject: [PATCH] project.el: Use list-of-strings-p for safe-local-variable
predicate
* lisp/progmodes/project.el (project-vc-ignores)
(project-vc-extra-root-markers)
---
lisp/progmodes/project.el | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/progmodes/project.el b/lisp/progmodes/project.el
index 8d8bf594628..882173a65d0 100644
--- a/lisp/progmodes/project.el
+++ b/lisp/progmodes/project.el
@@ -397,7 +397,7 @@ the buffer's value of `default-directory'."
(defcustom project-vc-ignores nil
"List of patterns to add to `project-ignores'."
:type '(repeat string))
-;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'listp)
+;;;###autoload(put 'project-vc-ignores 'safe-local-variable #'list-of-strings-p)
(defcustom project-vc-merge-submodules t
"Non-nil to consider submodules part of the parent project.
@@ -452,7 +452,7 @@ variables, such as `project-vc-ignores' or `project-vc-name'."
:type '(repeat string)
:version "29.1"
:package-version '(project . "0.9.0"))
-;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable (lambda (val) (and (listp val) (not (memq nil (mapcar #'stringp val))))))
+;;;###autoload(put 'project-vc-extra-root-markers 'safe-local-variable #'list-of-strings-p)
;; FIXME: Using the current approach, major modes are supposed to set
;; this variable to a buffer-local value. So we don't have access to
--
2.41.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-30 7:10 ` bug#65608: Fwd: " Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2023-08-30 11:22 ` Dmitry Gutov
2023-08-30 17:54 ` Stefan Kangas
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2023-08-30 11:22 UTC (permalink / raw)
To: Joseph Turner, 65608; +Cc: stefankangas
On 30/08/2023 10:10, Joseph Turner via Bug reports for GNU Emacs, the
Swiss army knife of text editors wrote:
> Stefan Kangas suggested I resend this patch to this mailing list so that
> it's not lost even though it can't be applied yet.
Just to clarify for posterity: it can't be applied yet because
list-of-string-p is not in Emacs 26. Or 27 (which we might bump the
requirement to in not-too-distant future).
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-30 11:22 ` Dmitry Gutov
@ 2023-08-30 17:54 ` Stefan Kangas
2023-08-31 0:30 ` Dmitry Gutov
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2023-08-30 17:54 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 65608-done, Joseph Turner
Version: 30.1
Dmitry Gutov <dmitry@gutov.dev> writes:
> On 30/08/2023 10:10, Joseph Turner via Bug reports for GNU Emacs, the
> Swiss army knife of text editors wrote:
> > Stefan Kangas suggested I resend this patch to this mailing list so that
> > it's not lost even though it can't be applied yet.
>
> Just to clarify for posterity: it can't be applied yet because
> list-of-string-p is not in Emacs 26. Or 27 (which we might bump the
> requirement to in not-too-distant future).
Right. Note that `list-of-strings-p' was added in Emacs 28, though.
So I added a comment to that effect in commit 9647ddb2993, and I'm
closing the bug.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-30 17:54 ` Stefan Kangas
@ 2023-08-31 0:30 ` Dmitry Gutov
2023-08-31 6:45 ` Stefan Kangas
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Gutov @ 2023-08-31 0:30 UTC (permalink / raw)
To: Stefan Kangas; +Cc: 65608-done, Joseph Turner
On 30/08/2023 20:54, Stefan Kangas wrote:
> Right. Note that `list-of-strings-p' was added in Emacs 28, though.
I think you meant to say Emacs 29 here.
> So I added a comment to that effect in commit 9647ddb2993, and I'm
> closing the bug.
Thank you.
^ permalink raw reply [flat|nested] 8+ messages in thread
* bug#65608: Fwd: [PATCH] project.el: Use list of strings p for safe local variable
2023-08-31 0:30 ` Dmitry Gutov
@ 2023-08-31 6:45 ` Stefan Kangas
0 siblings, 0 replies; 8+ messages in thread
From: Stefan Kangas @ 2023-08-31 6:45 UTC (permalink / raw)
To: Dmitry Gutov; +Cc: 65608-done, Joseph Turner
Dmitry Gutov <dmitry@gutov.dev> writes:
> On 30/08/2023 20:54, Stefan Kangas wrote:
> > Right. Note that `list-of-strings-p' was added in Emacs 28, though.
>
> I think you meant to say Emacs 29 here.
Yes, indeed.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-08-31 6:45 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-26 4:38 [PATCH] project.el: Use list of strings p for safe local variable Joseph Turner
2023-08-26 11:59 ` Stefan Kangas
2023-08-26 12:51 ` Dmitry Gutov
2023-08-30 7:10 ` bug#65608: Fwd: " Joseph Turner via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-08-30 11:22 ` Dmitry Gutov
2023-08-30 17:54 ` Stefan Kangas
2023-08-31 0:30 ` Dmitry Gutov
2023-08-31 6:45 ` Stefan Kangas
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.