[elpa] externals/denote 1a166df581: Generalise denote-excluded-directories-regexp

2022-11-05 Thread ELPA Syncer
branch: externals/denote
commit 1a166df581d37fccc5c79d38c330e12b1c54b906
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Generalise denote-excluded-directories-regexp

This builds on the initial idea of Graham Marlow in commit 39a20a7,
further refined in 95cd9f8.

Graham contributed in pull request 112 on the GitHub mirror:
.
---
 README.org | 31 +--
 denote.el  | 35 ++-
 2 files changed, 55 insertions(+), 11 deletions(-)

diff --git a/README.org b/README.org
index e95043be49..c9b5cacc2d 100644
--- a/README.org
+++ b/README.org
@@ -648,6 +648,31 @@ to experiment with the best setup for their workflow.
 Feel welcome to ask for help if the information provided herein is not
 sufficient.  The manual shall be expanded accordingly.
 
+** Exclude certain directories from all operations
+:PROPERTIES:
+:CUSTOM_ID: h:8458f716-f9c2-4888-824b-2bf01cc5850a
+:END:
+
+[ Part of {{{development-version}}}. ]
+
+#+vindex: denote-excluded-directories-regexp
+The user option ~denote-excluded-directories-regexp~ instructs all
+Denote functions that read or check file/directory names to omit
+directories that match the given regular expression.  The regexp needs
+to match only the name of the directory, not its full path.
+
+Affected operations include file prompts and functions that return the
+available files in the value of the user option ~denote-directory~
+([[#h:15719799-a5ff-4e9a-9f10-4ca03ef8f6c5][Maintain separate directory silos 
for notes]]).
+
+File prompts are used by several commands, such as ~denote-link~ and
+~denote-subdirectory~.
+
+Functions that check for files include ~denote-directory-files~ and
+~denote-directory-subdirectories~.
+
+[[#h:c916d8c5-540a-409f-b780-6ccbd90e088e][For developers or advanced users]].
+
 * Renaming files
 :PROPERTIES:
 :CUSTOM_ID: h:532e8e2a-9b7d-41c0-8f4b-3c5cbb7d4dca
@@ -2313,7 +2338,7 @@ Everything is in place to set up the package.
 (setq denote-sort-keywords t)
 (setq denote-file-type nil) ; Org is the default, set others here
 (setq denote-prompts '(title keywords))
-
+(setq denote-excluded-directories-regexp nil)
 
 ;; Pick dates, where relevant, with Org's advanced interface:
 (setq denote-date-prompt-use-org-read-date t)
@@ -2514,7 +2539,9 @@ might change them without further notice.
 
 #+findex: denote-directory-subdirectories
 + Function ~denote-directory-subdirectories~ :: Return list of
-  subdirectories of the variable ~denote-directory~.  Note that the
+  subdirectories in variable ~denote-directory~. Omit dotfiles (such
+  as .git) unconditionally.  Also exclude whatever matches
+  ~denote-excluded-directories-regexp~.  Note that the
   ~denote-directory~ accepts a directory-local value for what we call
   "silos" ([[#h:15719799-a5ff-4e9a-9f10-4ca03ef8f6c5][Maintain separate 
directories for notes]]).
 
diff --git a/denote.el b/denote.el
index 91de774d0b..d5874d6046 100644
--- a/denote.el
+++ b/denote.el
@@ -380,11 +380,17 @@ current note."
 (make-obsolete 'denote-link-fontify-backlinks 'denote-backlinks-show-context 
"1.2.0")
 
 (defcustom denote-excluded-directories-regexp nil
-  "Regular expression of directories to exclude from file prompts.
-When nil (the default value) all directory names are shown.
+  "Regular expression of directories to exclude from all operations.
+Omit matching directories from file prompts and also exclude them
+from all functions that check the contents of the variable
+`denote-directory'.  The regexp needs to match only the name of
+the directory, not its full path.
 
-File prompts are used by several commands, such as `denote-link'.
-The underlying function is `denote-file-prompt'."
+File prompts are used by several commands, such as `denote-link'
+and `denote-subdirectory'.
+
+Functions that check for files include `denote-directory-files'
+and `denote-directory-subdirectories'."
   :group 'denote
   :package-version '(denote . "1.2.0")
   :type 'string)
@@ -646,7 +652,13 @@ value, as explained in its doc string."
(seq-remove
 (lambda (f)
   (not (denote-file-has-identifier-p f)))
-(directory-files-recursively (denote-directory) 
directory-files-no-dot-files-regexp t
+(directory-files-recursively
+ (denote-directory)
+ directory-files-no-dot-files-regexp
+ :include-directories
+ (lambda (f)
+   (when-let ((regexp denote-excluded-directories-regexp))
+ (not (string-match-p regexp f
 
 (defun denote-directory-text-only-files ()
   "Return list of text files in variable `denote-directory'.
@@ -659,12 +671,17 @@ Filter `denote-directory-files' using 
`denote-file-is-note-p'."
   "1.0.0")
 
 (defun denote-directory-subdirectories ()
-  "Return list of subdirectories in variable `denote-directory'."
+  "Return list of subdirectories in variable `denote-directory'.
+Omit dotfiles (such as .git) unconditionally.  Also exclude
+whatever

[elpa] externals/ef-themes b5a963feff: ef-spring: change bg-region-intense hue

2022-11-05 Thread ELPA Syncer
branch: externals/ef-themes
commit b5a963feff66838ac4a10335a457e5fa54b0b04a
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

ef-spring: change bg-region-intense hue

The previous one was too close to what hl-line-mode is using.  We want
the "intense" region to be easy to spot, especially in such a common
scenario.
---
 ef-spring-theme.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ef-spring-theme.el b/ef-spring-theme.el
index 521d88c710..6b7eb046ff 100644
--- a/ef-spring-theme.el
+++ b/ef-spring-theme.el
@@ -145,7 +145,7 @@
   (underline-info"#02af52")
 
   ;; Conditional hues
-  (bg-region-intense "#dfb0d0")
+  (bg-region-intense "#cfb5f0")
 
   ;; Mappings
   (err red-warmer)



[elpa] externals/gpr-query a9cb407ef8: Misc improve

2022-11-05 Thread Stephen Leake
branch: externals/gpr-query
commit a9cb407ef8adca50e0ef5d2dece57529e1d2d380
Author: Stephen Leake 
Commit: Stephen Leake 

Misc improve

* Alire.make: Simplify path to alire_rules.make.
(install): New.

* ELPA.make: Delete copy to elpa, tar, zip, tag; only developed in elpa git.
(install): Add --prefix=~/.local.

* gpr-query.texi (Installation): Delete install Alire compiler for
external use; would also require gnatcoll.
---
 .gitignore |  7 +++
 Alire.make |  5 +++--
 ELPA.make  | 34 +-
 gpr-query.texi | 12 +---
 4 files changed, 16 insertions(+), 42 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..4eac78d3ce
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+alire/
+autoloads.el
+autoloads.el~
+bin/
+config/
+*.elc
+obj/
diff --git a/Alire.make b/Alire.make
index b002db006e..a52a8e8602 100644
--- a/Alire.make
+++ b/Alire.make
@@ -1,8 +1,9 @@
 # For compiling gpr-query Ada code with Alire
 
-STEPHES_ADA_LIBRARY_ALIRE_PREFIX ?= $(CURDIR)/../org.stephe_leake.sal
+include ../wisi/alire_rules.make
 
-include $(STEPHES_ADA_LIBRARY_ALIRE_PREFIX)/build/alire_rules.make
+install : bin/gpr_query$(EXE_EXT)
+   gprinstall -f -p -P emacs_gpr_query.gpr --prefix=~/.local 
--install-name=gpr_query
 
 # Local Variables:
 # eval: (load-file "prj-eglot.el")
diff --git a/ELPA.make b/ELPA.make
index 9128803062..e0fa44f647 100644
--- a/ELPA.make
+++ b/ELPA.make
@@ -12,7 +12,7 @@ build : config/emacs_gpr_query_config.gpr force
gprbuild -p -j8 emacs_gpr_query.gpr
 
 install : bin/gpr_query$(EXE_EXT)
-   gprinstall -f -p -P emacs_gpr_query.gpr --install-name=gpr_query
+   gprinstall -f -p -P emacs_gpr_query.gpr --prefix=~/.local 
--install-name=gpr_query
 
 ifeq ($(shell uname),Linux)
 EMACS_EXE ?= emacs
@@ -43,15 +43,6 @@ clean : force
 recursive-clean : force
gprclean -r -P emacs_gpr_query.gpr
 
-### publish to elpa package
-ELPA_ROOT ?= $(shell cd ../elpa; pwd -W)
-
-pub : force | $(ELPA_ROOT)/packages/gpr-query
-   rm -rf $(ELPA_ROOT)/packages/gpr-query/*
-   cp *.el *.gpr *.make *.prj *.sh *.texi $(ELPA_ROOT)/packages/gpr-query
-   cp NEWS README $(ELPA_ROOT)/packages/gpr-query
-   cd $(ELPA_ROOT)/packages/gpr-query; rm autoloads.el
-
 # builds $(ELPA_ROOT)/archive-devel/*, from the last commit, _not_ the
 # current workspace Also checks copyright; run elpa/GNUMakefile
 # check/ first if added files.
@@ -59,26 +50,11 @@ build-elpa : force
rm -rf $(ELPA_ROOT)/archive-devel
make -C $(ELPA_ROOT)/ build/gpr-query
 
-config/emacs_gpr_query_config.gpr :
-   cp emacs_gpr_query_config_devel.gpr config/emacs_gpr_query_config.gpr
-
-### misc stuff
-BRANCH := $(notdir $(shell cd ..; pwd))
-
-ifeq ($(BRANCH),org.emacs.gpr-query)
-  TAR_FILE := org.emacs.gpr-query-$(GPR_QUERY_VERSION)
-else
-  TAR_FILE := $(BRANCH)
-endif
-
-zip :
-   rm -rf $(TAR_FILE)
-   mtn checkout --branch $(BRANCH) $(TAR_FILE)
-   tar jcf $(TAR_FILE).tar.bz2 --exclude _MTN -C .. $(TAR_FILE)
-
-tag :
-   mtn tag h:org.emacs.gpr-query org.emacs.gpr-query-$(GPR_QUERY_VERSION)
+config :
+   mkdir config
 
+config/emacs_gpr_query_config.gpr : config
+   cp emacs_gpr_query_config_devel.gpr config/emacs_gpr_query_config.gpr
 
 # Local Variables:
 # eval: (load-file "prj.el")
diff --git a/gpr-query.texi b/gpr-query.texi
index 59a870a023..3723803b36 100644
--- a/gpr-query.texi
+++ b/gpr-query.texi
@@ -77,17 +77,7 @@ gprbuild; then you must use the toolchain assistant:
 alr toolchain --select --local
 @end example
 
-You can also install a compiler provided by Alire in an external
-directory, to be used outside Alire:
-@example
-alr toolchain --install --install-dir $HOME/.local gnat_native
-alr toolchain --install --install-dir $HOME/.local gprbuild
-@end example
-
-Then add the installed @code{bin} directories to your @code{PATH}.
-
-
-In any case, after installing the gpr-query ELPA package:
+After installing the gpr-query ELPA package:
 @example
 cd ~/.emacs.d/elpa/gpr-query-1.0.x
 ./build.sh



[elpa] externals/gnat-compiler 178098364e: * ELPA.make: New file

2022-11-05 Thread Stephen Leake
branch: externals/gnat-compiler
commit 178098364ea846067c82ef31f6f518e952e5a8bd
Author: Stephen Leake 
Commit: Stephen Leake 

* ELPA.make: New file
---
 .gitignore |  2 ++
 ELPA.make  | 34 ++
 2 files changed, 36 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..9850d0ff11
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+autoloads.el
+autoloads.el~
diff --git a/ELPA.make b/ELPA.make
new file mode 100644
index 00..fe7fa41572
--- /dev/null
+++ b/ELPA.make
@@ -0,0 +1,34 @@
+# For compiling in elpa
+
+.PHONY : all force
+
+all : byte-compile autoloads
+
+ifeq ($(shell uname),Linux)
+EMACS_EXE ?= emacs
+else ifeq ($(shell uname),Darwin)
+EMACS_EXE ?= "/Applications/Emacs.app/Contents/MacOS/Emacs"
+else
+# windows
+# specify uniscribe to workaround weird Windows harfbuzz bug
+EMACS_EXE ?= emacs -xrm Emacs.fontBackend:uniscribe
+endif
+
+BYTE_COMPILE := "(progn (setq byte-compile-error-on-warn 
t)(batch-byte-compile))"
+byte-compile : byte-compile-clean
+   $(EMACS_EXE) -Q -batch -L . -L $(WISI) --eval $(BYTE_COMPILE) *.el
+
+byte-compile-clean :
+   rm -f *.elc
+
+autoloads : force
+   $(EMACS_EXE) -Q -batch --eval "(progn (setq generated-autoload-file 
(expand-file-name \"autoloads.el\"))(update-directory-autoloads \".\"))"
+
+# builds $(ELPA_ROOT)/archive-devel/*, from the last commit, _not_ the
+# current workspace Also checks copyright; run elpa/GNUMakefile
+# check/ first if added files.
+build-elpa : force
+   rm -rf $(ELPA_ROOT)/archive-devel
+   make -C $(ELPA_ROOT)/ build/gnat-compiler
+
+# end of file



[elpa] externals/gpr-query 542cbf35d6 3/3: * ELPA.make (all): Add docs

2022-11-05 Thread Stephen Leake
branch: externals/gpr-query
commit 542cbf35d685b159b56bed12ce97232232d77f57
Author: Stephen Leake 
Commit: Stephen Leake 

* ELPA.make (all): Add docs

* gpr-query.texi: Update menus, fix sectioning bug.
---
 ELPA.make  | 2 +-
 gpr-query.texi | 9 +++--
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/ELPA.make b/ELPA.make
index b80d138872..0917b2d956 100644
--- a/ELPA.make
+++ b/ELPA.make
@@ -4,7 +4,7 @@
 
 .PHONY : all force
 
-all : build byte-compile autoloads
+all : build byte-compile autoloads docs
 
 docs : gpr-query.info
 
diff --git a/gpr-query.texi b/gpr-query.texi
index 3723803b36..e9c5e6e587 100644
--- a/gpr-query.texi
+++ b/gpr-query.texi
@@ -39,6 +39,12 @@ developing GNU and promoting software freedom.''
 
 gpr-query Version 1.0.1
 
+@menu
+* Overview::
+* Installation::
+* GNU Free Documentation License::
+@end menu
+
 @node Overview
 @chapter Overview
 
@@ -124,11 +130,10 @@ is available in Mingw64 as package
 
 @menu
 * Building GNATCOLL::
-* Building the executables::
 @end menu
 
 @node Building GNATCOLL
-@subsection Building GNATCOLL
+@section Building GNATCOLL
 
 The GNAT Community and GNAT pro binary installs have some of the
 GNATCOLL packages we need, but we need to install others from source.



[elpa] externals/gpr-query 5a62db91fc 2/3: * prj-eglot.el: Delete

2022-11-05 Thread Stephen Leake
branch: externals/gpr-query
commit 5a62db91fc1c39623e609983d3863a9c7c41059d
Author: Stephen Leake 
Commit: Stephen Leake 

* prj-eglot.el: Delete

* gpr-query.el: Match required end comment style.
---
 gpr-query.el |  2 +-
 prj-eglot.el | 41 -
 2 files changed, 1 insertion(+), 42 deletions(-)

diff --git a/gpr-query.el b/gpr-query.el
index 943efda022..97046cc427 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -1103,4 +1103,4 @@ FILE is from gpr-query."
 (cons 'gpr-query-ident-file gpr-query-ident-file-regexp-alist))
 
 (provide 'gpr-query)
-;;; end of file
+;;; gpr-query.el ends here
diff --git a/prj-eglot.el b/prj-eglot.el
deleted file mode 100644
index 72788da0d8..00
--- a/prj-eglot.el
+++ /dev/null
@@ -1,41 +0,0 @@
-;; project settings for building gpr-query with Alire/editing with eglot -*- 
no-byte-compile : t -*-
-
-(require 'ada-mode)
-;; This require is not needed for the following code, but is needed to
-;; ensure ada-mode-hook has sal-ada-mode-setup.
-
-(setq ada-indent-engine 'wisi) ;; ada_language_server 22.0 doesn't support 
RangeFormatting
-
-(setq ada-xref-tool 'eglot)
-
-(add-hook 'ada-mode-hook #'ada-eglot-setup)
-
-(let* ((gpr-file (expand-file-name "emacs_gpr_query.gpr" (file-name-directory 
load-file-name)))
-   (prj-file (expand-file-name "gpr-query.prj" (file-name-directory 
load-file-name)))
-   (eglot-workspace-configuration (list `(ada (projectFile . ,gpr-file
-
-   (project
-   (create-alire-project
-:prj-name "gpr-query main Alire eglot"
-:prj-file prj-file
-:gpr-file gpr-file)))
-
-  (wisi-prj-select-cache prj-file nil "Alire.make")
-
-  ;; ada_language_server gets GPR_PROJECT_PATH from its process
-  ;; environment, and the gpr file from eglot-workspace-configuration.
-  (let ((process-environment
-(append
- (copy-sequence process-environment)
- (wisi-prj-compile-env project)
- (wisi-prj-file-env project
-
-(eglot 'ada-mode ;; managed-major-mode
-  project ;; project; project-root is server process directory
-  'eglot-lsp-server ;; class
-  'gnat-find-als ;; contact
-  "Ada" ;; language-id
-  ))
-  )
-
-;; end of file



[elpa] externals/gpr-query 32c123e157 1/3: Misc fixes

2022-11-05 Thread Stephen Leake
branch: externals/gpr-query
commit 32c123e157caa4421680c338ada5807c1e4dbef1
Author: Stephen Leake 
Commit: Stephen Leake 

Misc fixes

* ELPA.make (build-elpa): Fix path to elpa root.

* gpr-query.el: Match required header comment style.
---
 ELPA.make| 6 +++---
 gpr-query.el | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/ELPA.make b/ELPA.make
index e0fa44f647..b80d138872 100644
--- a/ELPA.make
+++ b/ELPA.make
@@ -46,9 +46,9 @@ recursive-clean : force
 # builds $(ELPA_ROOT)/archive-devel/*, from the last commit, _not_ the
 # current workspace Also checks copyright; run elpa/GNUMakefile
 # check/ first if added files.
-build-elpa : force
-   rm -rf $(ELPA_ROOT)/archive-devel
-   make -C $(ELPA_ROOT)/ build/gpr-query
+build-elpa : ../../GNUmakefile force
+   rm -rf ../../archive-devel
+   make -C ../.. build/gpr-query
 
 config :
mkdir config
diff --git a/gpr-query.el b/gpr-query.el
index d047c50f79..943efda022 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -1,4 +1,4 @@
-;; gpr-query.el --- Minor mode for navigating sources using gpr_query  -*- 
lexical-binding:t -*-
+;;; gpr-query.el --- Minor mode for navigating sources using gpr_query  -*- 
lexical-binding:t -*-
 ;;
 ;; gpr-query supports Ada and any gcc language that supports the
 ;; AdaCore -fdump-xref switch (which includes C, C++).



[elpa] externals/gpr-query updated (a9cb407ef8 -> 542cbf35d6)

2022-11-05 Thread Stephen Leake
stephen_leake pushed a change to branch externals/gpr-query.

  from  a9cb407ef8 Misc improve
   new  32c123e157 Misc fixes
   new  5a62db91fc * prj-eglot.el: Delete
   new  542cbf35d6 * ELPA.make (all): Add docs


Summary of changes:
 ELPA.make  |  8 
 gpr-query.el   |  4 ++--
 gpr-query.texi |  9 +++--
 prj-eglot.el   | 41 -
 4 files changed, 13 insertions(+), 49 deletions(-)
 delete mode 100644 prj-eglot.el



[elpa] externals/org 946abeb49a: org-sting-width: Do no err in dedicated windows

2022-11-05 Thread ELPA Syncer
branch: externals/org
commit 946abeb49a73d7d04233a53fbb7fd422c7e294b6
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

org-sting-width: Do no err in dedicated windows

* lisp/org-macs.el (org-string-width): Do not err when current window
is dedicated.  Force-remove dedicated status temporarily during the
call.  This should be safe as we only need to take over the window
temporarily to hook into Emacs display and calculate the string
width.

Reported-by: Bruno BARBIER 
Link: https://orgmode.org/list/63662793.5d0a0220.62647.3...@mx.google.com
---
 lisp/org-macs.el | 28 ++--
 1 file changed, 22 insertions(+), 6 deletions(-)

diff --git a/lisp/org-macs.el b/lisp/org-macs.el
index 2eb1a8b628..541413a64a 100644
--- a/lisp/org-macs.el
+++ b/lisp/org-macs.el
@@ -1100,9 +1100,17 @@ Return width in pixels when PIXELS is non-nil."
   (if (get-buffer-window (current-buffer))
   (car (window-text-pixel-size
 nil (line-beginning-position) (point-max)))
-(set-window-buffer nil (current-buffer))
-(car (window-text-pixel-size
-  nil (line-beginning-position) (point-max)
+(let ((dedicatedp (window-dedicated-p))
+  (oldbuffer (window-buffer)))
+  (unwind-protect
+  (progn
+;; Do not throw error in dedicated windows.
+(set-window-dedicated-p nil nil)
+(set-window-buffer nil (current-buffer))
+(car (window-text-pixel-size
+  nil (line-beginning-position) (point-max
+(set-window-buffer nil oldbuffer)
+(set-window-dedicated-p nil dedicatedp)
 (unless pixels
   (erase-buffer)
   (insert "a")
@@ -1110,9 +1118,17 @@ Return width in pixels when PIXELS is non-nil."
 (if (get-buffer-window (current-buffer))
 (car (window-text-pixel-size
   nil (line-beginning-position) (point-max)))
-  (set-window-buffer nil (current-buffer))
-  (car (window-text-pixel-size
-nil (line-beginning-position) (point-max)))
+  (let ((dedicatedp (window-dedicated-p))
+(oldbuffer (window-buffer)))
+(unwind-protect
+(progn
+  ;; Do not throw error in dedicated windows.
+  (set-window-dedicated-p nil nil)
+  (set-window-buffer nil (current-buffer))
+  (car (window-text-pixel-size
+nil (line-beginning-position) 
(point-max
+  (set-window-buffer nil oldbuffer)
+  (set-window-dedicated-p nil dedicatedp)))
   (if pixels
   pixel-width
 (/ pixel-width symbol-width)))



[elpa] externals/hiddenquote 1afa4bc748: Support searching words inside definitions

2022-11-05 Thread ELPA Syncer
branch: externals/hiddenquote
commit 1afa4bc748aaaec35dca13e650bd524abbdbfc29
Author: Mauro Aranda 
Commit: Mauro Aranda 

Support searching words inside definitions

* hiddenquote.el (hiddenquote-search-word): New command.
(hiddenquote-mode-map): Bind it.
(hiddenquote-syllable-notify): Print a message when the user completes
the puzzle.
---
 hiddenquote.el | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/hiddenquote.el b/hiddenquote.el
index ed22d637b0..4382c9cf1b 100644
--- a/hiddenquote.el
+++ b/hiddenquote.el
@@ -286,6 +286,7 @@ to the syllables buffer."
 (define-key map "\C-p" #'hiddenquote-prev)
 (define-key map [up] #'hiddenquote-prev)
 (define-key map [(meta ?g) (meta ?g)] #'hiddenquote-goto-word)
+(define-key map [(meta ?g) (control ?s)] #'hiddenquote-search-word)
 ;; Done.
 (define-key map [(control ?x) (control ?s)] #'hiddenquote-save)
 (define-key map [(control ?x) ?!] #'hiddenquote-give-up)
@@ -1114,7 +1115,8 @@ Return `hiddenquote-used-syllable' if WIDGET's value is 
non-nil,
 (defun hiddenquote-syllable-notify (_widget _child &optional _event)
   "Check if all syllables are marked as used."
   (when (hiddenquote-puzzle-complete-p)
-(hiddenquote-timer-stop-timer)))
+(hiddenquote-timer-stop-timer)
+(message "Congratulations, you won!")))
 
 ;; Functions.
 (defun hiddenquote--get-quote-length ()
@@ -1562,6 +1564,17 @@ every word."
   (widget-get (widget-get parent :parent)
   :buttons)
 
+(defun hiddenquote-search-word (word)
+  "Search for presence of the string WORD in a definition and go to that word."
+  (interactive (list (read-string "Word: ")))
+  (let* ((clues (oref (widget-get hiddenquote-current :hiddenquote) clues))
+ (re (concat "\\<" (regexp-quote word) "\\>"))
+ (def (seq-position clues word (lambda (clue _word)
+ (string-match re (cadr clue))
+(if def
+(hiddenquote-goto-word (1+ def))
+  (message "No definition contains that word"
+
 (defun hiddenquote-toggle-automatic-check ()
   "Toggle the `hiddenquote-automatic-check' variable."
   (interactive)



[elpa] externals/detached 8be0a4827c 1/2: Add edit-and-run command

2022-11-05 Thread ELPA Syncer
branch: externals/detached
commit 8be0a4827cc112c861b2e55ceea83bf5c4e92a69
Author: Niklas Eklund 
Commit: Niklas Eklund 

Add edit-and-run command

This command makes it possible to rerun a session, but first edit the
command in case it should be tweaked.
---
 CHANGELOG.org|  2 ++
 detached-list.el | 21 +
 detached.el  | 20 
 3 files changed, 43 insertions(+)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 1c212733a0..5aac39f27a 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -4,6 +4,8 @@
 
 * Development
 
+- Add =edit-and-run= command, which is convenient when a session command needs 
to be tweaked before re-running.
+  
 * Version 0.9.2 (2022-11-01)
 
 - Use =display-buffer= in =detached-list= in order for users to more easily 
customize the display of the buffer.
diff --git a/detached-list.el b/detached-list.el
index c0002da400..e206dcd383 100644
--- a/detached-list.el
+++ b/detached-list.el
@@ -222,6 +222,26 @@ Optionally DELETE the session if prefix-argument is 
provided."
  detached-list-open-session-display-buffer-action))
 (detached-view-dwim session)))
 
+(defun detached-list-edit-and-run-session (session &optional 
toggle-suppress-output)
+  "Edit and run SESSION at point.
+
+Optionally TOGGLE-SUPPRESS-OUTPUT."
+  (interactive
+   (list (tabulated-list-get-id)
+ current-prefix-arg))
+  (let ((detached-session-mode
+ (if toggle-suppress-output
+ (if (eq 'create (detached--session-initial-mode session))
+ 'create-and-attach
+   'create)
+   (detached--session-initial-mode session
+(unless (eq detached-session-mode 'create)
+  (when-let ((single-window (> (length (window-list)) 1))
+ (buffer (current-buffer)))
+(delete-window (get-buffer-window))
+(bury-buffer buffer)))
+(detached-edit-and-run-session session)))
+
 (defun detached-list-rerun-session (session &optional toggle-suppress-output)
   "Rerun SESSION at point.
 
@@ -863,6 +883,7 @@ If prefix-argument is provided unmark instead of mark."
   (let ((map (make-sparse-keymap)))
 (define-key map (kbd "a") #'detached-list-edit-annotation)
 (define-key map (kbd "d") #'detached-list-delete-session)
+(define-key map (kbd "e") #'detached-list-edit-and-run-session)
 (define-key map (kbd "f") #'detached-list-select-filter)
 (define-key map (kbd "g") #'detached-list-revert)
 (define-key map (kbd "i") #'detached-list-initialize-session-directory)
diff --git a/detached.el b/detached.el
index f50908b7b7..33732b8998 100644
--- a/detached.el
+++ b/detached.el
@@ -462,6 +462,26 @@ The session is compiled by opening its output and enabling
 (select-window
  (display-buffer buffer-name 
detached-open-session-display-buffer-action))
 
+;;;###autoload
+(defun detached-edit-and-run-session (session &optional suppress-output)
+  "Edit SESSION and run, optionally SUPPRESS-OUTPUT."
+  (interactive
+   (list (detached-completing-read (detached-get-sessions))
+ current-prefix-arg))
+  (when (detached-valid-session session)
+(let* ((default-directory
+ (detached--session-working-directory session))
+   (detached-session-mode (or detached-session-mode
+  (detached--session-initial-mode 
session)))
+   (detached-session-action (detached--session-action session))
+   (command
+(read-string "Edit command: " (detached--session-command 
session
+  (if suppress-output
+  (detached-start-session command suppress-output)
+(if-let ((run-fun (plist-get (detached--session-action session) :run)))
+(funcall run-fun command)
+  (detached-start-session command))
+
 ;;;###autoload
 (defun detached-rerun-session (session &optional suppress-output)
   "Rerun SESSION, optionally SUPPRESS-OUTPUT."



[elpa] externals/detached 4be2dd4f4c 2/2: Whitespace removal

2022-11-05 Thread ELPA Syncer
branch: externals/detached
commit 4be2dd4f4c7203c70742f00988e0a8b1619b55bf
Author: Niklas Eklund 
Commit: Niklas Eklund 

Whitespace removal
---
 CHANGELOG.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index 5aac39f27a..e551353fe7 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -5,7 +5,7 @@
 * Development
 
 - Add =edit-and-run= command, which is convenient when a session command needs 
to be tweaked before re-running.
-  
+
 * Version 0.9.2 (2022-11-01)
 
 - Use =display-buffer= in =detached-list= in order for users to more easily 
customize the display of the buffer.



[elpa] externals/detached updated (6415d90f82 -> 4be2dd4f4c)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch externals/detached.

  from  6415d90f82 Update detached version to 0.9.2
   new  8be0a4827c Add edit-and-run command
   new  4be2dd4f4c Whitespace removal


Summary of changes:
 CHANGELOG.org|  2 ++
 detached-list.el | 21 +
 detached.el  | 20 
 3 files changed, 43 insertions(+)



[elpa] branch work/gnat-compiler created (now 178098364e)

2022-11-05 Thread Stephen Leake
stephen_leake pushed a change to branch work/gnat-compiler.

at  178098364e * ELPA.make: New file

No new revisions were added by this update.



[elpa] externals/detached ea590ba0b8: Replace build-package script with Makefile

2022-11-05 Thread ELPA Syncer
branch: externals/detached
commit ea590ba0b84d8ad2e772fb8f15ece88d09b03d40
Author: Niklas Eklund 
Commit: Niklas Eklund 

Replace build-package script with Makefile
---
 .build.yml |  3 ++-
 .dir-locals.el |  2 +-
 Makefile   | 17 +
 build-package  | 14 --
 4 files changed, 20 insertions(+), 16 deletions(-)

diff --git a/.build.yml b/.build.yml
index 90c2325a67..9bb1e0d0d2 100644
--- a/.build.yml
+++ b/.build.yml
@@ -3,9 +3,10 @@ packages:
 - dtach
 - emacs-minimal
 - texinfo
+- make
 environment:
   project: detached.el
 tasks:
 - guix: |
 cd $project
-./build-package
+make all
diff --git a/.dir-locals.el b/.dir-locals.el
index 50a4c2976f..b7ef2fcc84 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -1,3 +1,3 @@
-((nil . ((compile-command . "guix shell bash emacs-minimal git texinfo -- 
./build-package")))
+((nil . ((compile-command . "guix shell bash emacs-minimal git texinfo -- make 
all")))
  (prog-mode (eval flymake-mode))
  (magit-status-mode (magit-todos-exclude-globs)))
diff --git a/Makefile b/Makefile
new file mode 100644
index 00..a066eaa06f
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,17 @@
+byte-compile:
+   emacs --batch --load=detached.el --eval='(progn (setq 
byte-compile-error-on-warn t) (batch-byte-compile))' ./*.el
+
+autoloads:
+   emacs --batch --eval='(progn (setq make-backup-files nil) 
(make-directory-autoloads default-directory "detached-autoloads.el"))'
+
+tests:
+   emacs --batch --load=detached.el --load=test/detached-test.el 
--funcall=ert-run-tests-batch-and-exit
+
+docs:
+   emacs --batch --eval='(progn (setq make-backup-files nil) (find-file 
"doc/detached.org") (org-texinfo-export-to-info))'
+
+clean:
+   rm *.elc
+   rm doc/*.texi
+
+all: byte-compile autoloads tests docs clean
diff --git a/build-package b/build-package
deleted file mode 100755
index 9d1c9ef327..00
--- a/build-package
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-# ; -*- mode: sh;-*-
-
-# 1) Byte compile
-emacs --batch --load=detached.el -f batch-byte-compile ./*.el
-
-# 2) Make autoloads
-emacs --batch --eval='(progn (setq make-backup-files nil) 
(make-directory-autoloads default-directory "detached-autoloads.el"))'
-
-# 3) Run tests
-emacs --batch --load=detached.el --load=test/detached-test.el 
--funcall=ert-run-tests-batch-and-exit
-
-# 4) Generate info manual
-emacs --batch --eval='(progn (setq make-backup-files nil) (find-file 
"doc/detached.org") (org-texinfo-export-to-info))'



[elpa] main 6b2f1634f3: elpa-packages (triples): New package

2022-11-05 Thread Stefan Monnier via
branch: main
commit 6b2f1634f3bb5f2a37f67caa3e3b44391b093f35
Author: Stefan Monnier 
Commit: Stefan Monnier 

elpa-packages (triples): New package

(assess, m-buffer): Temporarily comment them out since the tarballs
always fail to build anyway.
---
 elpa-packages | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/elpa-packages b/elpa-packages
index 53a77abc9d..412e2668be 100644
--- a/elpa-packages
+++ b/elpa-packages
@@ -62,9 +62,10 @@
  ("ampc"   :url nil)
  ("arbitools"  :url nil)
  ("ascii-art-to-unicode" :url nil)
- ("assess" :url "https://github.com/phillord/assess";
-  :doc "assess-doc.org"
-  :auto-sync t)
+ ;; FIXME: Need to fix the manual's build problem.
+ ;; ("assess"  :url "https://github.com/phillord/assess";
+ ;;  :doc "assess-doc.org"
+ ;;  :auto-sync t)
  ("async"  :url "https://github.com/jwiegley/emacs-async";
   :ignored-files ("COPYING")
   :auto-sync t)
@@ -453,9 +454,10 @@
  ("lv" :url "https://github.com/abo-abo/hydra";
   :ignored-files ("hydra*" "README.md" "doc" "targets")
   :auto-sync t)
- ("m-buffer"   :url "https://github.com/phillord/m-buffer-el";
-  :doc "m-buffer-doc.org"
-  :auto-sync t)
+ ;; FIXME: Need to fix the manual's build problem.
+ ;; ("m-buffer":url "https://github.com/phillord/m-buffer-el";
+ ;;  :doc "m-buffer-doc.org"
+ ;;  :auto-sync t)
  ("map" :core "lisp/emacs-lisp/map.el")
  ("marginalia" :url "https://github.com/minad/marginalia";
   :doc "README.org"
@@ -752,9 +754,9 @@
   :doc "docs/transient.texi")
  ("transient-cycles":url nil)
  ("trie"   :url "http://www.dr-qubit.org/git/predictive.git";)
- ;; FIXME: Depends on `emacsql` which is on its way to NonGNU ELPA.
- ;;("triples"  :url "https://github.com/ahyatt/triples";
- ;; :auto-sync t)
+ ("triples":url "https://github.com/ahyatt/triples";
+  :readme "README.org"
+  :auto-sync t)
  ;; FIXME: Waiting for copyright cleanups.
  ;;("trinary"  :url "https://github.com/emacs-elsa/trinary-logic";
  ;; :auto-sync t)



[elpa] externals/triples 2dae3d49b9 18/19: Various fixes for emacsql code, which wasn't being tested correctly.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 2dae3d49b9e0846f63a64eae19a5fe0facd7a3aa
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Various fixes for emacsql code, which wasn't being tested correctly.
---
 triples-test.el | 52 ++--
 triples.el  | 92 -
 2 files changed, 81 insertions(+), 63 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index a9c635218c..04217193e9 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -30,11 +30,11 @@ easily debug into it.")
 (sql-sqlite (format "*schema test db SQL %s*" triples-test-db-file
 
 (defun triples-test-insert (mode)
-  (let ((triples--sqlite-interface mode))
+  (let ((triples-sqlite-interface mode))
 (triples-test-with-temp-db
   (triples--insert db "sub" 'pred "obj")
-  (should (equal (triples--select db)
- '(("sub" pred "obj" nil
+  (should (equal (mapcar (lambda (row) (seq-take row 3)) (triples--select 
db))
+ '(("sub" pred "obj"
   ;; Test that we actually are storing with builtin something compatible
   ;; with emacsql.
   (when (eq mode 'builtin)
@@ -50,11 +50,15 @@ easily debug into it.")
   (should-error (triples--insert db "sub" "pred" "obj"))
   (should-error (triples--insert db "sub" 'pred "obj" '(ordinary-list)))
   (should-error (triples--insert db "sub" 'pred "obj" "string"))
-  ;; Test that we can have symbol subject and objects
+  ;; Test that we can have symbol subject and objects.
   (triples--insert db 'sub 'pred 'obj)
   (should (equal
-   (triples--select db 'sub)
-   '((sub pred obj nil)))
+   (mapcar (lambda (row) (seq-take row 3)) (triples--select db 
'sub))   
+   '((sub pred obj
+  ;; Test that properties aren't strings. They happen to be stored
+  ;; differently for each system due to differences in how the inserting
+  ;; interface works.
+  (should (plistp (nth 3 (car (triples--select db 'sub
 
 (ert-deftest triples-test-insert-builtin ()
   (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
@@ -65,7 +69,7 @@ easily debug into it.")
   (triples-test-insert 'emacsql))
 
 (defun triples-test-delete (mode)
-  (let ((triples--sqlite-interface mode))
+  (let ((triples-sqlite-interface mode))
 (triples-test-with-temp-db
  (triples--insert db 1 'pred 2)
  (triples--insert db 2 'pred 1)
@@ -88,7 +92,7 @@ easily debug into it.")
   (triples-test-delete 'emacsql))
 
 (defun triples-test-delete-subject-predicate-prefix (mode)
-  (let ((triples--sqlite-interface mode))
+  (let ((triples-sqlite-interface mode))
 (triples-test-with-temp-db
  (triples--insert db 1 'test/foo 2)
  (triples--insert db 1 'bar/bar 1)
@@ -107,17 +111,19 @@ easily debug into it.")
   (triples-test-delete-subject-predicate-prefix 'emacsql))
 
 (defun triples-test-select (mode)
-  (let ((triples--sqlite-interface mode))
+  (let ((triples-sqlite-interface mode))
 (triples-test-with-temp-db
- (triples--insert db 1 'pred 2 '(:a 1))
- (let ((expected '((1 pred 2 (:a 1)
-   (should (equal (triples--select db 1) expected))
-   (should (equal (triples--select db nil 'pred) expected))
-   (should (equal (triples--select db nil nil 2) expected))
-   (should (equal (triples--select db 1 nil 2) expected))
-   (should (equal (triples--select db 1 'pred 2) expected))
-   (should (equal '((1)) (triples--select db 1 nil nil nil '(subject
-   (should (equal '((1 pred)) (triples--select db 1 nil nil nil '(subject 
predicate
+  (when (eq mode 'emacsql)
+  (emacsql-enable-debugging db))
+  (triples--insert db 1 'pred 2 '(:a 1))
+  (let ((expected '((1 pred 2 (:a 1)
+(should (equal (triples--select db 1) expected))
+(should (equal (triples--select db nil 'pred) expected))
+(should (equal (triples--select db nil nil 2) expected))
+(should (equal (triples--select db 1 nil 2) expected))
+(should (equal (triples--select db 1 'pred 2) expected))
+(should (equal '((1)) (triples--select db 1 nil nil nil '(subject
+(should (equal '((1 pred)) (triples--select db 1 nil nil nil '(subject 
predicate
 
 (ert-deftest triples-test-select-builtin ()
   (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
@@ -128,7 +134,7 @@ easily debug into it.")
   (triples-test-select 'emacsql))
 
 (defun triples-test-select-with-pred-prefix (mode)
-  (let ((triples--sqlite-interface mode))
+  (let ((triples-sqlite-interface mode))
 (triples-test-with-temp-db
  (triples--insert db 'sub1 'pred/foo 'obj)
  (triples--insert db 'sub1 'pred/bar 'obj)
@@ -146,11 +152,13 @@ easily debug into it.")
   (triples-test-select 'emacsql))
 
 (defun triples-test-select-predicate-object-fragment (mode)
-  (let ((triples--sqlite-i

[elpa] externals/triples 6afcb290ca 15/19: Support both emacs 29 sqlite and emacsql.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 6afcb290ca87934fb230789e3c99c64a4002ecd5
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Support both emacs 29 sqlite and emacsql.
---
 README.org  |   4 +-
 triples-test.el | 204 +---
 triples.el  | 235 
 3 files changed, 295 insertions(+), 148 deletions(-)

diff --git a/README.org b/README.org
index 214e4f663f..66ab22eb64 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,6 @@
 #+TITLE: Triples
 
-The =triples= module is a standard database module designed for use in other 
emacs modules.  It works with the =sqlite= module, and provides a simple way of 
storing entities and their associated schema.  The triples module is well 
suited to graph-like applications, where links between entities are important.  
The module has wrappers for most common operations, but it is anticipated that 
occasionally client modules would need to make their own =sqlite= calls.  Many 
database can be handled [...]
+The =triples= module is a standard database module designed for use in other 
emacs modules.  It works with either the builtin sqlite in Emacs 29 or the 
[[https://github.com/magit/emacsql][emacsql]] module, and provides a simple way 
of storing entities and their associated schema.  The triples module is well 
suited to graph-like applications, where links between entities are important.  
The module has wrappers for most common operations, but it is anticipated that 
occasionally client modu [...]
 
 * Maturity
 This module is very new should be considered alpha quality.
@@ -73,7 +73,7 @@ There are other useful functions, including:
 - =triples-with-predicate=, gets all triples that is about a specific property,
 - =triples-with-predicate-object=, get all subjects whose predicate is equal 
to /object/,
 - =triples-subjects-of-type=, get all subjects which have a particular type.
-* Preciate, with type and without
+* Predicates, with type and without
 Sometimes the triples library will require predicates that are without type, 
and sometimes with type, or "combined predicates".  The rule is that if the 
type is already specified in the function, it does not need to be respecified.  
If the type is not specified, it is included in the combined predicate.
 
 When returning data, if data is from just one type, the type is not returned 
in the returned predicates.  If the data is from multiple types, the type is 
returned as combined predicates.
diff --git a/triples-test.el b/triples-test.el
index 2c9afe098d..784557fc67 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -1,7 +1,10 @@
 ;;; triples-test.el --- Tests for triples module.  -*- lexical-binding: t; -*-
+;; Note: It's important to test this on emacs 29, with emacsql installed, so we
+;; can make both types of sqlite backend work.
 (require 'triples)
 (require 'seq)
 (require 'kv)
+(require 'emacsql)
 
 ;;; Code:
 
@@ -26,86 +29,127 @@ easily debug into it.")
   (let ((sql-database triples-test-db-file))
 (sql-sqlite (format "*schema test db SQL %s*" triples-test-db-file
 
-(ert-deftest triples-test-insert ()
-  (triples-test-with-temp-db
-(triples--insert db "sub" 'pred "obj")
-;; Test for emacsql compability
-(should (equal (sqlite-select db "SELECT * FROM triples")
-   '(("\"sub\"" "pred" "\"obj\"" "()"
-;; Test that it replaces - this shouldn't result in two rows.
-(triples--insert db "sub" 'pred "obj")
-(should (equal (sqlite-select db "SELECT count(*) FROM triples")
-   '((1
-;; Test that colons in the predicate are stripped away when stored.
-(triples--insert db "sub" :test/pred "obj")
-(should (equal (sqlite-select db "SELECT count(*) FROM triples WHERE 
predicate = ?"
-  '("test/pred"))
-   '((1
-;; Test we correctly test for bad inputs.
-(should-error (triples--insert db "sub" "pred" "obj"))
-(should-error (triples--insert db "sub" 'pred "obj" '(ordinary-list)))
-(should-error (triples--insert db "sub" 'pred "obj" "string"))
-;; Test that we can have symbol subject and objects
-(triples--insert db 'sub 'pred 'obj)
-(should (equal (sqlite-select db "SELECT * FROM triples WHERE subject = ?" 
'("sub"))
-   '(("sub" "pred" "obj" "()"))
-
-(ert-deftest triples-test-delete ()
-  (triples-test-with-temp-db
-(triples--insert db 1 'pred 2)
-(triples--insert db 2 'pred 1)
-(triples--delete db 1)
-(should (equal (sqlite-select db "SELECT count(*) FROM triples")
-   '((1
-(should (equal (sqlite-select db "SELECT count(*) FROM triples WHERE 
subject = ?" '(1))
-   '((0
-(triples--insert db 1 'pred 2)
-(triples--delete db nil nil 2)
-(should (equal (sqlite-select db "SELECT count(*) FROM triples WHERE 
object = ?" '(2))
-   '((0
-(triples--insert

[elpa] externals/triples 5e8abd2989 01/19: Initial commit of triples module.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 5e8abd2989f4f9fb3e93e99269b95a51367e1e78
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Initial commit of triples module.
---
 .gitignore  |   1 +
 COPYING | 339 
 README.org  |  79 +
 triples-test.el | 193 
 triples.el  | 330 ++
 5 files changed, 942 insertions(+)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..016d3b1692
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+*.elc
\ No newline at end of file
diff --git a/COPYING b/COPYING
new file mode 100644
index 00..ecbc059373
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+con

[elpa] externals/triples aca95ba7f3 03/19: Ensure that we don't duplicate triples.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit aca95ba7f34af4395eae05e4a62b48da3207bd59
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Ensure that we don't duplicate triples.

Also, remove flakiness in tests caused by changing plist and list ordering.
---
 triples-test.el | 72 -
 triples.el  | 12 ++
 2 files changed, 54 insertions(+), 30 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index f539727cd8..e3172fa42b 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -1,6 +1,7 @@
 ;;; triples-test.el --- Tests for triples module.
 (require 'triples)
 (require 'seq)
+(require 'kv)
 
 ;;; Code:
 
@@ -46,6 +47,10 @@ easily debug into it.")
   (named schema/property alternate-names)
   (named schema/property nicknames))
 
+(defun triples-test-list-sort (list)
+  "Standard sort for LIST for test stability."
+  (sort list (lambda (a b) (string< (format "%s" a) (format "%s" b))) ))
+
 (ert-deftest triples-schema-crud ()
   (triples-test-with-temp-db
 (triples-add-schema db 'named
@@ -53,8 +58,8 @@ easily debug into it.")
 (should (equal '(:base/unique t)
(triples-properties-for-predicate db 'named/name)))
 (should (equal
- '(name alternate-names)
- (triples-predicates-for-type db 'named)
+ (triples-test-list-sort '(name alternate-names))
+ (triples-test-list-sort (triples-predicates-for-type db 
'named))
 
 (ert-deftest triples-properties-for-predicate ()
   (triples-test-with-temp-db
@@ -88,14 +93,20 @@ easily debug into it.")
 (should-error (triples-verify-schema-compliant db '(("foo" named/name 
"bar" (:index 0)
 (should (triples-verify-schema-compliant db '(("foo" named/alternate-names 
"bar" (:index 0)))
 
+(defun triples-test-plist-sort (plist)
+  "Sort PLIST in a standard way, for comparison."
+  (kvalist->plist
+   (kvalist-sort (kvplist->alist plist)
+ (lambda (a b) (string< (format "%s" a) (format "%s" b))
+
 (ert-deftest triples-crud ()
   (triples-test-with-temp-db
(triples-add-schema db 'named
'(name :unique t)
'alias)
(triples-set-type db "foo" 'named :name "Name" :alias '("alias1" "alias2"))
-   (should (equal '(:name "Name" :alias ("alias1" "alias2"))
-  (triples-get-type db "foo" 'named)))
+   (should (equal (triples-test-plist-sort '(:name "Name" :alias ("alias1" 
"alias2")))
+  (triples-test-plist-sort (triples-get-type db "foo" 
'named
(should (equal (triples-get-types db "foo") '(named)))
(should-not (triples-get-type db "bar" 'named))
(should-not (triples-get-types db "bar"))
@@ -138,16 +149,6 @@ easily debug into it.")
   (triples-get-type db "en/US" 'locale)))
(should-error (triples-set-type db "en/US" 'locale :used-in-name 
'("bar")
 
-(ert-deftest triples-with-preciate-object ()
-  (triples-test-with-temp-db
-   (triples-add-schema db 'named '(name))
-   (should-not (triples-search db 'named/name "Fred"))
-   (triples-set-type db "foo" 'named :name "My Name Is Fred Foo")
-   (triples-set-type db "bar" 'named :name "My Name Is Betty Bar")
-   (should (equal
-'(("foo" named/name "My Name Is Fred Foo" nil))
-(triples-search db 'named/name "Fred")
-
 (ert-deftest triples-with-predicate ()
   (triples-test-with-temp-db
(triples-add-schema db 'named '(name))
@@ -163,12 +164,27 @@ easily debug into it.")
 
 (ert-deftest triples-subjects-of-type ()
   (triples-test-with-temp-db
-   (triples-add-schema db 'named '(name))
-   (should-not (triples-subjects-of-type db 'named))
-   (triples-set-type db "foo" 'named :name "My Name Is Fred Foo")
-   (triples-set-type db "bar" 'named :name "My Name Is Betty Bar")
-   (should (seq-set-equal-p '("foo" "bar")
-(triples-subjects-of-type db 'named)
+(triples-add-schema db 'named '(name))
+(should-not (triples-subjects-of-type db 'named))
+(triples-set-type db "foo" 'named :name "My Name Is Fred Foo")
+(triples-set-type db "bar" 'named :name "My Name Is Betty Bar")
+(should (seq-set-equal-p '("foo" "bar")
+ (triples-subjects-of-type db 'named)
+
+(ert-deftest triples-no-dups ()
+  (triples-test-with-temp-db
+;; Just add a marker schema, no attributes
+(triples-add-schema db 'marker)
+(triples-set-type db "foo" 'marker)
+(should (equal '((1))
+(emacsql db [:select (funcall count) :from triples :where (= 
subject $s1)
+ :and (= predicate 'base/type) :and (= object 
'marker)]
+ "foo")))
+(triples-set-type db "foo" 'marker)
+(should (equal '((1))
+(emacsql db [:select (funcall count) :from triples :where (= 
subject $s1)
+ :and (= predicate 'base/type) :and (= object 
'marke

[elpa] externals/triples 8d7d3c13f4 05/19: Make the combined to and from functions public.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 8d7d3c13f4bd4c3cb3335ba8be8c17f030926eb2
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Make the combined to and from functions public.
---
 triples.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/triples.el b/triples.el
index a26c29a874..149d13cd63 100644
--- a/triples.el
+++ b/triples.el
@@ -96,7 +96,7 @@ values."
   :and (like predicate $r2)]
   (car sub-triples) (format "%s/%%" type
  (seq-uniq
-  (mapcar #'car (mapcar 
#'triples--combined-to-type-and-prop
+  (mapcar #'car (mapcar #'triples-combined-to-type-and-prop
  (mapcar #'cl-second (cdr 
sub-triples)))
  (triples--group-by-subjects (cdr op)
 (mapc (lambda (triple)
@@ -120,7 +120,7 @@ values."
 (defun triples-verify-schema-compliant (db triples)
   "Error if TRIPLES is not compliant with schema in DB."
   (mapc (lambda (triple)
-  (pcase-let ((`(,type . ,prop) (triples--combined-to-type-and-prop 
(nth 1 triple
+  (pcase-let ((`(,type . ,prop) (triples-combined-to-type-and-prop 
(nth 1 triple
 (unless (or (eq type 'base) 
 (emacsql db [:select * :from triples :where (= subject 
$s1)
  :and (= predicate 'schema/property) :and 
(= object $s2)]
@@ -179,10 +179,10 @@ PROPERTIES is a plist of properties, without TYPE 
prefixes."
  (cl-loop for e in v for i from 0
   collect
   (list subject
-(triples--type-and-prop-to-combined type 
prop)
+(triples-type-and-prop-to-combined type 
prop)
 e
 (list :index i)))
-   (list (list subject (triples--type-and-prop-to-combined 
type prop) v
+   (list (list subject (triples-type-and-prop-to-combined type 
prop) v
properties
 
 (defun triples-get-type (db subject type)
@@ -197,7 +197,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
:and (like predicate $r2)] subject (format "%s/%%" 
type)))
 (append
  (cl-loop for k being the hash-keys of preds using (hash-values v)
-  nconc (list (triples--encolon (cdr 
(triples--combined-to-type-and-prop k)))
+  nconc (list (triples--encolon (cdr 
(triples-combined-to-type-and-prop k)))
   (if (and (car v)
(plist-get (cdar v) :index))
   (mapcar #'car (sort v (lambda (a b)
@@ -208,7 +208,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
   nconc
   (let ((reversed-prop (plist-get
 (triples-properties-for-predicate
- db (triples--type-and-prop-to-combined 
type pred))
+ db (triples-type-and-prop-to-combined 
type pred))
 :base/virtual-reversed)))
 (when reversed-prop
   (let ((result (emacsql db [:select subject :from triples 
:where (= object $s1)
@@ -271,13 +271,13 @@ TYPE-VALS-CONS is a list of conses, combining a type and 
a plist of values."
   "Return a list of all subjects with a particular TYPE in DB."
   (mapcar #'car (triples-subjects-with-predicate-object db 'base/type type)))
 
-(defun triples--combined-to-type-and-prop (combined)
+(defun triples-combined-to-type-and-prop (combined)
   "Return cons of type and prop that form the COMBINED normal representation.
 This is something of form `:type/prop'."
   (let ((s (split-string (format "%s" combined) "/")))
 (cons (triples--decolon (nth 0 s)) (intern (nth 1 s)
 
-(defun triples--type-and-prop-to-combined (type prop)
+(defun triples-type-and-prop-to-combined (type prop)
   (intern (format "%s/%s" (triples--decolon type) (triples--decolon prop
 
 (defun triples--plist-mapc (fn plist)



[elpa] externals/triples d17b3d6e17 19/19: Merge branch 'combined'.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit d17b3d6e17a221d1139f6102539406e44841ca6f
Merge: cca16121d9 2dae3d49b9
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Merge branch 'combined'.

This makes the ekg package work with either Emacs 29's builtin sqlite, or 
emacsql.
---
 README.org  |   4 +-
 triples-test.el | 170 +---
 triples.el  | 345 
 3 files changed, 433 insertions(+), 86 deletions(-)

diff --git a/README.org b/README.org
index 214e4f663f..66ab22eb64 100644
--- a/README.org
+++ b/README.org
@@ -1,6 +1,6 @@
 #+TITLE: Triples
 
-The =triples= module is a standard database module designed for use in other 
emacs modules.  It works with the =sqlite= module, and provides a simple way of 
storing entities and their associated schema.  The triples module is well 
suited to graph-like applications, where links between entities are important.  
The module has wrappers for most common operations, but it is anticipated that 
occasionally client modules would need to make their own =sqlite= calls.  Many 
database can be handled [...]
+The =triples= module is a standard database module designed for use in other 
emacs modules.  It works with either the builtin sqlite in Emacs 29 or the 
[[https://github.com/magit/emacsql][emacsql]] module, and provides a simple way 
of storing entities and their associated schema.  The triples module is well 
suited to graph-like applications, where links between entities are important.  
The module has wrappers for most common operations, but it is anticipated that 
occasionally client modu [...]
 
 * Maturity
 This module is very new should be considered alpha quality.
@@ -73,7 +73,7 @@ There are other useful functions, including:
 - =triples-with-predicate=, gets all triples that is about a specific property,
 - =triples-with-predicate-object=, get all subjects whose predicate is equal 
to /object/,
 - =triples-subjects-of-type=, get all subjects which have a particular type.
-* Preciate, with type and without
+* Predicates, with type and without
 Sometimes the triples library will require predicates that are without type, 
and sometimes with type, or "combined predicates".  The rule is that if the 
type is already specified in the function, it does not need to be respecified.  
If the type is not specified, it is included in the combined predicate.
 
 When returning data, if data is from just one type, the type is not returned 
in the returned predicates.  If the data is from multiple types, the type is 
returned as combined predicates.
diff --git a/triples-test.el b/triples-test.el
index 9277d4a3fa..6d3adb50ab 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -1,7 +1,10 @@
 ;;; triples-test.el --- Tests for triples module.  -*- lexical-binding: t; -*-
+;; Note: It's important to test this on emacs 29, with emacsql installed, so we
+;; can make both types of sqlite backend work.
 (require 'triples)
 (require 'seq)
 (require 'kv)
+(require 'emacsql nil t)
 
 ;;; Code:
 
@@ -16,7 +19,8 @@ easily debug into it.")
  (progn 
(let ((db (triples-connect db-file)))
  (setq triples-test-db-file db-file)
- ,@body))
+ ,@body
+ (triples-close db)))
(delete-file db-file
 
 (defun triples-test-connect-db ()
@@ -25,6 +29,148 @@ easily debug into it.")
   (let ((sql-database triples-test-db-file))
 (sql-sqlite (format "*schema test db SQL %s*" triples-test-db-file
 
+(defun triples-test-insert (mode)
+  (let ((triples-sqlite-interface mode))
+(triples-test-with-temp-db
+  (triples--insert db "sub" 'pred "obj")
+  (should (equal (mapcar (lambda (row) (seq-take row 3)) (triples--select 
db))
+ '(("sub" pred "obj"
+  ;; Test that we actually are storing with builtin something compatible
+  ;; with emacsql.
+  (when (eq mode 'builtin)
+(should (equal (sqlite-select db "SELECT * FROM triples")
+   '(("\"sub\"" "pred" "\"obj\"" "()")
+  ;; Test that it replaces - this shouldn't result in two rows.
+  (triples--insert db "sub" 'pred "obj")
+  (should (= (length (triples--select db)) 1))
+  ;; Test that colons in the predicate are stripped away when stored.
+  (triples--insert db "sub" :test/pred "obj")
+  (should (= (length (triples--select db nil 'test/pred)) 1))
+  ;; Test we correctly test for bad inputs.
+  (should-error (triples--insert db "sub" "pred" "obj"))
+  (should-error (triples--insert db "sub" 'pred "obj" '(ordinary-list)))
+  (should-error (triples--insert db "sub" 'pred "obj" "string"))
+  ;; Test that we can have symbol subject and objects.
+  (triples--insert db 'sub 'pred 'obj)
+  (should (equal
+   (mapcar (lambda (row) (seq-take row 3)) (triples--select db 
'sub))   
+   '((sub pred obj
+  ;; Test that properties aren't strin

[elpa] externals/triples 4627d6ed6d 10/19: Fix minor mistakes in ert tests.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 4627d6ed6d32acc2dfb9887d30ec38e6853b4525
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Fix minor mistakes in ert tests.
---
 triples-test.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index 4a38d42ed0..d94c1e54ec 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -102,7 +102,7 @@ easily debug into it.")
 (ert-deftest triples-crud ()
   (triples-test-with-temp-db
(triples-add-schema db 'named
-   '(name :unique t)
+   '(name :base/unique t)
'alias)
(triples-set-type db "foo" 'named :name "Name" :alias '("alias1" "alias2"))
(should (equal (triples-test-plist-sort '(:name "Name" :alias ("alias1" 
"alias2")))
@@ -117,8 +117,8 @@ easily debug into it.")
 (ert-deftest triples-crud-all ()
   (triples-test-with-temp-db
 (triples-add-schema db 'named
-'(name :unique t))
-(triples-add-schema db 'positioned '(position :unique t))
+'(name :base/unique t))
+(triples-add-schema db 'positioned '(position :/base/unique t))
 (should-not (triples-get-subject db "foo"))
 (triples-set-subject db "foo"
  '(named :name "bar")
@@ -131,7 +131,7 @@ easily debug into it.")
 (ert-deftest triples-set-types ()
   (triples-test-with-temp-db
 (triples-add-schema db 'named
-   '(name :unique t)
+'(name :/base/unique t)
'alias)
 (triples-add-schema db 'reachable 'phone)
 (triples-set-type db "foo" 'named :name "Name" :alias '("alias1" "alias2"))
@@ -149,8 +149,8 @@ easily debug into it.")
 (ert-deftest triples-reversed ()
   (triples-test-with-temp-db
(triples-add-schema db 'named
-   '(name :unique t)
-   '(locale :unique t))
+   '(name :base/unique t)
+   '(locale :base/unique t))
(triples-add-schema db 'locale
'(used-in-name :base/virtual-reversed named/locale))
(triples-set-type db "en/US" 'locale nil)



[elpa] branch externals/triples created (now d17b3d6e17)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch externals/triples.

at  d17b3d6e17 Merge branch 'combined'.

This branch includes the following new commits:

   new  5e8abd2989 Initial commit of triples module.
   new  7d5aca3bb8 Fix issue where single element lists were not being 
treated as lists.
   new  aca95ba7f3 Ensure that we don't duplicate triples.
   new  ad6e329540 Fix for ert tests broken by the last commit.
   new  8d7d3c13f4 Make the combined to and from functions public.
   new  6f8f3376f1 Add `triples-set-types'.
   new  cc5629fe5c Wrap all database access in `triples-set-types' in a 
transaction.
   new  257de87fdc Minor code cleanup.
   new  fdbbd5f61d Added package-requires.
   new  4627d6ed6d Fix minor mistakes in ert tests.
   new  cef7ad3a81 Remove emacs requirement for now.
   new  fb63dfe44a Convert to sqlite.
   new  cca16121d9 Fix bugs in `triples-remove-type'.
   new  d82cc1d6b8 Finish basic sqlite layer, and fix everything so tests 
work.
   new  6afcb290ca Support both emacs 29 sqlite and emacsql.
   new  3593f55dfb Support numbers stored via emacsql.
   new  0252dad7d1 Fixes from code review from Stefan Monnier.
   new  2dae3d49b9 Various fixes for emacsql code, which wasn't being 
tested correctly.
   new  d17b3d6e17 Merge branch 'combined'.




[elpa] externals/triples fdbbd5f61d 09/19: Added package-requires.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit fdbbd5f61dcab71cef1b19ef29d717e8aea05047
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Added package-requires.
---
 triples.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/triples.el b/triples.el
index f1573a143e..d79fe865f0 100644
--- a/triples.el
+++ b/triples.el
@@ -4,6 +4,7 @@
 
 ;; Author: Andrew Hyatt 
 ;; Homepage: https://github.com/ahyatt/triples
+;; Package-Requires: ((emacsql "3.0.0") (emacs "29") cl-lib (seq "2.0"))
 ;; Keywords: triples, kg
 ;; Version: 0.0
 ;; This program is free software; you can redistribute it and/or



[elpa] externals/triples 7d5aca3bb8 02/19: Fix issue where single element lists were not being treated as lists.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 7d5aca3bb862c364420a6e4d32805b4e96085408
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Fix issue where single element lists were not being treated as lists.
---
 triples-test.el | 7 +++
 triples.el  | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/triples-test.el b/triples-test.el
index 9689a9e65e..f539727cd8 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -117,6 +117,13 @@ easily debug into it.")
 (triples-delete-subject db "foo")
 (should-not (triples-get-subject db "foo"
 
+(ert-deftest triples-single-element ()
+  (triples-test-with-temp-db
+   (triples-add-schema db 'named 'name)
+   (triples-set-type db "foo" 'named :name '("Name"))
+   (should (equal '(:name ("Name"))
+  (triples-get-type db "foo" 'named)
+
 (ert-deftest triples-reversed ()
   (triples-test-with-temp-db
(triples-add-schema db 'named
diff --git a/triples.el b/triples.el
index e8c95dd75e..66d2c994b7 100644
--- a/triples.el
+++ b/triples.el
@@ -194,7 +194,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
 (append
  (cl-loop for k being the hash-keys of preds using (hash-values v)
   nconc (list (triples--encolon (cdr 
(triples--combined-to-type-and-prop k)))
-  (if (and (cdr v)
+  (if (and (car v)
(plist-get (cdar v) :index))
   (mapcar #'car (sort v (lambda (a b)
   (< (plist-get (cdr a) 
:index)



[elpa] externals/triples cc5629fe5c 07/19: Wrap all database access in `triples-set-types' in a transaction.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit cc5629fe5cad5a8df67befa5fd65e20d90564345
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Wrap all database access in `triples-set-types' in a transaction.
---
 triples.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/triples.el b/triples.el
index c825bf..95cbbe0f2d 100644
--- a/triples.el
+++ b/triples.el
@@ -181,8 +181,9 @@ given in the COMBINED-PROPS will be removed."
   (plist-put (gethash (triples--decolon type) type-to-plist)
  (triples--encolon prop) val) type-to-plist)))
  combined-props)
-(cl-loop for k being the hash-keys of type-to-plist using (hash-values v)
- do (apply #'triples-set-type db subject k v
+(emacsql-with-transaction db
+  (cl-loop for k being the hash-keys of type-to-plist using (hash-values v)
+   do (apply #'triples-set-type db subject k v)
 
 (defun triples--set-type-op (subject type properties)
   "Create operation to replace PROPERTIES for TYPE for SUBJECT.



[elpa] externals/triples 6f8f3376f1 06/19: Add `triples-set-types'.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 6f8f3376f1e4df17a3113f88b41864556a25d7da
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Add `triples-set-types'.

This is an form useful for those who have many properties of different 
types to
set all at once, replacing those types completely.
---
 triples-test.el | 11 +++
 triples.el  | 16 
 2 files changed, 27 insertions(+)

diff --git a/triples-test.el b/triples-test.el
index f7e1b8f456..85a747966e 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -128,6 +128,17 @@ easily debug into it.")
 (triples-delete-subject db "foo")
 (should-not (triples-get-subject db "foo"
 
+(ert-deftest triples-set-types ()
+  (triples-test-with-temp-db
+(triples-add-schema db 'named
+   '(name :unique t)
+   'alias)
+(triples-add-schema db 'reachable 'phone)
+(triples-set-type db "foo" 'named :name "Name" :alias '("alias1" "alias2"))
+(triples-set-types db "foo" :named/name "New Name" :reachable/phone 
'("867-5309"))
+(should (equal (triples-test-plist-sort '(:named/name "New Name" 
:reachable/phone ("867-5309")))
+   (triples-test-plist-sort (triples-get-subject db "foo"))
+
 (ert-deftest triples-single-element ()
   (triples-test-with-temp-db
(triples-add-schema db 'named 'name)
diff --git a/triples.el b/triples.el
index 149d13cd63..c825bf 100644
--- a/triples.el
+++ b/triples.el
@@ -168,6 +168,22 @@ PROPERTIES is a plist of properties, without TYPE 
prefixes."
 (triples-verify-schema-compliant db (cdr op))
 (triples--add db op)))
 
+(defun triples-set-types (db subject &rest combined-props)
+  "Set all data for types in COMBINED-PROPS in DB for SUBJECT.
+COMBINED-PROPS is a plist which takes combined properties such as
+:named/name and their values. All other data related to the types
+given in the COMBINED-PROPS will be removed."
+  (let ((type-to-plist (make-hash-table)))
+(triples--plist-mapc
+ (lambda (cp val)
+   (pcase-let ((`(,type . ,prop) (triples-combined-to-type-and-prop cp)))
+ (puthash (triples--decolon type)
+  (plist-put (gethash (triples--decolon type) type-to-plist)
+ (triples--encolon prop) val) type-to-plist)))
+ combined-props)
+(cl-loop for k being the hash-keys of type-to-plist using (hash-values v)
+ do (apply #'triples-set-type db subject k v
+
 (defun triples--set-type-op (subject type properties)
   "Create operation to replace PROPERTIES for TYPE for SUBJECT.
 PROPERTIES is a plist of properties, without TYPE prefixes."



[elpa] externals/triples 257de87fdc 08/19: Minor code cleanup.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 257de87fdc0221baf3f945d958b01e4c07c7d33b
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Minor code cleanup.

Ran checkdoc and added lexical binding.
---
 triples-test.el |  2 +-
 triples.el  | 20 +++-
 2 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index 85a747966e..4a38d42ed0 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -1,4 +1,4 @@
-;;; triples-test.el --- Tests for triples module.
+;;; triples-test.el --- Tests for triples module.  -*- lexical-binding: t; -*-
 (require 'triples)
 (require 'seq)
 (require 'kv)
diff --git a/triples.el b/triples.el
index 95cbbe0f2d..f1573a143e 100644
--- a/triples.el
+++ b/triples.el
@@ -1,5 +1,4 @@
-;;; triples.el --- This package provides a triple-based database, as well as
-;;; functions to store, retrieve, and modify the information it contains.
+;;; triples.el --- A flexible triple-based database for us in apps.  -*- 
lexical-binding: t; -*-
 
 ;; Copyright (c) 2022  Free Software Foundation, Inc.
 
@@ -30,8 +29,10 @@
 (require 'emacsql)
 (require 'seq)
 
+;;; Code:
+
 (defun triples-connect (file)
-  "Connect to the database and make sure it is populated."
+  "Connect to the database FILE and make sure it is populated."
   (let* ((db (emacsql-sqlite3 file))
  (triple-table-exists
   (emacsql db [:select name
@@ -106,7 +107,7 @@ values."
   (cdr op)))
 
 (defun triples-properties-for-predicate (db cpred)
-  "Return the properties for combined predicate CPRED as a plist."
+  "Return the properties in DB for combined predicate CPRED as a plist."
   (mapcan (lambda (row)
 (list (intern (format ":%s" (nth 1 row))) (nth 2 row)))
   (emacsql db [:select * :from triples :where (= subject $s1)] cpred)))
@@ -121,11 +122,11 @@ values."
   "Error if TRIPLES is not compliant with schema in DB."
   (mapc (lambda (triple)
   (pcase-let ((`(,type . ,prop) (triples-combined-to-type-and-prop 
(nth 1 triple
-(unless (or (eq type 'base) 
+(unless (or (eq type 'base)
 (emacsql db [:select * :from triples :where (= subject 
$s1)
  :and (= predicate 'schema/property) :and 
(= object $s2)]
  type prop))
-  (error "Property %s not found in schema." (nth 1 triple)
+  (error "Property %s not found in schema" (nth 1 triple)
 triples)
   (mapc (lambda (triple)
   (triples--plist-mapc (lambda (pred-prop val)
@@ -209,7 +210,7 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
 (puthash (nth 1 db-triple)
  (cons (cons (nth 2 db-triple) (nth 3 db-triple))
(gethash (nth 1 db-triple) preds))
- preds)) 
+ preds))
   (emacsql db [:select * :from triples :where (= subject $s1)
:and (like predicate $r2)] subject (format "%s/%%" 
type)))
 (append
@@ -265,7 +266,7 @@ TYPE-VALS-CONS is a list of conses, combining a type and a 
plist of values."
   type-vals-cons)))
 
 (defun triples-delete-subject (db subject)
-  "Delete all data with DB as the subject."
+  "Delete all data in DB associated with SUBJECT."
   (emacsql-with-transaction db
 (emacsql db [:delete :from triples :where (= subject $s1)] subject)))
 
@@ -295,6 +296,7 @@ This is something of form `:type/prop'."
 (cons (triples--decolon (nth 0 s)) (intern (nth 1 s)
 
 (defun triples-type-and-prop-to-combined (type prop)
+  "Format TYPE and PROP to a combined format - type/prop."
   (intern (format "%s/%s" (triples--decolon type) (triples--decolon prop
 
 (defun triples--plist-mapc (fn plist)
@@ -343,7 +345,7 @@ FN must take two arguments: the key and the value."
 
 (defun triples-verify-base/virtual-reversed-compliant (_ triple)
   "Virtual reversed properties shouldn't be set manually, so are never 
compliant."
-  (error "Invalid triple found: %s, should not be setting a 
`base/virtual-reversed' property."
+  (error "Invalid triple found: %s, should not be setting a 
`base/virtual-reversed' property"
  triple))
 
 (provide 'triples)



[elpa] externals/triples cef7ad3a81 11/19: Remove emacs requirement for now.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit cef7ad3a81973f4f9416eba50e07f80d52eaeaee
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Remove emacs requirement for now.

The emacs 29 requirement was too strict; I don't know what the requirement
actually is, but I don't think I've used special emacs 29-only 
functionality.
---
 triples.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/triples.el b/triples.el
index d79fe865f0..1e52471490 100644
--- a/triples.el
+++ b/triples.el
@@ -4,8 +4,8 @@
 
 ;; Author: Andrew Hyatt 
 ;; Homepage: https://github.com/ahyatt/triples
-;; Package-Requires: ((emacsql "3.0.0") (emacs "29") cl-lib (seq "2.0"))
-;; Keywords: triples, kg
+;; Package-Requires: ((emacsql "3.0.0") cl-lib (seq "2.0"))
+;; Keywords: triples, kg, data, sqlite
 ;; Version: 0.0
 ;; This program is free software; you can redistribute it and/or
 ;; modify it under the terms of the GNU General Public License as



[elpa] externals/triples 0252dad7d1 17/19: Fixes from code review from Stefan Monnier.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 0252dad7d1ea2c92049119b89497b4ac1a9fa3c3
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Fixes from code review from Stefan Monnier.

Removed `triples-sqlite-interface' function, just used a variable.  Better
method of testing for emacsql.  Some simplifications and minor code tweaks.
---
 triples-test.el | 14 +++-
 triples.el  | 66 ++---
 2 files changed, 43 insertions(+), 37 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index 784557fc67..a9c635218c 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -4,7 +4,7 @@
 (require 'triples)
 (require 'seq)
 (require 'kv)
-(require 'emacsql)
+(require 'emacsql nil t)
 
 ;;; Code:
 
@@ -57,9 +57,11 @@ easily debug into it.")
'((sub pred obj nil)))
 
 (ert-deftest triples-test-insert-builtin ()
+  (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
   (triples-test-insert 'builtin))
 
 (ert-deftest triples-test-insert-emacsql ()
+  (skip-unless (featurep 'emacsql))
   (triples-test-insert 'emacsql))
 
 (defun triples-test-delete (mode)
@@ -78,9 +80,11 @@ easily debug into it.")
  (should (= 0 (length (triples--select db)))
 
 (ert-deftest triples-test-delete-builtin ()
+  (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
   (triples-test-delete 'builtin))
 
 (ert-deftest triples-test-delete-emacsql ()
+  (skip-unless (featurep 'emacsql))
   (triples-test-delete 'emacsql))
 
 (defun triples-test-delete-subject-predicate-prefix (mode)
@@ -95,9 +99,11 @@ easily debug into it.")
  (should (= 0 (length (triples--select db)))
 
 (ert-deftest triples-test-delete-subject-predicate-prefix-builtin ()
+  (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
   (triples-test-delete-subject-predicate-prefix 'builtin))
 
 (ert-deftest triples-test-delete-subject-predicate-prefix-emacsql ()
+  (skip-unless (featurep 'emacsql))
   (triples-test-delete-subject-predicate-prefix 'emacsql))
 
 (defun triples-test-select (mode)
@@ -114,9 +120,11 @@ easily debug into it.")
(should (equal '((1 pred)) (triples--select db 1 nil nil nil '(subject 
predicate
 
 (ert-deftest triples-test-select-builtin ()
+  (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
   (triples-test-select 'builtin))
 
 (ert-deftest triples-test-select-emacsql ()
+  (skip-unless (featurep 'emacsql))
   (triples-test-select 'emacsql))
 
 (defun triples-test-select-with-pred-prefix (mode)
@@ -130,9 +138,11 @@ easily debug into it.")
   (sub1 pred/bar obj nil
 
 (ert-deftest triples-test-select-with-pred-prefix-builtin ()
+  (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
   (triples-test-select 'builtin))
 
 (ert-deftest triples-test-select-with-pred-prefix-emacsql ()
+  (skip-unless (featurep 'emacsql))
   (triples-test-select 'emacsql))
 
 (defun triples-test-select-predicate-object-fragment (mode)
@@ -143,9 +153,11 @@ easily debug into it.")
 '((sub1 pred/foo "a whole phrase" nil)))
 
 (ert-deftest triples-test-select-predicate-object-fragment-builtin ()
+  (skip-unless (and (fboundp 'sqlite-available-p) (sqlite-available-p)))
   (triples-test-select-predicate-object-fragment 'builtin))
 
 (ert-deftest triples-test-select-predicate-object-fragment-emacsql ()
+  (skip-unless (featurep 'emacsql))
   (triples-test-select-predicate-object-fragment 'emacsql))
 
 ;; After this we don't bother testing both with emacsql and the builtin sqlite,
diff --git a/triples.el b/triples.el
index c003db4b86..b005ce381e 100644
--- a/triples.el
+++ b/triples.el
@@ -4,7 +4,7 @@
 
 ;; Author: Andrew Hyatt 
 ;; Homepage: https://github.com/ahyatt/triples
-;; Package-Requires: ((seq "2.0"))
+;; Package-Requires: ((seq "2.0") (emacs "25"))
 ;; Keywords: triples, kg, data, sqlite
 ;; Version: 0.0
 ;; This program is free software; you can redistribute it and/or
@@ -29,34 +29,31 @@
 ;; This package requires either emacs 29 or the emacsql package to be 
installed.
 
 
-(require 'cl-macs)
+(require 'cl-lib)
+(require 'package)
 (require 'seq)
 (require 'subr-x)
 
 ;;; Code:
 
-(defvar triples-sqlite-interface 'builtin
+(defvar triples-sqlite-interface
+  (if (and (fboundp 'sqlite-available-p) (sqlite-available-p))
+  'builtin
+'emacsql)
   "The interface to sqlite to use.
-Either `builtin' or `emacsql'. This only is used when the version
-is emacs 29 or greater (when builtin is available) and emacsql
-package is installed, otherwise triples will just use what is
-available.")
-
-(defun triples--sqlite-interface ()
-  "Return the sqlite interface to use.
-See the `triples-sqlite-interface' variable for more information.
-This will return either `builtin' or `emacsql'."
-  (if (and (>= emacs-major-version 29)
-   (featurep 'emacsql))
-  triples-sqlite-interface
-(if (>= emacs-m

[elpa] externals/triples d82cc1d6b8 14/19: Finish basic sqlite layer, and fix everything so tests work.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit d82cc1d6b8c2cc439dce20cf3399f96e27d0701a
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Finish basic sqlite layer, and fix everything so tests work.

Also, finish testing for the basic sqlite layer.
---
 triples-test.el | 101 ---
 triples.el  | 184 ++--
 2 files changed, 217 insertions(+), 68 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index 2844dccf96..2c9afe098d 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -26,6 +26,87 @@ easily debug into it.")
   (let ((sql-database triples-test-db-file))
 (sql-sqlite (format "*schema test db SQL %s*" triples-test-db-file
 
+(ert-deftest triples-test-insert ()
+  (triples-test-with-temp-db
+(triples--insert db "sub" 'pred "obj")
+;; Test for emacsql compability
+(should (equal (sqlite-select db "SELECT * FROM triples")
+   '(("\"sub\"" "pred" "\"obj\"" "()"
+;; Test that it replaces - this shouldn't result in two rows.
+(triples--insert db "sub" 'pred "obj")
+(should (equal (sqlite-select db "SELECT count(*) FROM triples")
+   '((1
+;; Test that colons in the predicate are stripped away when stored.
+(triples--insert db "sub" :test/pred "obj")
+(should (equal (sqlite-select db "SELECT count(*) FROM triples WHERE 
predicate = ?"
+  '("test/pred"))
+   '((1
+;; Test we correctly test for bad inputs.
+(should-error (triples--insert db "sub" "pred" "obj"))
+(should-error (triples--insert db "sub" 'pred "obj" '(ordinary-list)))
+(should-error (triples--insert db "sub" 'pred "obj" "string"))
+;; Test that we can have symbol subject and objects
+(triples--insert db 'sub 'pred 'obj)
+(should (equal (sqlite-select db "SELECT * FROM triples WHERE subject = ?" 
'("sub"))
+   '(("sub" "pred" "obj" "()"))
+
+(ert-deftest triples-test-delete ()
+  (triples-test-with-temp-db
+(triples--insert db 1 'pred 2)
+(triples--insert db 2 'pred 1)
+(triples--delete db 1)
+(should (equal (sqlite-select db "SELECT count(*) FROM triples")
+   '((1
+(should (equal (sqlite-select db "SELECT count(*) FROM triples WHERE 
subject = ?" '(1))
+   '((0
+(triples--insert db 1 'pred 2)
+(triples--delete db nil nil 2)
+(should (equal (sqlite-select db "SELECT count(*) FROM triples WHERE 
object = ?" '(2))
+   '((0
+(triples--insert db 1 'pred 2)
+(triples--delete db nil 'pred nil)
+(should (equal (sqlite-select db "SELECT count(*) FROM triples")
+   '((0))
+
+(ert-deftest triples-test-delete-subject-predicate-prefix ()
+  (triples-test-with-temp-db
+(triples--insert db 1 'test/foo 2)
+(triples--insert db 1 'bar/bar 1)
+(triples--delete-subject-predicate-prefix db 1 'test)
+(should (equal (sqlite-select db "SELECT count(*) FROM triples")
+   '((1
+;; Make sure colons are stripped.
+(triples--delete-subject-predicate-prefix db 1 :bar)
+(should (equal (sqlite-select db "SELECT count(*) FROM triples")
+   '((0))
+
+(ert-deftest triples-test-select ()
+  (triples-test-with-temp-db
+(triples--insert db 1 'pred 2 '(:a 1))
+(let ((expected '((1 pred 2 (:a 1)
+  (should (equal (triples--select db 1) expected))
+  (should (equal (triples--select db nil 'pred) expected))
+  (should (equal (triples--select db nil nil 2) expected))
+  (should (equal (triples--select db 1 nil 2) expected))
+  (should (equal (triples--select db 1 'pred 2) expected))
+  (should (equal '((1)) (triples--select db 1 nil nil nil '(subject
+  (should (equal '((1 pred)) (triples--select db 1 nil nil nil '(subject 
predicate)))
+
+(ert-deftest triples-test-select-with-pred-prefix ()
+  (triples-test-with-temp-db
+(triples--insert db 'sub1 'pred/foo 'obj)
+(triples--insert db 'sub1 'pred/bar 'obj)
+(triples--insert db 'sub2 'pred/foo 'obj)
+(should (equal (triples-test-list-sort (triples--select-pred-prefix db 
'sub1 'pred))
+   (triples-test-list-sort '((sub1 pred/foo obj nil)
+ (sub1 pred/bar obj nil)))
+
+(ert-deftest triples-test-select-predicate-object-fragment ()
+  (triples-test-with-temp-db
+(triples--insert db 'sub1 'pred/foo "a whole phrase")
+(should (equal (triples--select-predicate-object-fragment db 'pred/foo 
"whole")
+   '((sub1 pred/foo "a whole phrase" nil))
+
 (defun triples-test-op-equals (result target)
   (and (equal (car result) (car target))
(seq-set-equal-p (cdr result) (cdr target) #'equal)))
@@ -164,15 +245,15 @@ easily debug into it.")
 (ert-deftest triples-with-predicate ()
   (triples-test-with-temp-db
(triples-add-schema db 'named '(

[elpa] externals/triples ad6e329540 04/19: Fix for ert tests broken by the last commit.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit ad6e3295409e4e325d06d00bd08863c28b1f11e2
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Fix for ert tests broken by the last commit.
---
 triples-test.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index e3172fa42b..f7e1b8f456 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -156,8 +156,8 @@ easily debug into it.")
(triples-set-type db "foo" 'named :name "My Name Is Fred Foo")
(triples-set-type db "bar" 'named :name "My Name Is Betty Bar")
(should (equal
-'(("bar" named/name "My Name Is Betty Bar" nil)
-  ("foo" named/name "My Name Is Fred Foo" nil))
+'(("bar" named/name "My Name Is Betty Bar" (:empty t))
+  ("foo" named/name "My Name Is Fred Foo" (:empty t)))
 (sort (triples-with-predicate db :named/name)
   (lambda (a b)
 (string< (car a) (car b



[elpa] externals/triples fb63dfe44a 12/19: Convert to sqlite.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit fb63dfe44a27ed06cb9fe95ed41bf40d41bd35fd
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Convert to sqlite.

Change not yet finalized, this doesn't yet work.
---
 triples-test.el |  13 +++---
 triples.el  | 129 +---
 2 files changed, 83 insertions(+), 59 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index d94c1e54ec..2844dccf96 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -16,7 +16,8 @@ easily debug into it.")
  (progn 
(let ((db (triples-connect db-file)))
  (setq triples-test-db-file db-file)
- ,@body))
+ ,@body
+ (triples-close db)))
(delete-file db-file
 
 (defun triples-test-connect-db ()
@@ -188,14 +189,12 @@ easily debug into it.")
 (triples-add-schema db 'marker)
 (triples-set-type db "foo" 'marker)
 (should (equal '((1))
-(emacsql db [:select (funcall count) :from triples :where (= 
subject $s1)
- :and (= predicate 'base/type) :and (= object 
'marker)]
- "foo")))
+   (sqlite-select db "COUNT(*) FROM triples WHERE subject = ? 
AND predicate = 'base/type' AND object = 'marker'"
+  (triples-standardize-val "foo"
 (triples-set-type db "foo" 'marker)
 (should (equal '((1))
-(emacsql db [:select (funcall count) :from triples :where (= 
subject $s1)
- :and (= predicate 'base/type) :and (= object 
'marker)]
- "foo")
+   (sqlite-select db "COUNT(*) FROM triples WHERE subject = ? 
AND predicate = 'base/type' AND object = 'marker'"
+  (triples-standardize-val "foo"))
 
 (ert-deftest triples-readme ()
   (triples-test-with-temp-db
diff --git a/triples.el b/triples.el
index 1e52471490..bf9403d9ea 100644
--- a/triples.el
+++ b/triples.el
@@ -4,7 +4,7 @@
 
 ;; Author: Andrew Hyatt 
 ;; Homepage: https://github.com/ahyatt/triples
-;; Package-Requires: ((emacsql "3.0.0") cl-lib (seq "2.0"))
+;; Package-Requires: ((seq "2.0") (emacs29))
 ;; Keywords: triples, kg, data, sqlite
 ;; Version: 0.0
 ;; This program is free software; you can redistribute it and/or
@@ -27,29 +27,24 @@
 ;; provide an API offering two-way links between all information stored.
 
 (require 'cl-macs)
-(require 'emacsql)
 (require 'seq)
 
 ;;; Code:
 
 (defun triples-connect (file)
   "Connect to the database FILE and make sure it is populated."
-  (let* ((db (emacsql-sqlite3 file))
- (triple-table-exists
-  (emacsql db [:select name
-   :from sqlite_master
-   :where (= type table) :and (= name 'triples)])))
-(unless triple-table-exists
-  (emacsql db [:create-table triples ([(subject text :not-null)
-   (predicate text :not-null)
-   (object :not-null)
-   (properties)])])
-  (emacsql db [:create-index subject_idx :on triples [subject]])
-  (emacsql db [:create-index subject_predicate_idx :on triples [subject 
predicate]])
-  (emacsql db [:create-index predicate_object_idx :on triples [predicate 
object]])
-  (emacsql db [:create-unique-index 
subject_predicate_object_properties_idx :on triples [subject predicate object 
properties]]))
+  (let* ((db (sqlite-open file)))
+(sqlite-execute db "CREATE TABLE IF NOT EXISTS triples(subject TEXT NOT 
NULL, predicate TEXT NOT NULL, object TEXT, PROPERTIES TEXT NOT NULL)")
+(sqlite-execute db "CREATE INDEX IF NOT EXISTS subject_idx ON triples 
(subject)")
+(sqlite-execute db "CREATE INDEX IF NOT EXISTS subject_predicate_idx ON 
triples (subject, predicate)")
+(sqlite-execute db "CREATE INDEX IF NOT EXISTS predicate_object_idx ON 
triples (predicate, object)")
+(sqlite-execute db "CREATE INDEX IF NOT EXISTS 
subject_predicate_object_properties_idx ON triples (subject, predicate, object, 
properties)")
 db))
 
+(defun triples-close (db)
+  "Close sqlite database DB."
+  (sqlite-close db))
+
 (defun triples--ensure-property-val (vec)
   "Return a VEC has 4 elements.
 We add a bogus value as a property because we want to be able
@@ -81,52 +76,62 @@ values."
   "Add a colon to SYM."
   (intern (format ":%s" sym)))
 
+(defun triples-standardize-val (val)
+  "If VAL is a string, return it as enclosed in quotes
+This is done to have compatibility with the way emacsql stores
+values."
+  (if (stringp val)
+  (format "\"%s\"" val)
+val))
+
 (defun triples--add (db op)
   "Perform OP on DB."
   (pcase (car op)
   ('replace-subject
(mapc
 (lambda (sub)
-  (emacsql db [:delete :from triples :where (= subject $s1)] sub))
+  (sqlite-execute db "DELETE FROM TRIPLES WHERE subject = ?"
+  

[elpa] externals/triples 3593f55dfb 16/19: Support numbers stored via emacsql.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 3593f55dfbbd750737c98bbcb8d21736a630cf24
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Support numbers stored via emacsql.

Although the triples columns are all TEXT type, emacsql was able to store 
raw
numbers in them, not strings. This makes it possible to retrieve those 
numbers.
---
 triples.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/triples.el b/triples.el
index ca42b023db..c003db4b86 100644
--- a/triples.el
+++ b/triples.el
@@ -116,10 +116,13 @@ one, because sqlite cannot handle symbols."
 This imitates the way emacsql returns items, with strings
 becoming either symbols, lists, or strings depending on whether
 the string itself is wrapped in quotes."
-  (if (and (string-prefix-p "\"" result)
+  (if (and (stringp result)
+   (string-prefix-p "\"" result)
(string-suffix-p "\"" result))
   (string-remove-suffix "\"" (string-remove-prefix "\"" result))
-(read result)))
+(if (numberp result)
+result
+  (read result
 
 (defun triples--insert (db subject predicate object &optional properties)
   "Insert triple to DB: SUBJECT, PREDICATE, OBJECT with PROPERTIES.



[elpa] externals/triples cca16121d9 13/19: Fix bugs in `triples-remove-type'.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit cca16121d967fd8741a26be64bc43de8751365a5
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Fix bugs in `triples-remove-type'.

Previously, it removed all type markers, and didn't remove the actual type 
data.
Fix tests so that it caught the previous issue.
---
 triples-test.el | 14 +++---
 triples.el  |  4 ++--
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/triples-test.el b/triples-test.el
index d94c1e54ec..9277d4a3fa 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -93,6 +93,10 @@ easily debug into it.")
 (should-error (triples-verify-schema-compliant db '(("foo" named/name 
"bar" (:index 0)
 (should (triples-verify-schema-compliant db '(("foo" named/alternate-names 
"bar" (:index 0)))
 
+(defun triples-test-list-sort (list)
+  "Sort LIST in a standard way, for comparison."
+  (sort list (lambda (a b) (string< (format "%s" a) (format "%s" b)
+
 (defun triples-test-plist-sort (plist)
   "Sort PLIST in a standard way, for comparison."
   (kvalist->plist
@@ -104,15 +108,19 @@ easily debug into it.")
(triples-add-schema db 'named
'(name :base/unique t)
'alias)
+   (triples-add-schema db 'callable
+   '(phone-number :base/unique t))
(triples-set-type db "foo" 'named :name "Name" :alias '("alias1" "alias2"))
+   (triples-set-type db "foo" 'callable :phone-number "867-5309")
(should (equal (triples-test-plist-sort '(:name "Name" :alias ("alias1" 
"alias2")))
   (triples-test-plist-sort (triples-get-type db "foo" 
'named
-   (should (equal (triples-get-types db "foo") '(named)))
+   (should (equal (triples-test-list-sort (triples-get-types db "foo"))
+  (triples-test-list-sort '(callable named
(should-not (triples-get-type db "bar" 'named))
(should-not (triples-get-types db "bar"))
-   (should (equal '(named) (triples-get-types db "foo")))
(triples-remove-type db "foo" 'named)
-   (should-not (triples-get-types db "foo"
+   (should-not (triples-get-type db "foo" 'named))
+   (should (triples-get-type db "foo" 'callable
 
 (ert-deftest triples-crud-all ()
   (triples-test-with-temp-db
diff --git a/triples.el b/triples.el
index 1e52471490..9189c9f805 100644
--- a/triples.el
+++ b/triples.el
@@ -238,9 +238,9 @@ PROPERTIES is a plist of properties, without TYPE prefixes."
   "Remove TYPE for SUBJECT in DB, and all associated data."
   (emacsql-with-transaction db
 (emacsql db [:delete :from triples :where (= subject $s1)
- :and (= predicate 'base/type)] subject)
+ :and (= predicate 'base/type) :and (= object $s2)] subject 
type)
 (emacsql db [:delete :from triples :where (= subject $s1)
- :and (like $r2)] subject (format "%s/%%" type
+ :and (like predicate $r2)] subject (format "%s/%%" type
 
 (defun triples-get-types (db subject)
   "From DB, get all types for SUBJECT."



[elpa] externals/denote 37997e69ef: Fix denote-directory-files filter predicate

2022-11-05 Thread ELPA Syncer
branch: externals/denote
commit 37997e69efc915c0b8760a892910590af9c00d86
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Fix denote-directory-files filter predicate

The previous one was omitting all files in subdirectories when the
test would return nil (such as with the default value of the new
denote-excluded-directories-regexp).

Thanks to Elias Storms for reporting the regression on the GitHub
mirror: 
.
---
 denote.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index d5874d6046..40c76b0571 100644
--- a/denote.el
+++ b/denote.el
@@ -657,8 +657,11 @@ value, as explained in its doc string."
  directory-files-no-dot-files-regexp
  :include-directories
  (lambda (f)
-   (when-let ((regexp denote-excluded-directories-regexp))
- (not (string-match-p regexp f
+   (cond
+((when-let ((regexp denote-excluded-directories-regexp))
+   (not (string-match-p regexp f
+((file-readable-p f))
+(t)))
 
 (defun denote-directory-text-only-files ()
   "Return list of text files in variable `denote-directory'.



[nongnu] elpa/projectile updated (004e202a6a -> 3de6bdc2ae)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch elpa/projectile.

  from  004e202a6a Mention projectile-project-search-path more prominently
   new  3231795e92 Update projectile-root-bottom-up tests
   new  a3dbe329da Find project files bottom-up
   new  3de6bdc2ae Simplify bottom-up file checks


Summary of changes:
 CHANGELOG.md|  1 +
 projectile.el   |  8 ++--
 test/projectile-test.el | 30 +-
 3 files changed, 28 insertions(+), 11 deletions(-)



[nongnu] elpa/projectile 3de6bdc2ae 3/3: Simplify bottom-up file checks

2022-11-05 Thread ELPA Syncer
branch: elpa/projectile
commit 3de6bdc2ae6c5ce08bce3726cec936e4da5d9bad
Author: Greg Pfeil 
Commit: Bozhidar Batsov 

Simplify bottom-up file checks
---
 projectile.el | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/projectile.el b/projectile.el
index 4a4faa7651..7792e7a4c7 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1206,10 +1206,9 @@ Return the first (bottommost) matched directory or nil 
if not found."
   (projectile-locate-dominating-file
dir
(lambda (directory)
- (when (file-readable-p directory)
-   (let ((files (mapcar (lambda (file) (expand-file-name file directory))
-(or list 
projectile-project-root-files-bottom-up
- (cl-some (lambda (file) (and file (file-readable-p file))) files))
+ (let ((files (mapcar (lambda (file) (expand-file-name file directory))
+  (or list projectile-project-root-files-bottom-up
+   (cl-some (lambda (file) (and file (file-exists-p file))) files)
 
 (defun projectile-root-top-down-recurring (dir &optional list)
   "Identify a project root in DIR by recurring top-down search for files in 
LIST.



[nongnu] elpa/projectile 3231795e92 1/3: Update projectile-root-bottom-up tests

2022-11-05 Thread ELPA Syncer
branch: elpa/projectile
commit 3231795e924557111fb2867c707c81114a155653
Author: Greg Pfeil 
Commit: Bozhidar Batsov 

Update projectile-root-bottom-up tests

They should return the bottommost directory that contains a matching file, 
not
the bottommost directory for the first file matched.

Incidentally, reordered the files created for the test, so it’s easier to 
follow
the hierarchy. This also necessitated changing `projectile-test-with-files` 
so
that attempting to create a file before creating the directory that 
contains it
didn’t fail.
---
 test/projectile-test.el | 30 +-
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/test/projectile-test.el b/test/projectile-test.el
index 55d5774497..de89580a04 100644
--- a/test/projectile-test.el
+++ b/test/projectile-test.el
@@ -63,7 +63,10 @@ You'd normally combine this with 
`projectile-test-with-sandbox'."
  ,@(mapcar (lambda (file)
  (if (string-suffix-p "/" file)
  `(make-directory ,file t)
-   `(with-temp-file ,file)))
+   `(let ((dir (file-name-directory ,file)))
+  (when dir
+(make-directory dir t))
+  (with-temp-file ,file
files)
  ,@body))
 
@@ -615,25 +618,34 @@ Just delegates OPERATION and ARGS for all operations 
except for`shell-command`'.
   (it "identifies the root directory of a project by bottom-up search"
 (projectile-test-with-sandbox
  (projectile-test-with-files
-  ("projectA/.svn/"
+  ("projectA/.git/"
+   "projectA/.projectile"
+   "projectA/.svn/"
"projectA/src/.svn/"
-   "projectA/src/html/.svn/"
-   "projectA/.git/"
-   "projectA/src/html/"
-   "projectA/src/framework/lib/"
"projectA/src/framework/framework.conf"
-   "projectA/src/html/index.html"
-   "projectA/.projectile")
+   "projectA/src/framework/lib/"
+   "projectA/src/html/"
+   "projectA/src/html/.svn/"
+   "projectA/src/html/index.html")
   (expect (projectile-root-bottom-up "projectA/src/framework/lib" '(".git" 
".svn"))
+  :to-equal
+  (expand-file-name "projectA/src/"))
+  (expect (projectile-root-bottom-up "projectA/src/framework/lib" 
'(".git"))
   :to-equal
   (expand-file-name "projectA/"))
   (expect (projectile-root-bottom-up "projectA/src/html" '(".git" ".svn"))
   :to-equal
-  (expand-file-name "projectA/"))
+  (expand-file-name "projectA/src/html/"))
   (expect (projectile-root-bottom-up "projectA/src/html" '(".svn" ".git"))
   :to-equal
   (expand-file-name "projectA/src/html/"))
   (expect (projectile-root-bottom-up "projectA/src/html" '(".projectile" 
"index.html"))
+  :to-equal
+  (expand-file-name "projectA/src/html/"))
+  (expect (projectile-root-bottom-up "projectA/src/html" '("index.html" 
".projectile"))
+  :to-equal
+  (expand-file-name "projectA/src/html/"))
+  (expect (projectile-root-bottom-up "projectA/src/html" '(".projectile"))
   :to-equal
   (expand-file-name "projectA/"))
 



[nongnu] elpa/projectile a3dbe329da 2/3: Find project files bottom-up

2022-11-05 Thread ELPA Syncer
branch: elpa/projectile
commit a3dbe329daa3f2f18bd7515927a93f70634df0ee
Author: Greg Pfeil 
Commit: Bozhidar Batsov 

Find project files bottom-up

Previously, the directory it found would depend on the order of
`projectile-project-root-files-bottom-up` (or the provided list).

given a directory structure

foo
├── .a
└── bar
└── .a
└── baz
└── .b

`(projectile-root-bottom-up ".../foo/bar/baz/" '(".a" ".b"))` would return
`".../foo/bar/"`, because the current definition looks for any `".a"` 
before it
looks for ".b".

With this change, it traverses the directory structure once, looking for any
element of the list before moving up a level. So now the same call returns
`".../foo/bar/baz/"`, which matches the documented behavior of returning the
bottommost matched directory.

Fixes #1796
---
 CHANGELOG.md  | 1 +
 projectile.el | 9 +++--
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index bf391bd5c9..771475815c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@
 
 ### Bug fixed
 
+* [#1796](https://github.com/bbatsov/projectile/issues/1796): Fix 
`projectile-root-bottom-up` doesn’t always find bottom-most file
 * [#1799](https://github.com/bbatsov/projectile/pull/1799): Fix 
`projectile-open-projects` lists projects for which all buffers are closed.
 * [#1806](https://github.com/bbatsov/projectile/pull/1806): Fix 
`projectile-project-type` to return the correct project type even when we pass 
it the DIR arg. As a result of the fix,
 `projectile-expand-root`, `projectile-detect-project-type`, 
`projectile-verify-files` , `projectile-verify-file` 
`projectile-verify-file-wildcard`, `projectile-cabal-project-p`,
diff --git a/projectile.el b/projectile.el
index 4a4ee8d07c..4a4faa7651 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1203,8 +1203,13 @@ Return the first (topmost) matched directory or nil if 
not found."
   "Identify a project root in DIR by bottom-up search for files in LIST.
 If LIST is nil, use `projectile-project-root-files-bottom-up' instead.
 Return the first (bottommost) matched directory or nil if not found."
-  (cl-some (lambda (name) (projectile-locate-dominating-file dir name))
-   (or list projectile-project-root-files-bottom-up)))
+  (projectile-locate-dominating-file
+   dir
+   (lambda (directory)
+ (when (file-readable-p directory)
+   (let ((files (mapcar (lambda (file) (expand-file-name file directory))
+(or list 
projectile-project-root-files-bottom-up
+ (cl-some (lambda (file) (and file (file-readable-p file))) files))
 
 (defun projectile-root-top-down-recurring (dir &optional list)
   "Identify a project root in DIR by recurring top-down search for files in 
LIST.



[nongnu] elpa/helm updated (49c43fefa5 -> 2d318f00a8)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  49c43fefa5 Prefer icons for mode for buffers
   new  e3194ed464 Make helm-mklist working on cons cell
   new  2d318f00a8 Handle shorthands matching in helm-occur


Summary of changes:
 helm-lib.el   | 20 
 helm-occur.el | 35 +--
 2 files changed, 49 insertions(+), 6 deletions(-)



[nongnu] elpa/helm e3194ed464 1/2: Make helm-mklist working on cons cell

2022-11-05 Thread ELPA Syncer
branch: elpa/helm
commit e3194ed4645103031c60b152d4f5d5f1c3df4108
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Make helm-mklist working on cons cell

Add an implementation of proper-list-p for compatibility with older
emacs < to 27.
---
 helm-lib.el | 20 
 1 file changed, 16 insertions(+), 4 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index 2a3ddabff1..d47bc38bc0 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -399,6 +399,14 @@ available APPEND is ignored."
 (defun helm-subr-native-elisp-p (object)
   (when (fboundp 'subr-native-elisp-p)
   (subr-native-elisp-p object)))
+
+;; Available only in emacs-27+
+(unless (fboundp 'proper-list-p) 
+  (defun proper-list-p (seq)
+"Return OBJECT's length if it is a proper list, nil otherwise."
+(unless (or (null (consp seq))
+(cdr (last seq)))
+  (length seq
 
 ;;; Macros helper.
 ;;
@@ -841,9 +849,10 @@ See `helm-help-hkmap' for supported keys and functions."
 (nreverse result)))
 
 (defun helm-mklist (obj)
-  "If OBJ is a list (but not lambda), return itself.
-Otherwise make a list with one element."
-  (if (and (listp obj) (not (functionp obj)))
+  "Return OBJ as a list.
+If OBJ is a proper list (but not lambda), return itself.
+Otherwise make a list with one element OBJ."
+  (if (and (listp obj) (proper-list-p obj) (not (functionp obj)))
   obj
 (list obj)))
 
@@ -964,7 +973,10 @@ Examples:
 =>(a b z c d)
 (helm-append-at-nth \\='(a b c d) \\='((x . 1) (y . 2)) 2)
 =>(a b (x . 1) (y . 2) c d)
-"
+
+NOTE: This function uses `append' internally, so ELM is expected to be a list 
to
+be appended to SEQ, however for convenience ELM can be an atom or a cons cell,
+it will be wrapped inside a list automatically."
   (setq index (min (max index 0) (length seq))
 elm   (helm-mklist elm))
   (if (zerop index)



[nongnu] elpa/helm-core updated (49c43fefa5 -> 2d318f00a8)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  49c43fefa5 Prefer icons for mode for buffers
  adds  e3194ed464 Make helm-mklist working on cons cell
  adds  2d318f00a8 Handle shorthands matching in helm-occur

No new revisions were added by this update.

Summary of changes:
 helm-lib.el   | 20 
 helm-occur.el | 35 +--
 2 files changed, 49 insertions(+), 6 deletions(-)



[nongnu] elpa/helm 2d318f00a8 2/2: Handle shorthands matching in helm-occur

2022-11-05 Thread ELPA Syncer
branch: elpa/helm
commit 2d318f00a89d1381814766fa239ccf729173a3c9
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Handle shorthands matching in helm-occur
---
 helm-occur.el | 35 +--
 1 file changed, 33 insertions(+), 2 deletions(-)

diff --git a/helm-occur.el b/helm-occur.el
index e9d2f50720..5fa10aeb8e 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -148,6 +148,10 @@ This happen only in `helm-source-occur' which is always 
related to
 (defcustom helm-occur-ignore-diacritics nil
   "When non nil helm-occur will ignore diacritics in patterns."
   :type 'boolean)
+
+(defcustom helm-occur-match-shorthands nil
+  "Transform pattern according to `read-symbol-shorthands' when non nil."
+  :type 'boolean)
 
 (defface helm-moccur-buffer
   `((t ,@(and (>= emacs-major-version 27) '(:extend t))
@@ -284,6 +288,26 @@ engine beeing completely different and also much faster."
when (and disp (not (string= disp "")))
collect (cons disp (string-to-number linum
 
+(defun helm-occur-symbol-shorthands-pattern-transformer (pattern buffer 
&optional default)
+  "Maybe transform PATTERN to its `read-symbol-shorthands' counterpart in 
BUFFER.
+If DEFAULT is specified, always transform PATTERN with the cdr of the matched
+shorthand i.e. the one that is interned, otherwise transform pattern with the
+car of the shorthand association.
+When no `read-symbol-shorthands' local value is found use PATTERN unmodified."
+  (if helm-occur-match-shorthands
+  (let ((shorthands (buffer-local-value 'read-symbol-shorthands buffer))
+(prefix (and (string-match "\\`\\([^-]+-\\)[^-]*" pattern)
+ (match-string 1 pattern
+(if (and shorthands prefix)
+(helm-aif (or (assoc prefix shorthands)
+  (rassoc prefix shorthands))
+(if default
+(replace-match (cdr it) nil nil pattern 1)
+  (replace-match (car it) nil nil pattern 1))
+  pattern)
+  pattern))
+pattern))
+
 (defclass helm-moccur-class (helm-source-in-buffer)
   ((buffer-name :initarg :buffer-name
 :initform nil)
@@ -317,6 +341,9 @@ engine beeing completely different and also much faster."
   (condition-case _err
   (re-search-forward pattern nil t)
 (invalid-regexp nil)))
+:pattern-transformer (lambda (pattern)
+   
(helm-occur-symbol-shorthands-pattern-transformer
+pattern buf))
 :init (lambda ()
 (with-current-buffer buf
   (let* ((bsfn (or (cdr (assq
@@ -387,7 +414,9 @@ Each buffer's result is displayed in a separated source."
 (helm :sources sources
   :buffer "*helm moccur*"
   :history 'helm-occur-history
-  :default (helm-aif (thing-at-point 'symbol) (regexp-quote it))
+  :default (helm-aif (thing-at-point 'symbol)
+   (helm-occur-symbol-shorthands-pattern-transformer
+(regexp-quote it) (current-buffer) t))
   :input input
   :truncate-lines helm-occur-truncate-lines)
   (remove-hook 'helm-after-update-hook 
'helm-occur--select-closest-candidate
@@ -410,7 +439,9 @@ METHOD can be one of buffer, buffer-other-window, 
buffer-other-frame."
 (with-current-buffer buf
   (helm-goto-line lineno)
   ;; Move point to the nearest matching regexp from bol.
-  (cl-loop for reg in split-pat
+  (cl-loop for str in split-pat
+   for reg = (helm-occur-symbol-shorthands-pattern-transformer
+  str (get-buffer buf))
when (save-excursion
   (condition-case _err
   (if helm-migemo-mode



[elpa] externals/ess 97911d3d64: Many small typos thanks to Eric Lindblad (Sep 4, 2022)

2022-11-05 Thread ELPA Syncer
branch: externals/ess
commit 97911d3d645da5989ce9bd33610194c2141921b6
Author: Martin Maechler 
Commit: Martin Maechler 

Many small typos thanks to Eric Lindblad (Sep 4, 2022)
---
 ChangeLog| 50 ++--
 doc/bugs.texi|  2 +-
 doc/ess.texi |  4 ++--
 doc/onewfeat.texi| 10 -
 etc/ESSR/BUILDESSR   |  2 +-
 etc/ESSR/R/.basic.R  |  2 +-
 etc/ESSR/R/debug.R   |  2 +-
 etc/ESSR/R/misc.R|  2 +-
 etc/ESSR/R/mpi.R |  2 +-
 etc/ESSR/R/ns-eval.R |  2 +-
 lisp/ess-custom.el   |  2 +-
 lisp/ess-help.el |  2 +-
 lisp/ess-inf.el  | 10 -
 lisp/ess-julia.el|  8 +++
 lisp/ess-mode.el |  2 +-
 lisp/ess-r-mode.el   |  8 +++
 lisp/ess-r-syntax.el |  6 +++---
 lisp/ess-roxy.el |  2 +-
 lisp/ess-sas-a.el|  4 ++--
 lisp/obsolete/ess-eldoc.el   |  4 ++--
 lisp/obsolete/ess-mouse.el   |  2 +-
 lisp/obsolete/mouseme.el |  2 +-
 test/ess-test-indentation.el |  2 +-
 test/ess-test-org.el | 12 +--
 test/ess-test-r.el   |  6 +++---
 test/literate/syntax.R   |  2 +-
 test/manual/R-ESS-bugs.R |  6 +++---
 27 files changed, 79 insertions(+), 79 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f1332c32e4..aaa7328307 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -592,7 +592,7 @@
Not sure where this file comes from.  info/emacs does
not create this file in a directory that doesn't
already have one.  The file doesn't seem to be
-   created by makeinfo and thats where the problem lies.
+   created by makeinfo and that's where the problem lies.
There is no synchronization between @direntry and dir
once dir has been created (however that happens).  The
best solution at present is to keep the two in synch
@@ -862,7 +862,7 @@
like this would be valuable for ess-sas-graph-view and for
other packages as well.  After a bit more testing, I'll put
it some place more appropriate.  I suppose we don't
-   have alot of time left before 5.2.0
+   have a lot of time left before 5.2.0
 
* lisp/essa-sas.el:
ess-sas-data-view:  the code will make your head hurt, but
@@ -886,7 +886,7 @@
* lisp/essa-sas.el:
ess-sas-data-view:  Now ignoring WORK datasets since there is no
way to open them anyway.  It would be nice if this function (as well as
-   ess-sas-graph-view) could also be accessable via the mouse.
+   ess-sas-graph-view) could also be accessible via the mouse.
Any hints as to how to do it would be appreciated.  Currently, you have
to move the point manually or re-type the dataset/graph that you want
to view.  Just clicking on a dataset/graph would be easier.
@@ -1290,7 +1290,7 @@
I fixed up help-sas, installed help-s, fixed up some style issues, 
cleaned up
cross references to empty pages.
 
-   All occurences of @essver MUST have braces @essver{} or else the 
remainder
+   All occurrences of @essver MUST have braces @essver{} or else the 
remainder
of the source line is treated as a comment.
 
The doc/Makefile doesn't depend on the *.texi files.
@@ -1400,7 +1400,7 @@
* doc/ess.info, doc/ess.info-1, doc/ess.info-3, doc/help-sas.texi:
doc:  First attempt at creating info documentation for SAS.  It is
basically README.SAS with a few additions/corrections.  Fine for this
-   release, but could use alot of work.
+   release, but could use a lot of work.
 
* lisp/essa-sas.el:
ESS[SAS]: F12 (graph view) now defined for all locales
@@ -1421,7 +1421,7 @@
Also note that makeinfo appears to create working info pages, but 
texi2dvi
does not create documents correctly.  It's a shame since they are very 
nice,
except for garbage which appears to be mangled next, previous, and up.  
This will
-   cause us alot of problems if we want to maintain
+   cause us a lot of problems if we want to maintain
one source and produce .info, .html and .pdf (I actually only tried 
viewing
with xdvi, but I suspect the problem exists with other formats, but I 
pray not).
 
@@ -1872,7 +1872,7 @@
 
2. How is kermit used by ESS?
 
-   I see definititions for ess-kermit-command ess-kermit-get 
ess-kermit-send,
+   I see definitions for ess-kermit-command ess-kermit-get ess-kermit-send,
but do not see any places they are used.
 
I think these three items should be separated into a new ess-kermit.el
@@ -2328,7 +2328,7 @@
 2000-06-30  A.J. Rossini  
 
* ChangeLog, VERSION, lisp/ess-inf.el, lisp/essd-arc.el, 
lisp/essd-vst.el:
-   XLS fixes not quite right.  No startfile if non existant
+   XLS fixes not quite right.  No startfile if non existent

[nongnu] elpa/helm 1327e97f14: Fix regexp matching private symbols in helm-occur

2022-11-05 Thread ELPA Syncer
branch: elpa/helm
commit 1327e97f14449ad980fe4345d21ba1adf07af39d
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Fix regexp matching private symbols in helm-occur
---
 helm-occur.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helm-occur.el b/helm-occur.el
index 5fa10aeb8e..2587e901e4 100644
--- a/helm-occur.el
+++ b/helm-occur.el
@@ -296,7 +296,7 @@ car of the shorthand association.
 When no `read-symbol-shorthands' local value is found use PATTERN unmodified."
   (if helm-occur-match-shorthands
   (let ((shorthands (buffer-local-value 'read-symbol-shorthands buffer))
-(prefix (and (string-match "\\`\\([^-]+-\\)[^-]*" pattern)
+(prefix (and (string-match "\\`\\(.*-\\)-?.**" pattern)
  (match-string 1 pattern
 (if (and shorthands prefix)
 (helm-aif (or (assoc prefix shorthands)



[nongnu] elpa/helm-core updated (2d318f00a8 -> 1327e97f14)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  2d318f00a8 Handle shorthands matching in helm-occur
  adds  1327e97f14 Fix regexp matching private symbols in helm-occur

No new revisions were added by this update.

Summary of changes:
 helm-occur.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[elpa] externals/pyim e33d6c4829: Add ziranma-shuangpin scheme, #460

2022-11-05 Thread ELPA Syncer
branch: externals/pyim
commit e33d6c4829e43a8b88a4d41f2140aa232100b6c5
Author: Feng Shu 
Commit: Feng Shu 

Add ziranma-shuangpin scheme, #460
---
 pyim-scheme.el | 54 ++
 1 file changed, 54 insertions(+)

diff --git a/pyim-scheme.el b/pyim-scheme.el
index 8bba47c078..ff845a2ee3 100644
--- a/pyim-scheme.el
+++ b/pyim-scheme.el
@@ -409,6 +409,60 @@
 ("oo" "o")
 ("ou" "ou"
 
+(pyim-scheme-add
+ '(ziranma-shuangpin
+   :document "自然码双拼(不含形码)方案"
+   :class shuangpin
+   :first-chars "abcdefghijklmnopqrstuvwxyz"
+   :rest-chars  "abcdefghijklmnopqrstuvwxyz"
+   :prefer-triggers nil
+   :cregexp-support-p t
+   :keymaps
+   (("a" "a" "a")
+("b" "b" "ou")
+("c" "c" "iao")
+("d" "d" "uang" "iang")
+("e" "e" "e")
+("f" "f" "en")
+("g" "g" "eng")
+("h" "h" "ang")
+("i" "ch" "i")
+("j" "j" "an")
+("k" "k" "ao")
+("l" "l" "ai")
+("m" "m" "ian")
+("n" "n" "in")
+("o" "o" "uo" "o")
+("p" "p" "un")
+("q" "q" "iu")
+("r" "r" "uan")
+("s" "s" "iong" "ong")
+("t" "t" "ue" "ve")
+("u" "sh" "u")
+("v" "zh" "v" "ui")
+("w" "w" "ia" "ua")
+("x" "x" "ie")
+("y" "y" "ing" "uai")
+("z" "z" "ei")
+("aa" "a")
+("an" "an")
+("aj" "an")
+("ai" "ai")
+("al" "ai")
+("ao" "ao")
+("ak" "ao")
+("ah" "ang")
+("ee" "e")
+("ei" "ei")
+("ez" "ei")
+("en" "en")
+("ef" "en")
+("er" "er")
+("eg" "eng")
+("oo" "o")
+("ou" "ou")
+("ob" "ou"
+
 ;; * Footer
 (provide 'pyim-scheme)
 



[nongnu] elpa/php-mode 0260bd288a 1/9: Make obsolete php-mode-disable-c-mode-hook variable

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 0260bd288aeb2e001470d49cd4fb2fc9574a17f4
Author: USAMI Kenta 
Commit: USAMI Kenta 

Make obsolete php-mode-disable-c-mode-hook variable
---
 CHANGELOG.md |  2 ++
 lisp/php-mode.el | 17 ++---
 2 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3276c010e6..d860e573fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -29,6 +29,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 
  * Make obsolete `php-mode-version-number` contstant variable ([#712])
* `(php-mode-version :as-number t)` is provided for use cases comparing as 
versions, but generally SHOULD NOT be dependent on the PHP Mode version.
+ * Make obsolete `php-mode-disable-c-mode-hook` customize variable ([#718])
 
 ### Fixed
 
@@ -44,6 +45,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 [#715]: https://github.com/emacs-php/php-mode/pull/715
 [#716]: https://github.com/emacs-php/php-mode/pull/716
 [#717]: https://github.com/emacs-php/php-mode/pull/717
+[#718]: https://github.com/emacs-php/php-mode/pull/718
 
 ## [1.24.1] - 2022-10-08
 
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index 6843b3a720..6281c8a546 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -81,6 +81,7 @@
 (eval-when-compile
   (require 'rx)
   (require 'cl-lib)
+  (require 'flymake)
   (require 'regexp-opt)
   (defvar add-log-current-defun-header-regexp)
   (defvar add-log-current-defun-function)
@@ -301,6 +302,7 @@ In that case set to `NIL'."
   :group 'php-mode
   :tag "PHP Mode Disable C Mode Hook"
   :type 'boolean)
+(make-obsolete-variable 'php-mode-disable-c-mode-hook nil "1.24.2")
 
 (defcustom php-mode-enable-project-local-variable t
   "When set to `T', apply project local variable to buffer local variable."
@@ -1147,6 +1149,12 @@ After setting the stylevars run hooks according to 
STYLENAME
   (php-project-apply-local-variables)
   (remove-hook 'hack-local-variables-hook #'php-mode-set-local-variable-delay))
 
+(defun php-mode-neutralize-cc-mode-effect ()
+  "Reset PHP-irrelevant variables set by Cc Mode initialization."
+  (setq-local c-mode-hook nil)
+  (setq-local java-mode-hook nil)
+  t)
+
 (defvar php-mode-syntax-table
   (let ((table (make-syntax-table)))
 (c-populate-syntax-table table)
@@ -1173,9 +1181,12 @@ After setting the stylevars run hooks according to 
STYLENAME
 "Please run `M-x package-reinstall php-mode' command."
   "Please byte recompile PHP Mode files.")))
 
-  (when php-mode-disable-c-mode-hook
-(setq-local c-mode-hook nil)
-(setq-local java-mode-hook nil))
+  (if php-mode-disable-c-mode-hook
+  (php-mode-neutralize-cc-mode-effect)
+(display-warning 'php-mode
+ "`php-mode-disable-c-mode-hook' will be removed.  Do not 
depends on this variable."
+ :warning))
+
   (c-initialize-cc-mode t)
   (c-init-language-vars php-mode)
   (c-common-init 'php-mode)



[nongnu] elpa/php-mode 2bc4db007c 9/9: Merge pull request #719 from emacs-php/feature/always-disable-c-auto-align-backslashe

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 2bc4db007c4e6ccbc2d2e6e74fb54a1af0ead054
Merge: 56e5b67c06 7bcc9d64e9
Author: USAMI Kenta 
Commit: GitHub 

Merge pull request #719 from 
emacs-php/feature/always-disable-c-auto-align-backslashe

Remove php-mode-disable-c-auto-align-backslashes and always disabled
---
 CHANGELOG.md |  5 +
 lisp/php-mode.el | 10 +-
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4ba92416d..6b483f6000 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,10 @@ All notable changes of the PHP Mode 1.19.1 release series 
are documented in this
* `(php-mode-version :as-number t)` is provided for use cases comparing as 
versions, but generally SHOULD NOT be dependent on the PHP Mode version.
  * Make obsolete `php-mode-disable-c-mode-hook` customize variable ([#718])
 
+### Removed
+
+ * Remove `php-mode-disable-c-auto-align-backslashes` as it doesn't make sense 
and is always disabled
+
 ### Fixed
 
  * Removed invalid definitions that caused errors in some expressions ([#704])
@@ -50,6 +54,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 [#716]: https://github.com/emacs-php/php-mode/pull/716
 [#717]: https://github.com/emacs-php/php-mode/pull/717
 [#718]: https://github.com/emacs-php/php-mode/pull/718
+[#719]: https://github.com/emacs-php/php-mode/pull/719
 
 ## [1.24.1] - 2022-10-08
 
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index d7603131dd..463d8495f6 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -300,12 +300,6 @@ In that case set to `NIL'."
   :tag "PHP Mode Enable Backup Style Variables"
   :type 'boolean)
 
-(defcustom php-mode-disable-c-auto-align-backslashes t
-  "When set to non-NIL, override `c-auto-align-backslashes' to NIL."
-  :group 'php-mode
-  :tag "PHP Mode Disable c-auto-align-backslashes"
-  :type 'boolean)
-
 (define-obsolete-variable-alias 'php-mode-disable-parent-mode-hooks 
'php-mode-disable-c-mode-hook "1.21.0")
 (defcustom php-mode-disable-c-mode-hook t
   "When set to `T', do not run hooks of parent modes (`java-mode', `c-mode')."
@@ -916,9 +910,6 @@ reported, even if `c-report-syntactic-errors' is non-nil."
   php-warned-bad-indent
   (php-check-html-for-indentation))
   (let ((here (point))
-(c-auto-align-backslashes
- (unless php-mode-disable-c-auto-align-backslashes
-   c-auto-align-backslashes))
 doit)
 (move-beginning-of-line nil)
 ;; Don't indent heredoc end mark
@@ -1202,6 +1193,7 @@ After setting the stylevars run hooks according to 
STYLENAME
   (c-initialize-cc-mode t)
   (c-init-language-vars php-mode)
   (c-common-init 'php-mode)
+  (setq-local c-auto-align-backslashes nil)
 
   (setq-local comment-start "// ")
   (setq-local comment-start-skip



[nongnu] elpa/php-mode a8a62f39ed 6/9: Make append to flymake-allowed-file-name-masks only in legacy

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit a8a62f39ed7af1d411bc56f58ebb1c26b9cbd8c0
Author: USAMI Kenta 
Commit: USAMI Kenta 

Make append to flymake-allowed-file-name-masks only in legacy
---
 CHANGELOG.md |  1 +
 lisp/php-mode.el | 10 --
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 53d308ec65..c4ba92416d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
  * Make `php-mode-version` function include a Git tag and revision ([#713])
* Like `"1.23.4-56-xx"` for example.
  * Change `php-phpdoc-type-keywords` to `php-phpdoc-type-names` to avoid 
confusion ([#717])
+ * Make `php-flymake-php-init` append to `flymake-allowed-file-name-masks` 
only in legacy Flymake ([#718])
 
 ### Deprecated
 
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index b4088d2f89..d7603131dd 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -1542,12 +1542,10 @@ for \\[find-tag] (which see)."
 (defvar php-font-lock-keywords php-font-lock-keywords-3
   "Default expressions to highlight in PHP Mode.")
 
-(add-to-list
- (eval-when-compile
-   (if (boundp 'flymake-proc-allowed-file-name-masks)
-   'flymake-proc-allowed-file-name-masks
- 'flymake-allowed-file-name-masks))
- '("\\.php[345s]?\\'" php-flymake-php-init))
+(eval-when-compile
+   (unless (boundp 'flymake-proc-allowed-file-name-masks)
+ (add-to-list 'flymake-allowed-file-name-masks
+  '("\\.php[345s]?\\'" php-flymake-php-init
 
 
 (defun php-send-region (start end)



[nongnu] elpa/php-mode 56e5b67c06 7/9: Merge pull request #718 from emacs-php/feature/flymake-diagnostic-functions

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 56e5b67c069d071a948af72abb206e2d736bbf44
Merge: f5c4016bb6 a8a62f39ed
Author: USAMI Kenta 
Commit: GitHub 

Merge pull request #718 from emacs-php/feature/flymake-diagnostic-functions

New feature: php-flymake
---
 CHANGELOG.md|   6 +++
 Makefile|   2 +-
 lisp/php-flymake.el | 140 
 lisp/php-mode.el|  43 
 lisp/php.el |   8 ++-
 5 files changed, 184 insertions(+), 15 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3276c010e6..c4ba92416d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 
  * **New feature: `php-complete`**
* Add `php-complete-complete-function` to autocomplete function names 
([#708])
+ * **New feature: `php-flymake`**
+   * Add `php-flymake` as a flymake backend compatible with Emacs 26 and above 
([#718])
  * Supports PHPDoc tags and types for static analysis tools ([#710], [#715], 
[#716], [#717], thanks to [@takeokunn])
  * Please refer to the article below
* PHPStan: [PHPDoc 
Types](https://phpstan.org/writing-php-code/phpdoc-types)
@@ -15,6 +17,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
* Psalm: [Atomic Type 
Reference](https://psalm.dev/docs/annotating_code/type_syntax/atomic_types/)
* Psalm: [Supported 
Annotations](https://psalm.dev/docs/annotating_code/supported_annotations/)
* Psalm: [Template 
Annotations](https://psalm.dev/docs/annotating_code/templated_annotations/)
+ * Add `php-mode-replace-flymake-diag-function` custom variable and default 
activated it ([#718])
 
 ### Changed
 
@@ -24,11 +27,13 @@ All notable changes of the PHP Mode 1.19.1 release series 
are documented in this
  * Make `php-mode-version` function include a Git tag and revision ([#713])
* Like `"1.23.4-56-xx"` for example.
  * Change `php-phpdoc-type-keywords` to `php-phpdoc-type-names` to avoid 
confusion ([#717])
+ * Make `php-flymake-php-init` append to `flymake-allowed-file-name-masks` 
only in legacy Flymake ([#718])
 
 ### Deprecated
 
  * Make obsolete `php-mode-version-number` contstant variable ([#712])
* `(php-mode-version :as-number t)` is provided for use cases comparing as 
versions, but generally SHOULD NOT be dependent on the PHP Mode version.
+ * Make obsolete `php-mode-disable-c-mode-hook` customize variable ([#718])
 
 ### Fixed
 
@@ -44,6 +49,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 [#715]: https://github.com/emacs-php/php-mode/pull/715
 [#716]: https://github.com/emacs-php/php-mode/pull/716
 [#717]: https://github.com/emacs-php/php-mode/pull/717
+[#718]: https://github.com/emacs-php/php-mode/pull/718
 
 ## [1.24.1] - 2022-10-08
 
diff --git a/Makefile b/Makefile
index 97922d2a50..45dc5c44bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 EMACS ?= emacs
 CASK ?= cask
-ELS = lisp/php.el lisp/php-align.el lisp/php-complete.el lisp/php-defs.el 
lisp/php-face.el lisp/php-project.el lisp/php-local-manual.el lisp/php-mode.el 
lisp/php-mode-debug.el
+ELS = lisp/php.el lisp/php-align.el lisp/php-complete.el lisp/php-defs.el 
lisp/php-face.el lisp/php-flymake.el lisp/php-project.el 
lisp/php-local-manual.el lisp/php-mode.el lisp/php-mode-debug.el
 AUTOLOADS = php-mode-autoloads.el
 ELCS = $(ELS:.el=.elc)
 
diff --git a/lisp/php-flymake.el b/lisp/php-flymake.el
new file mode 100644
index 00..3c71e1a7bb
--- /dev/null
+++ b/lisp/php-flymake.el
@@ -0,0 +1,140 @@
+;;; php-flymake.el --- Flymake backend for PHP   -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2022  Friends of Emacs-PHP development
+
+;; Author: USAMI Kenta 
+;; Created: 5 Mar 2022
+;; Version: 1.24.1
+;; Keywords: tools, languages, php
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; Flymake backend for PHP.
+
+;;; Code:
+(require 'flymake)
+(require 'cl-lib)
+(eval-when-compile
+  (require 'pcase)
+  (require 'rx))
+
+(defgroup php-flymake nil
+  "Flymake backend for PHP."
+  :tag "PHP Flymake"
+  :group 'php)
+
+(defcustom php-flymake-executable-command-args nil
+  "List of command and arguments for `php -l'."
+  :group 'php-flymake
+  :type '(repeat string)
+  :safe (lambda (v) (and (listp v) (cl-every v #'str

[nongnu] elpa/php-mode 7bcc9d64e9 8/9: Remove php-mode-disable-c-auto-align-backslashes and always disabled

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 7bcc9d64e95237d022f604436e5965167e1bc08b
Author: USAMI Kenta 
Commit: USAMI Kenta 

Remove php-mode-disable-c-auto-align-backslashes and always disabled
---
 CHANGELOG.md |  5 +
 lisp/php-mode.el | 10 +-
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index c4ba92416d..6b483f6000 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,10 @@ All notable changes of the PHP Mode 1.19.1 release series 
are documented in this
* `(php-mode-version :as-number t)` is provided for use cases comparing as 
versions, but generally SHOULD NOT be dependent on the PHP Mode version.
  * Make obsolete `php-mode-disable-c-mode-hook` customize variable ([#718])
 
+### Removed
+
+ * Remove `php-mode-disable-c-auto-align-backslashes` as it doesn't make sense 
and is always disabled
+
 ### Fixed
 
  * Removed invalid definitions that caused errors in some expressions ([#704])
@@ -50,6 +54,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 [#716]: https://github.com/emacs-php/php-mode/pull/716
 [#717]: https://github.com/emacs-php/php-mode/pull/717
 [#718]: https://github.com/emacs-php/php-mode/pull/718
+[#719]: https://github.com/emacs-php/php-mode/pull/719
 
 ## [1.24.1] - 2022-10-08
 
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index d7603131dd..463d8495f6 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -300,12 +300,6 @@ In that case set to `NIL'."
   :tag "PHP Mode Enable Backup Style Variables"
   :type 'boolean)
 
-(defcustom php-mode-disable-c-auto-align-backslashes t
-  "When set to non-NIL, override `c-auto-align-backslashes' to NIL."
-  :group 'php-mode
-  :tag "PHP Mode Disable c-auto-align-backslashes"
-  :type 'boolean)
-
 (define-obsolete-variable-alias 'php-mode-disable-parent-mode-hooks 
'php-mode-disable-c-mode-hook "1.21.0")
 (defcustom php-mode-disable-c-mode-hook t
   "When set to `T', do not run hooks of parent modes (`java-mode', `c-mode')."
@@ -916,9 +910,6 @@ reported, even if `c-report-syntactic-errors' is non-nil."
   php-warned-bad-indent
   (php-check-html-for-indentation))
   (let ((here (point))
-(c-auto-align-backslashes
- (unless php-mode-disable-c-auto-align-backslashes
-   c-auto-align-backslashes))
 doit)
 (move-beginning-of-line nil)
 ;; Don't indent heredoc end mark
@@ -1202,6 +1193,7 @@ After setting the stylevars run hooks according to 
STYLENAME
   (c-initialize-cc-mode t)
   (c-init-language-vars php-mode)
   (c-common-init 'php-mode)
+  (setq-local c-auto-align-backslashes nil)
 
   (setq-local comment-start "// ")
   (setq-local comment-start-skip



[nongnu] elpa/php-mode dc67eaecf1 3/9: Add php-flymake.el

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit dc67eaecf15d3dc1be16d30d635aa9f551a231aa
Author: USAMI Kenta 
Commit: USAMI Kenta 

Add php-flymake.el
---
 CHANGELOG.md|   2 +
 Makefile|   2 +-
 lisp/php-flymake.el | 140 
 3 files changed, 143 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index d860e573fe..6e19a36d1c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,6 +8,8 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
 
  * **New feature: `php-complete`**
* Add `php-complete-complete-function` to autocomplete function names 
([#708])
+ * **New feature: `php-flymake`**
+   * Add `php-flymake` as a flymake backend compatible with Emacs 26 and above 
([#718])
  * Supports PHPDoc tags and types for static analysis tools ([#710], [#715], 
[#716], [#717], thanks to [@takeokunn])
  * Please refer to the article below
* PHPStan: [PHPDoc 
Types](https://phpstan.org/writing-php-code/phpdoc-types)
diff --git a/Makefile b/Makefile
index 97922d2a50..45dc5c44bf 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 EMACS ?= emacs
 CASK ?= cask
-ELS = lisp/php.el lisp/php-align.el lisp/php-complete.el lisp/php-defs.el 
lisp/php-face.el lisp/php-project.el lisp/php-local-manual.el lisp/php-mode.el 
lisp/php-mode-debug.el
+ELS = lisp/php.el lisp/php-align.el lisp/php-complete.el lisp/php-defs.el 
lisp/php-face.el lisp/php-flymake.el lisp/php-project.el 
lisp/php-local-manual.el lisp/php-mode.el lisp/php-mode-debug.el
 AUTOLOADS = php-mode-autoloads.el
 ELCS = $(ELS:.el=.elc)
 
diff --git a/lisp/php-flymake.el b/lisp/php-flymake.el
new file mode 100644
index 00..3c71e1a7bb
--- /dev/null
+++ b/lisp/php-flymake.el
@@ -0,0 +1,140 @@
+;;; php-flymake.el --- Flymake backend for PHP   -*- lexical-binding: t; 
-*-
+
+;; Copyright (C) 2022  Friends of Emacs-PHP development
+
+;; Author: USAMI Kenta 
+;; Created: 5 Mar 2022
+;; Version: 1.24.1
+;; Keywords: tools, languages, php
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see .
+
+;;; Commentary:
+
+;; Flymake backend for PHP.
+
+;;; Code:
+(require 'flymake)
+(require 'cl-lib)
+(eval-when-compile
+  (require 'pcase)
+  (require 'rx))
+
+(defgroup php-flymake nil
+  "Flymake backend for PHP."
+  :tag "PHP Flymake"
+  :group 'php)
+
+(defcustom php-flymake-executable-command-args nil
+  "List of command and arguments for `php -l'."
+  :group 'php-flymake
+  :type '(repeat string)
+  :safe (lambda (v) (and (listp v) (cl-every v #'stringp
+
+(defconst php-flymake--diaggnostics-pattern
+  (eval-when-compile
+(rx bol (? "PHP ")
+(group (or "Parse" "Fatal")) ;; 1: type, not used
+" error:" (+ (syntax whitespace))
+(group (+? any)) ;; 2: msg
+" in " (group (+? any)) ;; 3: file, not used
+" on line " (group (+ num)) ;; 4: line
+eol)))
+
+(defvar-local php-flymake--proc nil)
+
+;;;###autoload
+(defun php-flymake (report-fn &rest args)
+  "Flymake backend for PHP syntax check.
+
+See `flymake-diagnostic-functions' about REPORT-FN and ARGS parameters."
+  (setq-local flymake-proc-allowed-file-name-masks nil)
+  (when (process-live-p php-flymake--proc)
+(if (plist-get args :interactive)
+(user-error "There's already a Flymake process running in this buffer")
+  (kill-process php-flymake--proc)))
+  (save-restriction
+(widen)
+(cl-multiple-value-bind (use-stdin skip) (php-flymake--buffer-status)
+  (unless skip
+(setq php-flymake--proc (php-flymake--make-process report-fn 
buffer-file-name (current-buffer) use-stdin))
+(when use-stdin
+  (process-send-region php-flymake--proc (point-min) (point-max)))
+(process-send-eof php-flymake--proc)
+
+(defun php-flymake--buffer-status ()
+  "Return buffer status about \"use STDIN\" and \"Skip diagnostic\"."
+  (let* ((use-stdin (or (null buffer-file-name)
+ (buffer-modified-p (current-buffer))
+ (file-remote-p buffer-file-name)))
+ (skip (and (not use-stdin)
+(save-excursion (goto-char (point-min)) (looking-at-p 
"#!")
+(cl-values use-stdin skip)))
+
+(defun php-flymake--diagnostics (locus source)
+  "Parse output of `php -l' command in SOURCE buffer.  LOCUS means filename."
+  (unless (eval-when-compile (and (fbo

[nongnu] elpa/php-mode 683211c088 2/9: Remove 'flymake-cc from flymake-diagnostic-functions

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 683211c0880a45e2349af90bd2384582c4829430
Author: USAMI Kenta 
Commit: USAMI Kenta 

Remove 'flymake-cc from flymake-diagnostic-functions
---
 lisp/php-mode.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index 6281c8a546..2f898403e1 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -1153,6 +1153,8 @@ After setting the stylevars run hooks according to 
STYLENAME
   "Reset PHP-irrelevant variables set by Cc Mode initialization."
   (setq-local c-mode-hook nil)
   (setq-local java-mode-hook nil)
+  (when (eval-when-compile (boundp 'flymake-diagnostic-functions))
+(remove-hook 'flymake-diagnostic-functions 'flymake-cc t))
   t)
 
 (defvar php-mode-syntax-table



[nongnu] elpa/php-mode updated (f5c4016bb6 -> 2bc4db007c)

2022-11-05 Thread ELPA Syncer
elpasync pushed a change to branch elpa/php-mode.

  from  f5c4016bb6 Update AUTHORS
   new  0260bd288a Make obsolete php-mode-disable-c-mode-hook variable
   new  683211c088 Remove 'flymake-cc from flymake-diagnostic-functions
   new  dc67eaecf1 Add php-flymake.el
   new  0902894e21 Add php-mode-replace-flymake-diag-function
   new  330070dc01 Fix php-flymake-php-init for legacy flymake
   new  a8a62f39ed Make append to flymake-allowed-file-name-masks only in 
legacy
   new  56e5b67c06 Merge pull request #718 from 
emacs-php/feature/flymake-diagnostic-functions
   new  7bcc9d64e9 Remove php-mode-disable-c-auto-align-backslashes and 
always disabled
   new  2bc4db007c Merge pull request #719 from 
emacs-php/feature/always-disable-c-auto-align-backslashe


Summary of changes:
 CHANGELOG.md|  11 +
 Makefile|   2 +-
 lisp/php-flymake.el | 140 
 lisp/php-mode.el|  53 +---
 lisp/php.el |   8 ++-
 5 files changed, 190 insertions(+), 24 deletions(-)
 create mode 100644 lisp/php-flymake.el



[nongnu] elpa/php-mode 330070dc01 5/9: Fix php-flymake-php-init for legacy flymake

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 330070dc01a8afacd78f6f108951bc4707a9730c
Author: USAMI Kenta 
Commit: USAMI Kenta 

Fix php-flymake-php-init for legacy flymake
---
 lisp/php.el | 8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/lisp/php.el b/lisp/php.el
index 3a79a97ac3..ce70b279fb 100644
--- a/lisp/php.el
+++ b/lisp/php.el
@@ -550,11 +550,9 @@ The order is reversed by calling as follows:
 
 This is an alternative function of `flymake-php-init'.
 Look at the `php-executable' variable instead of the constant \"php\" command."
-  (let* ((init (funcall (eval-when-compile
-  (if (fboundp 'flymake-proc-php-init)
-  'flymake-proc-php-init
-'flymake-php-init)
-(list php-executable (cdr init
+  (let ((init (with-no-warnings (flymake-php-init
+(setf (car init) php-executable)
+init))
 
 (defconst php-re-detect-html-tag-aggressive
   (eval-when-compile



[nongnu] elpa/php-mode 0902894e21 4/9: Add php-mode-replace-flymake-diag-function

2022-11-05 Thread ELPA Syncer
branch: elpa/php-mode
commit 0902894e21663d6e184a46e8f9defd633498b905
Author: USAMI Kenta 
Commit: USAMI Kenta 

Add php-mode-replace-flymake-diag-function
---
 CHANGELOG.md |  1 +
 lisp/php-mode.el | 14 ++
 2 files changed, 15 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e19a36d1c..53d308ec65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ All notable changes of the PHP Mode 1.19.1 release series are 
documented in this
* Psalm: [Atomic Type 
Reference](https://psalm.dev/docs/annotating_code/type_syntax/atomic_types/)
* Psalm: [Supported 
Annotations](https://psalm.dev/docs/annotating_code/supported_annotations/)
* Psalm: [Template 
Annotations](https://psalm.dev/docs/annotating_code/templated_annotations/)
+ * Add `php-mode-replace-flymake-diag-function` custom variable and default 
activated it ([#718])
 
 ### Changed
 
diff --git a/lisp/php-mode.el b/lisp/php-mode.el
index 2f898403e1..b4088d2f89 100644
--- a/lisp/php-mode.el
+++ b/lisp/php-mode.el
@@ -82,6 +82,7 @@
   (require 'rx)
   (require 'cl-lib)
   (require 'flymake)
+  (require 'php-flymake)
   (require 'regexp-opt)
   (defvar add-log-current-defun-header-regexp)
   (defvar add-log-current-defun-function)
@@ -180,6 +181,15 @@ Turning this on will open it whenever `php-mode' is 
loaded."
   :tag "PHP Mode Page Delimiter"
   :type 'regexp)
 
+(defcustom php-mode-replace-flymake-diag-function
+  (eval-when-compile (when (boundp 'flymake-diagnostic-functions)
+   #'php-flymake))
+  "Flymake function to replace, if NIL do not replace."
+  :group 'php-mode
+  :tag "PHP Mode Replace Flymake Diag Function"
+  :type '(choice 'function
+ (const :tag "Disable to replace" nil)))
+
 (define-obsolete-variable-alias 'php-do-not-use-semantic-imenu 
'php-mode-do-not-use-semantic-imenu "1.20.0")
 (defcustom php-mode-do-not-use-semantic-imenu t
   "Customize `imenu-create-index-function' for `php-mode'.
@@ -1262,6 +1272,10 @@ After setting the stylevars run hooks according to 
STYLENAME
   (setq-local add-log-current-defun-function nil)
   (setq-local add-log-current-defun-header-regexp 
php-beginning-of-defun-regexp)
 
+  (when (and (eval-when-compile (boundp 'flymake-diagnostic-functions))
+ php-mode-replace-flymake-diag-function)
+(add-hook 'flymake-diagnostic-functions 
php-mode-replace-flymake-diag-function nil t))
+
   (when (fboundp 'c-looking-at-or-maybe-in-bracelist)
 (advice-add #'c-looking-at-or-maybe-in-bracelist
 :override 'php-c-looking-at-or-maybe-in-bracelist '(local)))



[elpa] externals/triples 62967f76d3: Provide a lower-level triple API.

2022-11-05 Thread ELPA Syncer
branch: externals/triples
commit 62967f76d3fdb41d4524f942e1bf6fd501250490
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Provide a lower-level triple API.

Also add suggestions to the documentation about how to code directly to the
database if needed.
---
 README.org  |  9 ++
 triples-test.el | 86 -
 triples.el  | 42 ++--
 3 files changed, 73 insertions(+), 64 deletions(-)

diff --git a/README.org b/README.org
index 66ab22eb64..81c820537c 100644
--- a/README.org
+++ b/README.org
@@ -77,3 +77,12 @@ There are other useful functions, including:
 Sometimes the triples library will require predicates that are without type, 
and sometimes with type, or "combined predicates".  The rule is that if the 
type is already specified in the function, it does not need to be respecified.  
If the type is not specified, it is included in the combined predicate.
 
 When returning data, if data is from just one type, the type is not returned 
in the returned predicates.  If the data is from multiple types, the type is 
returned as combined predicates.
+* Using direct SQL access
+Sometimes clients of this library need to do something with the database, and 
the higher-level triples functionality doesn't help.  If you would like 
lower-level functionality into handling triples, you can use the same low-level 
methods that the rest of this library uses.  These start with =triples-db-=.
+- =triples-db-insert=: Add a triple.  Uses SQL's =REPLACE= command, so there 
can't be completely duplicate triples (including the property, which often can 
serve as a disambiguation mechanism).
+- =triples-db-delete=: Delete triples matching the arguments.  Empty arguments 
match everything, so =(triples-db-delete db)= will delete all triples.
+- =triples-db-delete-subject-predicate-prefix=: Delete triples matching 
subjects and with predicates with a certain prefix.  This can't be done with 
=triples-db-delete= because that method uses exact matching for all arguments, 
and this uses prefix matching for the predicate.
+- =triples-db-select-predicate-object-fragment=: Select triples that contain 
an object partially in which the fragment appears.
+- =triples-db-select=: Select triples matching any of the parts of the triple. 
 Like =triples-db-delete=, empty arguments match everything.  You can specify 
exactly what to return with a selector.
+
+Sometimes this still doesn't cover what you might want to do.  In that case, 
you should write your own direct database access.  However, please follow the 
coding patterns for the functions above in writing it, so that the code works 
with both Emacs 29's builtin sqlite, and =emacsql=.
diff --git a/triples-test.el b/triples-test.el
index 6d3adb50ab..d8776100b1 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -32,8 +32,8 @@ easily debug into it.")
 (defun triples-test-insert (mode)
   (let ((triples-sqlite-interface mode))
 (triples-test-with-temp-db
-  (triples--insert db "sub" 'pred "obj")
-  (should (equal (mapcar (lambda (row) (seq-take row 3)) (triples--select 
db))
+  (triples-db-insert db "sub" 'pred "obj")
+  (should (equal (mapcar (lambda (row) (seq-take row 3)) 
(triples-db-select db))
  '(("sub" pred "obj"
   ;; Test that we actually are storing with builtin something compatible
   ;; with emacsql.
@@ -41,24 +41,24 @@ easily debug into it.")
 (should (equal (sqlite-select db "SELECT * FROM triples")
'(("\"sub\"" "pred" "\"obj\"" "()")
   ;; Test that it replaces - this shouldn't result in two rows.
-  (triples--insert db "sub" 'pred "obj")
-  (should (= (length (triples--select db)) 1))
+  (triples-db-insert db "sub" 'pred "obj")
+  (should (= (length (triples-db-select db)) 1))
   ;; Test that colons in the predicate are stripped away when stored.
-  (triples--insert db "sub" :test/pred "obj")
-  (should (= (length (triples--select db nil 'test/pred)) 1))
+  (triples-db-insert db "sub" :test/pred "obj")
+  (should (= (length (triples-db-select db nil 'test/pred)) 1))
   ;; Test we correctly test for bad inputs.
-  (should-error (triples--insert db "sub" "pred" "obj"))
-  (should-error (triples--insert db "sub" 'pred "obj" '(ordinary-list)))
-  (should-error (triples--insert db "sub" 'pred "obj" "string"))
+  (should-error (triples-db-insert db "sub" "pred" "obj"))
+  (should-error (triples-db-insert db "sub" 'pred "obj" '(ordinary-list)))
+  (should-error (triples-db-insert db "sub" 'pred "obj" "string"))
   ;; Test that we can have symbol subject and objects.
-  (triples--insert db 'sub 'pred 'obj)
+  (triples-db-insert db 'sub 'pred 'obj)
   (should (equal
-   (mapcar (lambda (row) (seq-take row 3)) (triples--select db 
'sub))   
+   (mapcar (lambda (row) (seq-take row 3)) (t

[elpa] externals/org 9abf1b5167: lisp/ob-maxima.el: correct placement of $ in command string

2022-11-05 Thread ELPA Syncer
branch: externals/org
commit 9abf1b5167e94291eee7c1400277ed55993106f9
Author: Leo Butler 
Commit: Ihor Radchenko 

lisp/ob-maxima.el: correct placement of $ in command string

* ob-maxima.el (org-babel-maxima:execute): Commit 6156b57bdf2b fixed a
quoting problem encountered on windows. However, the dollar sign ($)
is part of the maxima command string and needs to be escaped on
gnu/linux.

Reported by: Eric Fraga
Ref:

https://list.orgmode.org/950eb41c-1c8a-c891-af8d-276f6a452...@electrum-bikes.pl/T/#m4b5a54551604e5b3ec21f317c4a31b547ccada68

TINYCHANGE
---
 lisp/ob-maxima.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/ob-maxima.el b/lisp/ob-maxima.el
index dba12d7b6d..e3dfbb6684 100644
--- a/lisp/ob-maxima.el
+++ b/lisp/ob-maxima.el
@@ -81,10 +81,10 @@ This function is called by `org-babel-execute-src-block'."
(result
 (let* ((cmdline (or (cdr (assq :cmdline params)) ""))
(in-file (org-babel-temp-file "maxima-" ".max"))
-   (cmd (format "%s --very-quiet -r %s$ %s"
+   (cmd (format "%s --very-quiet -r %s %s"
 org-babel-maxima-command
  (shell-quote-argument
-  (format "batchload(%S)" in-file))
+  (format "batchload(%S)$" in-file))
  cmdline)))
   (with-temp-file in-file (insert (org-babel-maxima-expand body 
params)))
   (message cmd)



[elpa] externals/ebdb 8d78ffb7c6 1/2: Update copyright notices to 2022

2022-11-05 Thread Eric Abrahamsen
branch: externals/ebdb
commit 8d78ffb7c64b3751f63c92d1c36748c919a6bdcc
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Update copyright notices to 2022

Which is nearly over...
---
 ebdb-com.el| 2 +-
 ebdb-complete.el   | 2 +-
 ebdb-counsel.el| 2 +-
 ebdb-format.el | 2 +-
 ebdb-gnus.el   | 2 +-
 ebdb-helm.el   | 2 +-
 ebdb-html.el   | 2 +-
 ebdb-i18n-basic.el | 2 +-
 ebdb-i18n-test.el  | 2 +-
 ebdb-i18n.el   | 2 +-
 ebdb-ispell.el | 2 +-
 ebdb-latex.el  | 2 +-
 ebdb-message.el| 2 +-
 ebdb-mhe.el| 2 +-
 ebdb-migrate.el| 2 +-
 ebdb-mu4e.el   | 2 +-
 ebdb-mua.el| 2 +-
 ebdb-notmuch.el| 2 +-
 ebdb-org.el| 2 +-
 ebdb-pgp.el| 2 +-
 ebdb-rmail.el  | 2 +-
 ebdb-snarf.el  | 2 +-
 ebdb-test.el   | 6 +++---
 ebdb-vcard.el  | 2 +-
 ebdb-vm.el | 2 +-
 ebdb-wl.el | 2 +-
 ebdb.el| 2 +-
 27 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index eec91e..04609c81c9 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -1,6 +1,6 @@
 ;;; ebdb-com.el --- User-level commands of EBDB  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2016-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2016-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 ;; Keywords: convenience, mail
diff --git a/ebdb-complete.el b/ebdb-complete.el
index 7643da6ec9..df60f21c4d 100644
--- a/ebdb-complete.el
+++ b/ebdb-complete.el
@@ -1,6 +1,6 @@
 ;;; ebdb-complete.el --- Completion functionality for EBDB  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2017  Free Software Foundation, Inc.
+;; Copyright (C) 2017-2022  Free Software Foundation, Inc.
 
 ;; Author: Feng Shu 
 ;; Maintainer: Eric Abrahamsen 
diff --git a/ebdb-counsel.el b/ebdb-counsel.el
index 6e0341e17e..e791a3f303 100644
--- a/ebdb-counsel.el
+++ b/ebdb-counsel.el
@@ -1,6 +1,6 @@
 ;;; ebdb-counsel.el --- Counsel integration for EBDB  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2019  Free Software Foundation, Inc.
+;; Copyright (C) 2019-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 ;; Maintainer: Eric Abrahamsen 
diff --git a/ebdb-format.el b/ebdb-format.el
index cb2c987446..815b51369c 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -1,6 +1,6 @@
 ;;; ebdb-format.el --- Formatting/exporting EBDB records  -*- lexical-binding: 
t; -*-
 
-;; Copyright (C) 2016-2021  Free Software Foundation, Inc.
+;; Copyright (C) 2016-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 
diff --git a/ebdb-gnus.el b/ebdb-gnus.el
index 6e61bc023e..cdc5bfa590 100644
--- a/ebdb-gnus.el
+++ b/ebdb-gnus.el
@@ -1,6 +1,6 @@
 ;;; ebdb-gnus.el --- Gnus interface to EBDB  -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2016-2020  Free Software Foundation, Inc.
+;; Copyright (C) 2016-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 
diff --git a/ebdb-helm.el b/ebdb-helm.el
index 830dbd5214..6884879c6a 100644
--- a/ebdb-helm.el
+++ b/ebdb-helm.el
@@ -1,6 +1,6 @@
 ;;; ebdb-helm.el --- Helm integration for EBDB   -*- lexical-binding: t; 
-*-
 
-;; Copyright (C) 2018  Free Software Foundation, Inc.
+;; Copyright (C) 2018-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 
diff --git a/ebdb-html.el b/ebdb-html.el
index 3185c890cb..dcaa327b4b 100644
--- a/ebdb-html.el
+++ b/ebdb-html.el
@@ -1,6 +1,6 @@
 ;;; ebdb-html.el --- EBDB HTML integration-*- lexical-binding: t; -*-
 
-;; Copyright (C) 2018  Free Software Foundation, Inc.
+;; Copyright (C) 2018-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 ;; Maintainer: Eric Abrahamsen 
diff --git a/ebdb-i18n-basic.el b/ebdb-i18n-basic.el
index b59c92b2f8..7c4d9d5cbb 100644
--- a/ebdb-i18n-basic.el
+++ b/ebdb-i18n-basic.el
@@ -1,6 +1,6 @@
 ;;; ebdb-i18n-basic.el --- Basic internationalization methods for EBDB  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2017  Free Software Foundation, Inc.
+;; Copyright (C) 2017-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 
diff --git a/ebdb-i18n-test.el b/ebdb-i18n-test.el
index e3b4038c30..3803992221 100644
--- a/ebdb-i18n-test.el
+++ b/ebdb-i18n-test.el
@@ -1,6 +1,6 @@
 ;;; ebdb-i18n-test.el --- Tests for EBDB's internationalization support  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2017  Free Software Foundation, Inc.
+;; Copyright (C) 2017-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 
diff --git a/ebdb-i18n.el b/ebdb-i18n.el
index ac21a79b8c..b1eac4a610 100644
--- a/ebdb-i18n.el
+++ b/ebdb-i18n.el
@@ -1,6 +1,6 @@
 ;;; ebdb-i18n.el --- Internationalization support for EBDB  -*- 
lexical-binding: t; -*-
 
-;; Copyright (C) 2016-2020  Free Software Foundation, Inc.
+;; Copyright (C) 2016-2022  Free Software Foundation, Inc.
 
 ;; Author: Eric Abrahamsen 
 
diff --git a/ebdb-ispell.el b/ebdb-ispell.el
index 1dff24ed89..ab5aec672f 100644
--- a/ebdb-ispell.el
+++

[elpa] externals/ebdb updated (83bc38c93f -> 8ca9902869)

2022-11-05 Thread Eric Abrahamsen
girzel pushed a change to branch externals/ebdb.

  from  83bc38c93f typos (#107)
   new  8d78ffb7c6 Update copyright notices to 2022
   new  8ca9902869 Fix mis-parsing of surname prefixes


Summary of changes:
 ebdb-com.el|  2 +-
 ebdb-complete.el   |  2 +-
 ebdb-counsel.el|  2 +-
 ebdb-format.el |  2 +-
 ebdb-gnus.el   |  2 +-
 ebdb-helm.el   |  2 +-
 ebdb-html.el   |  2 +-
 ebdb-i18n-basic.el |  2 +-
 ebdb-i18n-test.el  |  2 +-
 ebdb-i18n.el   |  2 +-
 ebdb-ispell.el |  2 +-
 ebdb-latex.el  |  2 +-
 ebdb-message.el|  2 +-
 ebdb-mhe.el|  2 +-
 ebdb-migrate.el|  2 +-
 ebdb-mu4e.el   |  2 +-
 ebdb-mua.el|  2 +-
 ebdb-notmuch.el|  2 +-
 ebdb-org.el|  2 +-
 ebdb-pgp.el|  2 +-
 ebdb-rmail.el  |  2 +-
 ebdb-snarf.el  |  2 +-
 ebdb-test.el   | 11 ---
 ebdb-vcard.el  |  2 +-
 ebdb-vm.el |  2 +-
 ebdb-wl.el |  2 +-
 ebdb.el|  6 +++---
 27 files changed, 36 insertions(+), 31 deletions(-)



[elpa] externals/ebdb 8ca9902869 2/2: Fix mis-parsing of surname prefixes

2022-11-05 Thread Eric Abrahamsen
branch: externals/ebdb
commit 8ca9902869b6a3e3bb4d0d2b45b88f476146b7b6
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Fix mis-parsing of surname prefixes

Fixes #106

* ebdb.el (ebdb-divide-name): The prefix should only be found at the
beginning of the string, separated by a space from the actual surname.
---
 ebdb-test.el | 5 +
 ebdb.el  | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ebdb-test.el b/ebdb-test.el
index ad9c9c4710..ac73d37c5c 100644
--- a/ebdb-test.el
+++ b/ebdb-test.el
@@ -358,6 +358,11 @@ If it doesn't exist, raise `ebdb-related-unfound'."
(ebdb-parse 'ebdb-field-name-complex "MURAKAMI Haruki")
'surname)
   "Murakami"))
+  (should (equal
+  (slot-value
+   (ebdb-parse 'ebdb-field-name-complex "John Reddemann")
+   'surname)
+  "Reddemann"))
   (should (equal
   (slot-value
(ebdb-parse 'ebdb-field-name-complex "Fintan O'Toole")
diff --git a/ebdb.el b/ebdb.el
index 9634fc3c48..065b30931c 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016-2022  Free Software Foundation, Inc.
 
-;; Version: 0.8.14
+;; Version: 0.8.15
 ;; Package-Requires: ((emacs "25.1") (seq "2.15"))
 
 ;; Maintainer: Eric Abrahamsen 
@@ -5464,7 +5464,7 @@ usage) to represent the surname."
   (substring string 0 (match-beginning 0)))
string (match-string 1 string)
 (setq given (when given (split-string given nil t)))
-(cond ((string-match (regexp-opt ebdb-lastname-prefixes) string)
+(cond ((string-match (concat "\\`" (regexp-opt ebdb-lastname-prefixes) " 
") string)
   (setq prefix (substring string 0 (match-end 0))
 string (substring string (match-end 0
  ((and (>= (length given) 2)



[elpa] externals/ebdb a961744cc4: Adjust Notmuch insinuation

2022-11-05 Thread Eric Abrahamsen
branch: externals/ebdb
commit a961744cc49a6e9b96474ef8ea90dc34feaef24c
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Adjust Notmuch insinuation

notmuch-show-mode and notmuch-message-mode may be invoked in different
orders, so provide separate hooks for each.
---
 ebdb-notmuch.el | 16 +---
 ebdb.el |  2 +-
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/ebdb-notmuch.el b/ebdb-notmuch.el
index 5e8a70cf16..edc7d2dfeb 100644
--- a/ebdb-notmuch.el
+++ b/ebdb-notmuch.el
@@ -62,15 +62,17 @@ the value of `ebdb-default-window-size'."
 (cl-defmethod ebdb-popup-window (&context (major-mode notmuch-show-mode))
   (list (get-buffer-window) ebdb-notmuch-window-size))
 
-(defun ebdb-insinuate-notmuch ()
-  "Hook EBDB into Notmuch."
-  (define-key notmuch-show-mode-map ";" ebdb-mua-keymap)
+(defun ebdb-insinuate-notmuch-show ()
+  "Hook EBDB into Notmuch's `notmuch-show-mode'."
+  (define-key notmuch-show-mode-map ";" ebdb-mua-keymap))
+
+(defun ebdb-insinuate-notmuch-message ()
+  "Hook EBDB into Notmuch's `notmuch-message-mode'."
   (when ebdb-complete-mail
-(with-eval-after-load "notmuch-message"
-  (define-key notmuch-message-mode-map (kbd "TAB") #'ebdb-complete-mail
+(define-key notmuch-message-mode-map (kbd "TAB") #'ebdb-complete-mail)))
 
-(add-hook 'notmuch-show-mode-hook #'ebdb-insinuate-notmuch)
-(add-hook 'notmuch-message-mode-hook #'ebdb-insinuate-notmuch)
+(add-hook 'notmuch-show-mode-hook #'ebdb-insinuate-notmuch-show)
+(add-hook 'notmuch-message-mode-hook #'ebdb-insinuate-notmuch-message)
 
 (provide 'ebdb-notmuch)
 ;;; ebdb-notmuch.el ends here
diff --git a/ebdb.el b/ebdb.el
index 065b30931c..870284545a 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016-2022  Free Software Foundation, Inc.
 
-;; Version: 0.8.15
+;; Version: 0.8.16
 ;; Package-Requires: ((emacs "25.1") (seq "2.15"))
 
 ;; Maintainer: Eric Abrahamsen 



[elpa] externals/org eefb14f9fa: test-org-clock: Test DWIM update of days

2022-11-05 Thread ELPA Syncer
branch: externals/org
commit eefb14f9fa73b07cb14a0429953fa55f9c78e1cf
Author: Rudolf Adamkovič 
Commit: Ihor Radchenko 

test-org-clock: Test DWIM update of days

* testing/listp/test-org-clock (test-org-clock/clock-drawer-dwim): Add
new test for DWIM updates of days for clocks in logbook drawers.

Reported-by: Bruce E. Robertson 
Link: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=53393
---
 testing/lisp/test-org-clock.el | 16 
 1 file changed, 16 insertions(+)

diff --git a/testing/lisp/test-org-clock.el b/testing/lisp/test-org-clock.el
index f992c8d7ad..68286b1744 100644
--- a/testing/lisp/test-org-clock.el
+++ b/testing/lisp/test-org-clock.el
@@ -273,6 +273,22 @@ the buffer."
   (org-log-into-drawer nil))
   (org-clock-drawer-name))
 
+(ert-deftest test-org-clock/clock-drawer-dwim ()
+  "Test DWIM update of days for clocks in logbook drawers."
+  (should (equal "* Foo
+:LOGBOOK:
+CLOCK: [2022-11-03 Thu 06:00]--[2022-11-03 Thu 06:01] =>  0:01
+:END:
+"
+ (org-test-with-temp-text
+ "* Foo
+:LOGBOOK:
+CLOCK: [2022-11-03 ??? 06:00]--[2022-11-03 ??? 06:01] =>  0:01
+:END:
+"
+   (org-ctrl-c-ctrl-c)
+   (buffer-string)
+
 
 ;;; Clocktable
 



[elpa] externals/triples 9673b6de5e: Compilation fixes by Stefan Monnier.

2022-11-05 Thread Andrew Hyatt
branch: externals/triples
commit 9673b6de5edb4bc2e244af2af38a7a483ef3b45d
Author: Andrew Hyatt 
Commit: Andrew Hyatt 

Compilation fixes by Stefan Monnier.

Also, various other fixes, most notably being a new macro `triples-deftest' 
to
make our testing with both builtin and emacsql easier.
---
 README.org  |   4 +-
 triples-test.el | 273 ++--
 triples.el  |  31 ---
 3 files changed, 152 insertions(+), 156 deletions(-)

diff --git a/README.org b/README.org
index 81c820537c..a3f1387a2d 100644
--- a/README.org
+++ b/README.org
@@ -1,7 +1,9 @@
 #+TITLE: Triples
 
-The =triples= module is a standard database module designed for use in other 
emacs modules.  It works with either the builtin sqlite in Emacs 29 or the 
[[https://github.com/magit/emacsql][emacsql]] module, and provides a simple way 
of storing entities and their associated schema.  The triples module is well 
suited to graph-like applications, where links between entities are important.  
The module has wrappers for most common operations, but it is anticipated that 
occasionally client modu [...]
+The =triples= module is a standard database module designed for use in other 
emacs modules.  It works with either the builtin sqlite in Emacs 29 or the 
[[https://github.com/magit/emacsql][emacsql]] module, and provides a simple way 
of storing entities and their associated schema.  The triples module is well 
suited to graph-like applications, where links between entities are important.  
The module has wrappers for most common operations, but it is anticipated that 
occasionally client modu [...]
 
+* Installing
+This module is available through GNU ELPA, and can be installed as normal.  
However, most of the time this module is only useful in concert with another 
module which uses it as a library and will declare it as a dependency, so 
unless you are planning on developing with it, there is usually no need to 
install it directly.
 * Maturity
 This module is very new should be considered alpha quality.
 
diff --git a/triples-test.el b/triples-test.el
index d8776100b1..e299dc5b53 100644
--- a/triples-test.el
+++ b/triples-test.el
@@ -1,10 +1,34 @@
 ;;; triples-test.el --- Tests for triples module.  -*- lexical-binding: t; -*-
+
+;; Copyright (c) 2022  Free Software Foundation, Inc.
+
+;; This program is free software; you can redistribute it and/or
+;; modify it under the terms of the GNU General Public License as
+;; published by the Free Software Foundation; either version 2 of the
+;; License, or (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+;; General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see .
+
+;;; Commentary:
+
 ;; Note: It's important to test this on emacs 29, with emacsql installed, so we
 ;; can make both types of sqlite backend work.
+;;
+;; The tests also require the `kv' package, which can be found at
+;; https://github.com/jjeffery/kv.
+
+;;; Code:
+
 (require 'triples)
 (require 'seq)
-(require 'kv)
-(require 'emacsql nil t)
+(require 'kv nil t) ;; May be absent.
+(require 'emacsql nil t);; May be absent.
 
 ;;; Code:
 
@@ -29,144 +53,107 @@ easily debug into it.")
   (let ((sql-database triples-test-db-file))
 (sql-sqlite (format "*schema test db SQL %s*" triples-test-db-file
 
-(defun triples-test-insert (mode)
-  (let ((triples-sqlite-interface mode))
-(triples-test-with-temp-db
-  (triples-db-insert db "sub" 'pred "obj")
-  (should (equal (mapcar (lambda (row) (seq-take row 3)) 
(triples-db-select db))
- '(("sub" pred "obj"
-  ;; Test that we actually are storing with builtin something compatible
-  ;; with emacsql.
-  (when (eq mode 'builtin)
-(should (equal (sqlite-select db "SELECT * FROM triples")
-   '(("\"sub\"" "pred" "\"obj\"" "()")
-  ;; Test that it replaces - this shouldn't result in two rows.
-  (triples-db-insert db "sub" 'pred "obj")
-  (should (= (length (triples-db-select db)) 1))
-  ;; Test that colons in the predicate are stripped away when stored.
-  (triples-db-insert db "sub" :test/pred "obj")
-  (should (= (length (triples-db-select db nil 'test/pred)) 1))
-  ;; Test we correctly test for bad inputs.
-  (should-error (triples-db-insert db "sub" "pred" "obj"))
-  (should-error (triples-db-insert db "sub" 'pred "obj" '(ordinary-list)))
-  (should-error (triples-db-insert db "sub" 'pred "obj" "string"))
-  ;; Test that we can have symbol subject and objects.
-  (triples-db-insert db 'sub 'pred 'obj)
-  (should (equal
-