[nongnu] elpa/idris-mode 71ab6a35e3 5/9: [semantic-highlight] Remove and rebuild overlays in file on reload only in changed area

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 71ab6a35e3ed83ddc17919185f576b0a4e2fbeaa
Author: Marek L 
Commit: Marek L 

[semantic-highlight] Remove and rebuild overlays in file on reload  only in 
changed area

Why:
Currently when file is reloaded to Idris
all overlays are removed from buffer and added back later.
This causes flashing and bad user experience.
After change only overlays in changed area are removed and redrawn.
---
 idris-commands.el|  2 --
 idris-highlight-input.el | 53 ++--
 2 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 9b8eb7ee32..54f558b19a 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -209,8 +209,6 @@ A prefix argument forces loading but only up to the current 
line."
 (when (get-buffer idris-notes-buffer-name)
   (with-current-buffer idris-notes-buffer-name
 (let ((inhibit-read-only t)) (erase-buffer
-;; Remove stale semantic highlighting
-(idris-highlight-remove-overlays (current-buffer))
 ;; Actually do the loading
 (let* ((dir-and-fn (idris-filename-to-load))
(fn (cdr dir-and-fn))
diff --git a/idris-highlight-input.el b/idris-highlight-input.el
index 521e4b0399..ec9b67 100644
--- a/idris-highlight-input.el
+++ b/idris-highlight-input.el
@@ -57,32 +57,45 @@ See Info node `(elisp)Overlay Properties' to understand how 
ARGS are used."
 (defun idris-highlight-input-region (buffer start-line start-col end-line 
end-col highlight)
   "Highlight in BUFFER using an overlay from START-LINE and START-COL to
  END-LINE and END-COL and the semantic properties specified in HIGHLIGHT."
-  (when idris-semantic-source-highlighting
-(save-restriction
-  (widen)
-  (if (or (> end-line start-line)
-  (and (= end-line start-line)
-   (> end-col start-col)))
-  (with-current-buffer buffer
+  (if (or (> end-line start-line)
+  (and (= end-line start-line)
+   (> end-col start-col)))
+  (when idris-semantic-source-highlighting
+(with-current-buffer buffer
+  (save-restriction
+(widen)
 (save-excursion
   (goto-char (point-min))
   (let* ((start-pos (+ (line-beginning-position start-line)
(idris-highlight-column start-col)))
  (end-pos (+ (line-beginning-position end-line)
  (idris-highlight-column end-col)))
- (highlight-overlay (make-overlay start-pos end-pos
-  (get-buffer buffer
-(overlay-put highlight-overlay 'idris-source-highlight t)
-(idris-add-overlay-properties highlight-overlay
-  (idris-semantic-properties 
highlight))
-(overlay-put highlight-overlay
- 'modification-hooks
- '(idris-highlight--overlay-modification-hook)
-(when (eq idris-semantic-source-highlighting 'debug)
-  (message "Not highlighting absurd span %s:%s-%s:%s with %s"
-   start-line start-col
-   end-line end-col
-   highlight ))
+ (existing-idris-overlays-in-range (seq-filter
+(lambda (overlay)
+  (overlay-get overlay 
'idris-source-highlight))
+(overlays-in start-pos 
end-pos)))
+ (existing-idris-overlay (seq-find (lambda (overlay)
+ (and
+  (eql start-pos 
(overlay-start overlay))
+  (eql end-pos 
(overlay-end overlay))
+  ;; TODO: overlay 
properties match
+  ))
+   
existing-idris-overlays-in-range)))
+(when (null existing-idris-overlay)
+  (dolist (old-overlay existing-idris-overlays-in-range)
+(delete-overlay old-overlay))
+  (let ((highlight-overlay (make-overlay start-pos end-pos)))
+(overlay-put highlight-overlay 'idris-source-highlight t)
+(idris-add-overlay-properties highlight-overlay
+  (idris-semantic-properties 
highlight))
+(overlay-put highlight-overlay
+ 'modification-hooks
+ 
'(idris-highlight--overlay-modificati

[nongnu] elpa/idris-mode 928f785bb7 4/9: Remove conditional for srcdir in `idris-load-file` used to switch work directory

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 928f785bb70ccb4c7c48da4a5bc064df7f21f775
Author: Marek L 
Commit: Marek L 

Remove conditional for srcdir in `idris-load-file` used to switch work 
directory

Why:
The conditional needed is already present in 
`idris-switch-working-directory` and
this fixes issue of unable to load files into Idris2 in different 
directories.

Steps to reproduce:
Given directory "a" with file foo.idr and directory "b" with bar.idr
Then open a/foo.idr and load the file to Idris2 (M-x idris-load-file)
Then open b/bar.idr and try load it to Idris2.

Current result:
`Evaluation returned an error: Error loading file bar.idr: File Not Found.`
Expected:
bar.idr loaded to Idris2 and working directory switched to "b".
---
 idris-commands.el | 8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 9b8eb7ee32..75b9a05433 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -214,13 +214,7 @@ A prefix argument forces loading but only up to the 
current line."
 ;; Actually do the loading
 (let* ((dir-and-fn (idris-filename-to-load))
(fn (cdr dir-and-fn))
-   (srcdir
-(if (> idris-protocol-version 1)
-(prin1-to-string (car dir-and-fn))
-(car dir-and-fn)
- )
-)
-   )
+   (srcdir (car dir-and-fn)))
   (setq idris-currently-loaded-buffer nil)
   (idris-switch-working-directory srcdir)
   (idris-delete-ibc t) ;; delete the ibc to avoid interfering with 
partial loads



[nongnu] elpa/idris-mode 8a4ce46373 2/9: Delete AddClause.ibc between and after tests

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 8a4ce46373a753ea4e53aa8f8f3a5f3f11c5e8f6
Author: Marek L 
Commit: Marek L 

Delete AddClause.ibc between and after tests

Why:
When the *.ibc file become older than the *.idr
it leads to errors and probably to random failures on CI.
The error:
```
(invalid-function
 (("(no file)" 0 -1 "Loading ./AddClause.ibc failed: Module needs 
reloading:
SRC : \"./AddClause.idr\"
Modified at: 2022-12-03 13:47:16.442694399 UTC
IBC : \"./AddClause.ibc\"
Modified at: 2022-12-03 13:40:03.472179302 UTC
" nil)))
```
---
 idris-tests.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/idris-tests.el b/idris-tests.el
index a3588a05bc..df41786c71 100644
--- a/idris-tests.el
+++ b/idris-tests.el
@@ -187,16 +187,19 @@ remain."
   (goto-char (match-beginning 0))
   (funcall-interactively 'idris-add-clause nil)
   (should (looking-at-p "test \\w+ = \\?test_rhs"))
+  (idris-delete-ibc t)
+
   (re-search-forward "(-) :")
   (goto-char (1+ (match-beginning 0)))
   (funcall-interactively 'idris-add-clause nil)
   (should (looking-at-p "(-) = \\?\\w+_rhs"))
+
   ;; Cleanup
   (erase-buffer)
   (insert buffer-content)
   (save-buffer)
-  (kill-buffer)))
-  (idris-quit))
+  (kill-buffer))
+(idris-quit)))
 
 (provide 'idris-tests)
 ;;; idris-tests.el ends here



[nongnu] elpa/idris-mode 7ebd8e721b 8/9: Merge pull request #581 from keram/highlight-partial

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 7ebd8e721b0b4abb0b9ff2e86738d02ca6906a99
Merge: ee551230ed 71ab6a35e3
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #581 from keram/highlight-partial

[semantic-highlight] Remove and rebuild overlays in file on reload  only in 
changed area
---
 idris-commands.el|  2 --
 idris-highlight-input.el | 53 ++--
 2 files changed, 33 insertions(+), 22 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 9b8eb7ee32..54f558b19a 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -209,8 +209,6 @@ A prefix argument forces loading but only up to the current 
line."
 (when (get-buffer idris-notes-buffer-name)
   (with-current-buffer idris-notes-buffer-name
 (let ((inhibit-read-only t)) (erase-buffer
-;; Remove stale semantic highlighting
-(idris-highlight-remove-overlays (current-buffer))
 ;; Actually do the loading
 (let* ((dir-and-fn (idris-filename-to-load))
(fn (cdr dir-and-fn))
diff --git a/idris-highlight-input.el b/idris-highlight-input.el
index 521e4b0399..ec9b67 100644
--- a/idris-highlight-input.el
+++ b/idris-highlight-input.el
@@ -57,32 +57,45 @@ See Info node `(elisp)Overlay Properties' to understand how 
ARGS are used."
 (defun idris-highlight-input-region (buffer start-line start-col end-line 
end-col highlight)
   "Highlight in BUFFER using an overlay from START-LINE and START-COL to
  END-LINE and END-COL and the semantic properties specified in HIGHLIGHT."
-  (when idris-semantic-source-highlighting
-(save-restriction
-  (widen)
-  (if (or (> end-line start-line)
-  (and (= end-line start-line)
-   (> end-col start-col)))
-  (with-current-buffer buffer
+  (if (or (> end-line start-line)
+  (and (= end-line start-line)
+   (> end-col start-col)))
+  (when idris-semantic-source-highlighting
+(with-current-buffer buffer
+  (save-restriction
+(widen)
 (save-excursion
   (goto-char (point-min))
   (let* ((start-pos (+ (line-beginning-position start-line)
(idris-highlight-column start-col)))
  (end-pos (+ (line-beginning-position end-line)
  (idris-highlight-column end-col)))
- (highlight-overlay (make-overlay start-pos end-pos
-  (get-buffer buffer
-(overlay-put highlight-overlay 'idris-source-highlight t)
-(idris-add-overlay-properties highlight-overlay
-  (idris-semantic-properties 
highlight))
-(overlay-put highlight-overlay
- 'modification-hooks
- '(idris-highlight--overlay-modification-hook)
-(when (eq idris-semantic-source-highlighting 'debug)
-  (message "Not highlighting absurd span %s:%s-%s:%s with %s"
-   start-line start-col
-   end-line end-col
-   highlight ))
+ (existing-idris-overlays-in-range (seq-filter
+(lambda (overlay)
+  (overlay-get overlay 
'idris-source-highlight))
+(overlays-in start-pos 
end-pos)))
+ (existing-idris-overlay (seq-find (lambda (overlay)
+ (and
+  (eql start-pos 
(overlay-start overlay))
+  (eql end-pos 
(overlay-end overlay))
+  ;; TODO: overlay 
properties match
+  ))
+   
existing-idris-overlays-in-range)))
+(when (null existing-idris-overlay)
+  (dolist (old-overlay existing-idris-overlays-in-range)
+(delete-overlay old-overlay))
+  (let ((highlight-overlay (make-overlay start-pos end-pos)))
+(overlay-put highlight-overlay 'idris-source-highlight t)
+(idris-add-overlay-properties highlight-overlay
+  (idris-semantic-properties 
highlight))
+(overlay-put highlight-overlay
+ 'modification-hooks
+ 
'(idris-highlight--overlay-modification-hook)
+(when (eq idris-semantic-source-highlighting 'debug)
+  (message "Not highlighting absurd span %s:%s-%s:%s with %s

[nongnu] elpa/idris-mode updated (0cae4b8086 -> 4a36953e76)

2022-12-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/idris-mode.

  from  0cae4b8086 Merge pull request #575 from keram/idris1-highlight-fix
   new  d6ac9524f6 Simplify `idris-test-idris-type-search` by removing 
loading a file
   new  8a4ce46373 Delete AddClause.ibc between and after tests
   new  d0d609bff7 Include tests from idris-navigate.el in idris-tests.el
   new  ee551230ed Merge pull request #579 from keram/tests-impro
   new  71ab6a35e3 [semantic-highlight] Remove and rebuild overlays in file 
on reload  only in changed area
   new  7ebd8e721b Merge pull request #581 from keram/highlight-partial
   new  928f785bb7 Remove conditional for srcdir in `idris-load-file` used 
to switch work directory
   new  6fbd9cff31 Improve `idris-switch-working-directory` by
   new  4a36953e76 Merge pull request #580 from 
keram/load-file-switch-dir-idris2


Summary of changes:
 idris-commands.el|  30 ++---
 idris-highlight-input.el |  53 +
 idris-navigate.el| 292 ---
 idris-test-utils.el  |  67 ---
 idris-tests.el   | 276 ++--
 5 files changed, 368 insertions(+), 350 deletions(-)



[nongnu] elpa/idris-mode 4a36953e76 9/9: Merge pull request #580 from keram/load-file-switch-dir-idris2

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 4a36953e767d627783aaaf3c705bed349cc84ab8
Merge: 7ebd8e721b 6fbd9cff31
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #580 from keram/load-file-switch-dir-idris2

Remove conditional for srcdir in `idris-load-file` used to switch work 
directory for Idris2
---
 idris-commands.el | 28 
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 54f558b19a..54f3d1cc55 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -91,13 +91,23 @@
   (idris-repl-buffer))
 
 (defun idris-switch-working-directory (new-working-directory)
-  "Switch working directory."
+  "Switch working directory to NEW-WORKING-DIRECTORY."
   (unless (string= idris-process-current-working-directory 
new-working-directory)
 (idris-ensure-process-and-repl-buffer)
-(if (> idris-protocol-version 1)
-(idris-eval `(:interpret ,(concat ":cd " (prin1-to-string 
new-working-directory
-(idris-eval `(:interpret ,(concat ":cd " new-working-directory
-(setq idris-process-current-working-directory new-working-directory)))
+(let* ((path (if (> idris-protocol-version 1)
+ (prin1-to-string new-working-directory)
+   new-working-directory))
+   (eval-result (idris-eval `(:interpret ,(concat ":cd " path
+   (result-msg (or (car-safe eval-result) "")))
+  ;; Check if the message from Idris contains the new directory path.
+  ;; Before check drop the last character (slash) in the path
+  ;; as the message does not include it.
+  (if (string-match-p (file-truename (substring new-working-directory 0 
-1))
+  result-msg)
+  (progn
+(message result-msg)
+(setq idris-process-current-working-directory 
new-working-directory))
+(error "Failed to switch the working directory %s" eval-result)
 
 (defun idris-list-holes-on-load ()
   "Use the user's settings from customize to determine whether to list the 
holes."
@@ -212,13 +222,7 @@ A prefix argument forces loading but only up to the 
current line."
 ;; Actually do the loading
 (let* ((dir-and-fn (idris-filename-to-load))
(fn (cdr dir-and-fn))
-   (srcdir
-(if (> idris-protocol-version 1)
-(prin1-to-string (car dir-and-fn))
-(car dir-and-fn)
- )
-)
-   )
+   (srcdir (car dir-and-fn)))
   (setq idris-currently-loaded-buffer nil)
   (idris-switch-working-directory srcdir)
   (idris-delete-ibc t) ;; delete the ibc to avoid interfering with 
partial loads



[nongnu] elpa/idris-mode d6ac9524f6 1/9: Simplify `idris-test-idris-type-search` by removing loading a file

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit d6ac9524f6ea8c3dd5747794fa1bf1296bf93e7c
Author: Marek L 
Commit: Marek L 

Simplify `idris-test-idris-type-search` by removing loading a file

The file is not needed in order to test the function,
only running idris process
---
 idris-tests.el | 14 ++
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/idris-tests.el b/idris-tests.el
index c841472604..a3588a05bc 100644
--- a/idris-tests.el
+++ b/idris-tests.el
@@ -159,14 +159,12 @@ remain."
 
 (ert-deftest idris-test-idris-type-search ()
   "Test that `idris-type-search' produces output in Idris info buffer."
-  (let ((buffer (find-file "test-data/AddClause.idr")))
-(with-current-buffer buffer
-  (idris-load-file)
-  (funcall-interactively 'idris-type-search "Nat"))
-(with-current-buffer (get-buffer idris-info-buffer-name)
-  (goto-char (point-min))
-  (should (re-search-forward "Zero" nil t)))
-(idris-quit)))
+  (idris-run)
+  (funcall-interactively 'idris-type-search "Nat")
+  (with-current-buffer (get-buffer idris-info-buffer-name)
+(goto-char (point-min))
+(should (re-search-forward "Zero" nil t)))
+ (idris-quit))
 
 (ert-deftest idris-test-ipkg-packages-with-underscores-and-dashes ()
   "Test that loading an ipkg file can have dependencies on packages with _ or 
- in the name."



[nongnu] elpa/idris-mode 6fbd9cff31 6/9: Improve `idris-switch-working-directory` by

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit 6fbd9cff31a9bc1d56bf03cbd8674e67484e58db
Author: Marek L 
Commit: Marek L 

Improve `idris-switch-working-directory` by

- adding error handling and success check
- changing the value of variable `idris-process-current-working-directory` 
only
if the directory was changed successfully to avoid invalid state.
- displaying message from Idris to user
---
 idris-commands.el | 20 +++-
 1 file changed, 15 insertions(+), 5 deletions(-)

diff --git a/idris-commands.el b/idris-commands.el
index 75b9a05433..f4de6782ab 100644
--- a/idris-commands.el
+++ b/idris-commands.el
@@ -91,13 +91,23 @@
   (idris-repl-buffer))
 
 (defun idris-switch-working-directory (new-working-directory)
-  "Switch working directory."
+  "Switch working directory to NEW-WORKING-DIRECTORY."
   (unless (string= idris-process-current-working-directory 
new-working-directory)
 (idris-ensure-process-and-repl-buffer)
-(if (> idris-protocol-version 1)
-(idris-eval `(:interpret ,(concat ":cd " (prin1-to-string 
new-working-directory
-(idris-eval `(:interpret ,(concat ":cd " new-working-directory
-(setq idris-process-current-working-directory new-working-directory)))
+(let* ((path (if (> idris-protocol-version 1)
+ (prin1-to-string new-working-directory)
+   new-working-directory))
+   (eval-result (idris-eval `(:interpret ,(concat ":cd " path
+   (result-msg (or (car-safe eval-result) "")))
+  ;; Check if the message from Idris contains the new directory path.
+  ;; Before check drop the last character (slash) in the path
+  ;; as the message does not include it.
+  (if (string-match-p (file-truename (substring new-working-directory 0 
-1))
+  result-msg)
+  (progn
+(message result-msg)
+(setq idris-process-current-working-directory 
new-working-directory))
+(error "Failed to switch the working directory %s" eval-result)
 
 (defun idris-list-holes-on-load ()
   "Use the user's settings from customize to determine whether to list the 
holes."



[nongnu] elpa/idris-mode d0d609bff7 3/9: Include tests from idris-navigate.el in idris-tests.el

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit d0d609bff711a1f0d70b2d8f6698ca1e0ed7ac78
Author: Marek L 
Commit: Marek L 

Include tests from idris-navigate.el in idris-tests.el
---
 idris-navigate.el   | 292 
 idris-test-utils.el |  67 +---
 idris-tests.el  | 255 +
 3 files changed, 308 insertions(+), 306 deletions(-)

diff --git a/idris-navigate.el b/idris-navigate.el
index 13ea74a068..ae44090043 100644
--- a/idris-navigate.el
+++ b/idris-navigate.el
@@ -891,297 +891,5 @@ If no error, customize `idris-max-specpdl-size'"))
(and idris-verbose-p (interactive-p) (message "%s" erg)))
   erg)))
 
-(defmacro idris-test-with-temp-buffer-point-min (contents &rest body)
-  "Create temp buffer in `idris-mode' inserting CONTENTS.
-BODY is code to be executed within the temp buffer.  Point is
- at the beginning of buffer."
-  (declare (indent 1) (debug t))
-  `(with-temp-buffer
- ;; requires idris.el
- ;; (and (featurep 'semantic) (unload-feature 'semantic))
- ;; (and (featurep 'idris) (unload-feature 'idris))
- (let (hs-minor-mode)
-   (insert ,contents)
-   (idris-mode)
-   (goto-char (point-min))
-   ;; (message "(current-buffer): %s" (current-buffer))
-   (when idris-debug-p (switch-to-buffer (current-buffer))
-;; (font-lock-fontify-buffer)
-(font-lock-ensure)
-)
-   ,@body)
- (sit-for 0.1)))
-
-(defmacro idris-test-with-temp-buffer (contents &rest body)
-  "Create temp buffer in `idris-mode' inserting CONTENTS.
-BODY is code to be executed within the temp buffer.  Point is
- at the end of buffer."
-  (declare (indent 1) (debug t))
-  `(with-temp-buffer
- ;; (and (featurep 'idris) (unload-feature 'idris))
- (let (hs-minor-mode)
-   (insert ,contents)
-   (idris-mode)
-   (when idris-debug-p (switch-to-buffer (current-buffer))
-;; (font-lock-fontify-buffer)
-(font-lock-ensure)
-)
-   ;; (message "ERT %s" (point))
-   ,@body)
- (sit-for 0.1)))
-
-(ert-deftest idris-backard-toplevel-navigation-test-2pTac9 ()
-  "Test idris-backard-toplevel navigation command."
-  (idris-test-with-temp-buffer
-"interface DataStore (m : Type -> Type) where
-  data Store : Access -> Type
-
-  connect : ST m Var \[add (Store LoggedOut)]
-  disconnect : (store : Var) -> ST m () \[remove store (Store LoggedOut)]
-
-  readSecret : (store : Var) -> ST m String \[store ::: Store LoggedIn]
-  login : (store : Var) ->
-  ST m LoginResult \[store ::: Store LoggedOut :->
- (\\res => Store (case res of
-  OK => LoggedIn
-  BadPassword => LoggedOut))]
-  logout : (store : Var) ->
-   ST m () \[store ::: Store LoggedIn :-> Store LoggedOut]
-
-getData : (ConsoleIO m, DataStore m) =>
-  (failcount : Var) -> ST m () \[failcount ::: State Integer]
-getData failcount
-   = do st <- call connect
-OK <- login st
-   | BadPassword => do putStrLn \"Failure\"
-   fc <- read failcount
-   write failcount (fc + 1)
-   putStrLn (\"Number of failures: \" ++ show (fc 
+ 1))
-   disconnect st
-   getData failcount
-secret <- readSecret st
-putStrLn (\"Secret is: \" ++ show secret)
-logout st
-disconnect st
-getData failcount
-
-getData2 : (ConsoleIO m, DataStore m) =>
-   (st, failcount : Var) ->
-   ST m () \[st ::: Store {m} LoggedOut, failcount ::: State Integer]
-getData2 st failcount
-   = do OK <- login st
-   | BadPassword => do putStrLn \"Failure\"
-   fc <- read failcount
-   write failcount (fc + 1)
-   putStrLn (\"Number of failures: \" ++ show (fc 
+ 1))
-   getData2 st failcount
-secret <- readSecret st
-putStrLn (\"Secret is: \" ++ show secret)
-logout st
-getData2 st failcount"
-(goto-char (point-max))
-(idris-backward-toplevel)
-(should (looking-at "getData2 st"))
-;; (goto-char (point-max))
-(search-backward "Number")
-(idris-backward-toplevel)
-(should (looking-at "getData failcount"))
-(search-backward "LoggedIn")
-(idris-backward-toplevel)
-(should (looking-at "interface DataStore"))
-))
-
-(ert-deftest idris-forward-toplevel-navigation-test-2pTac9 ()
-  "Test idris-forard-toplevel navigation command."
-  (idris-test-with-temp-buffer-point-min
-"interface DataStore (m : Type -> Type) where
-  data Store : Access -> Type
-
-  connect : ST m Var \[add (Store LoggedOut)]
-  disconnect : (store : Var) -> ST m () \[remove store (Store LoggedOut)

[nongnu] elpa/idris-mode ee551230ed 7/9: Merge pull request #579 from keram/tests-impro

2022-12-06 Thread ELPA Syncer
branch: elpa/idris-mode
commit ee551230edafadee519fba9edf15fcd82ea339f7
Merge: 0cae4b8086 d0d609bff7
Author: Jan de Muijnck-Hughes 
Commit: GitHub 

Merge pull request #579 from keram/tests-impro

Tests improvements
---
 idris-navigate.el   | 292 
 idris-test-utils.el |  67 +---
 idris-tests.el  | 276 +++--
 3 files changed, 319 insertions(+), 316 deletions(-)

diff --git a/idris-navigate.el b/idris-navigate.el
index 13ea74a068..ae44090043 100644
--- a/idris-navigate.el
+++ b/idris-navigate.el
@@ -891,297 +891,5 @@ If no error, customize `idris-max-specpdl-size'"))
(and idris-verbose-p (interactive-p) (message "%s" erg)))
   erg)))
 
-(defmacro idris-test-with-temp-buffer-point-min (contents &rest body)
-  "Create temp buffer in `idris-mode' inserting CONTENTS.
-BODY is code to be executed within the temp buffer.  Point is
- at the beginning of buffer."
-  (declare (indent 1) (debug t))
-  `(with-temp-buffer
- ;; requires idris.el
- ;; (and (featurep 'semantic) (unload-feature 'semantic))
- ;; (and (featurep 'idris) (unload-feature 'idris))
- (let (hs-minor-mode)
-   (insert ,contents)
-   (idris-mode)
-   (goto-char (point-min))
-   ;; (message "(current-buffer): %s" (current-buffer))
-   (when idris-debug-p (switch-to-buffer (current-buffer))
-;; (font-lock-fontify-buffer)
-(font-lock-ensure)
-)
-   ,@body)
- (sit-for 0.1)))
-
-(defmacro idris-test-with-temp-buffer (contents &rest body)
-  "Create temp buffer in `idris-mode' inserting CONTENTS.
-BODY is code to be executed within the temp buffer.  Point is
- at the end of buffer."
-  (declare (indent 1) (debug t))
-  `(with-temp-buffer
- ;; (and (featurep 'idris) (unload-feature 'idris))
- (let (hs-minor-mode)
-   (insert ,contents)
-   (idris-mode)
-   (when idris-debug-p (switch-to-buffer (current-buffer))
-;; (font-lock-fontify-buffer)
-(font-lock-ensure)
-)
-   ;; (message "ERT %s" (point))
-   ,@body)
- (sit-for 0.1)))
-
-(ert-deftest idris-backard-toplevel-navigation-test-2pTac9 ()
-  "Test idris-backard-toplevel navigation command."
-  (idris-test-with-temp-buffer
-"interface DataStore (m : Type -> Type) where
-  data Store : Access -> Type
-
-  connect : ST m Var \[add (Store LoggedOut)]
-  disconnect : (store : Var) -> ST m () \[remove store (Store LoggedOut)]
-
-  readSecret : (store : Var) -> ST m String \[store ::: Store LoggedIn]
-  login : (store : Var) ->
-  ST m LoginResult \[store ::: Store LoggedOut :->
- (\\res => Store (case res of
-  OK => LoggedIn
-  BadPassword => LoggedOut))]
-  logout : (store : Var) ->
-   ST m () \[store ::: Store LoggedIn :-> Store LoggedOut]
-
-getData : (ConsoleIO m, DataStore m) =>
-  (failcount : Var) -> ST m () \[failcount ::: State Integer]
-getData failcount
-   = do st <- call connect
-OK <- login st
-   | BadPassword => do putStrLn \"Failure\"
-   fc <- read failcount
-   write failcount (fc + 1)
-   putStrLn (\"Number of failures: \" ++ show (fc 
+ 1))
-   disconnect st
-   getData failcount
-secret <- readSecret st
-putStrLn (\"Secret is: \" ++ show secret)
-logout st
-disconnect st
-getData failcount
-
-getData2 : (ConsoleIO m, DataStore m) =>
-   (st, failcount : Var) ->
-   ST m () \[st ::: Store {m} LoggedOut, failcount ::: State Integer]
-getData2 st failcount
-   = do OK <- login st
-   | BadPassword => do putStrLn \"Failure\"
-   fc <- read failcount
-   write failcount (fc + 1)
-   putStrLn (\"Number of failures: \" ++ show (fc 
+ 1))
-   getData2 st failcount
-secret <- readSecret st
-putStrLn (\"Secret is: \" ++ show secret)
-logout st
-getData2 st failcount"
-(goto-char (point-max))
-(idris-backward-toplevel)
-(should (looking-at "getData2 st"))
-;; (goto-char (point-max))
-(search-backward "Number")
-(idris-backward-toplevel)
-(should (looking-at "getData failcount"))
-(search-backward "LoggedIn")
-(idris-backward-toplevel)
-(should (looking-at "interface DataStore"))
-))
-
-(ert-deftest idris-forward-toplevel-navigation-test-2pTac9 ()
-  "Test idris-forard-toplevel navigation command."
-  (idris-test-with-temp-buffer-point-min
-"interface DataStore (m : Type -> Type) where
-  data Store : Access -> Type
-
-  connect : ST m Var \[add (Store LoggedOut)]
-  disc

[elpa] externals/hiddenquote 0a4ce32170: ; Remove unused variable in hiddenquote-transpose-chars

2022-12-06 Thread ELPA Syncer
branch: externals/hiddenquote
commit 0a4ce3217011ce67bc8b2d565e9e316983c0c5be
Author: Mauro Aranda 
Commit: Mauro Aranda 

; Remove unused variable in hiddenquote-transpose-chars
---
 hiddenquote.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/hiddenquote.el b/hiddenquote.el
index 346a49d207..dc16e9de85 100644
--- a/hiddenquote.el
+++ b/hiddenquote.el
@@ -1423,7 +1423,6 @@ point to the next word."
   (let* ((ch1 (widget-at))
  (parent (widget-get ch1 :parent))
  (children (widget-get parent :children))
- (length (length children))
  (n (seq-position children ch1))
  (ch2 (if (= n 0)
   (user-error "Can't transpose the first character in a word")



[nongnu] elpa/cider b11991245f: [Fix #3277] Fix cider-clojurescript-present-p (#3280)

2022-12-06 Thread ELPA Syncer
branch: elpa/cider
commit b11991245f6fb6e183757da66f47cc5d04221ae1
Author: Benjamin <38900087+benjamin-a...@users.noreply.github.com>
Commit: GitHub 

[Fix #3277] Fix cider-clojurescript-present-p (#3280)
---
 cider.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/cider.el b/cider.el
index 116f6c7820..5031096f70 100644
--- a/cider.el
+++ b/cider.el
@@ -780,7 +780,12 @@ Generally you should not disable this unless you run into 
some faulty check."
 
 (defun cider-clojurescript-present-p ()
   "Return non nil when ClojureScript is present."
-  (nrepl-dict-get (cider-sync-tooling-eval "cljs.core/demunge") "value"))
+  (or
+   ;; This is nil for example for nbb.
+   (cider-library-present-p "cljs.core")
+   ;; demunge is not defined currently for normal cljs repls.
+   ;; So we end up making the two checks
+   (nrepl-dict-get (cider-sync-tooling-eval "cljs.core/demunge") "value")))
 
 (defun cider-verify-clojurescript-is-present ()
   "Check whether ClojureScript is present."



[elpa] externals/url-scgi 16611431bc: Re-add support for Emacs 24.3

2022-12-06 Thread ELPA Syncer
branch: externals/url-scgi
commit 16611431bceb6a046ca19719ae97c6ba19780451
Author: Stefan Kangas 
Commit: Stefan Kangas 

Re-add support for Emacs 24.3
---
 .github/workflows/test.yml | 4 
 url-scgi.el| 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index a09e4ea018..7aa57da1db 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -8,7 +8,11 @@ jobs:
 strategy:
   matrix:
 emacs_version:
+- 24.3
+- 24.4
+- 24.5
 - 25.1
+- 25.2
 - 25.3
 - 26.1
 - 26.2
diff --git a/url-scgi.el b/url-scgi.el
index b4ae3c4d91..510495a9e4 100644
--- a/url-scgi.el
+++ b/url-scgi.el
@@ -5,7 +5,7 @@
 ;; Author: Stefan Kangas 
 ;; Version: 0.8
 ;; Keywords: comm, data, processes, scgi
-;; Package-Requires: ((emacs "25.1"))
+;; Package-Requires: ((emacs "24.3"))
 ;; URL: https://github.com/skangas/url-scgi/
 ;; SPDX-License-Identifier: GPL-3.0-or-later
 



[nongnu] elpa/eat e287487b42 6/9: Document everything about shell integration

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit e287487b42e3698faaa96c2fd60f5def978886f1
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Document everything about shell integration

* eat.texi (Shell Integration): Move to be the first chapter of
Part III.  Document everything about shell integration.
* eat.texi (Directory Tracking): Merge with the node 'Shell
Integration'.
---
 eat.texi | 161 ++-
 1 file changed, 107 insertions(+), 54 deletions(-)

diff --git a/eat.texi b/eat.texi
index f1dbe23690..b5e492d205 100644
--- a/eat.texi
+++ b/eat.texi
@@ -65,13 +65,12 @@ Basic Operations
 * Input Modes:: Input modes for various use-cases.
 
 Advanced Customizations
+* Shell Integration::   Getting the most from Eat and your shell.
 * Display:: The region where everything is shown.
 * Scrollback::  Region for things that went out of display.
 * Cursor Types::Cursor can displayed in many forms.
 * Mouse Tracking::  Eat tracks mouse, but this can be changed.
 * Clipboard::   Integrating kill ring with terminal.
-* Directory Tracking::  Tracking the working directory of program.
-* Shell Integration::   Getting the most from Eat and your shell.
 * Colors::  Eat can show more than sixteen million colors.
 * Fonts::   Eat can show up to sixty font different fonts.
 * Blinking Text::   Annoying blinking texts.
@@ -104,7 +103,7 @@ Firstly, it's in Emacs, which means you don't need to leave 
the
 comfort of Emacs to use Emacs.
 
 Secondly, it's easy and convenient to use.  It is tries to stay out of
-your way, allow you to maximize your productivity.
+your way, allowing you to maximize your productivity.
 
 Finally, special care has been taken while designing the keybindings,
 so that the terminal doesn't conflict with Emacs default keybindings
@@ -327,6 +326,111 @@ command @command{eshell-toggle-direct-send} is remapped 
to enable
 
 @part Part III:@* Advanced Customizations
 
+@node Shell Integration
+@cindex shell integration
+@cindex integration, shell
+@chapter Shell Integration
+
+Eat comes with shell scripts to integrate your favorite shell with
+Eat.  When shell integration is enabled and the script is loaded in
+your shell, it'll take care of everything and provide many useful
+features.
+
+Currently only GNU Bash is supported.
+
+If you use GNU Bash, put the following in your @samp{.bashrc} file:
+
+@example
+[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && \
+  source "$EAT_SHELL_INTEGRATION_DIR/bash"
+@end example
+
+@cindex directory tracking
+@cindex tracking directory
+@cindex working directory tracking
+@cindex tracking working directory
+@cindex cwd tracking
+@cindex tracking cwd
+After you've setup shell integration, the Eat will track the working
+directory of your shell.  That means @command{find-file} will start
+from your shell's current working directory.  This also works in
+Eshell, but after the program exits, the current working directory is
+changed back to the directory from where the program was invoked.
+
+@vindex eat-enable-directory-tracking
+@defopt eat-enable-directory-tracking
+This controls directory tracking.  When set to non-@code{nil}, Eat
+tracks the current working directory of programs.
+@end defopt
+
+@cindex shell prompt navigation
+@cindex shell navigation, shell prompt
+@cindex prompt navigation
+@cindex navigation, prompt
+@kindex C-c C-p @r{(``emacs mode''})
+@kindex C-c C-p @r{(``semi-char mode'')}
+@findex eat-previous-shell-prompt
+@kindex C-c C-n @r{(``emacs mode'')}
+@kindex C-c C-n @r{(``semi-char mode'')}
+@findex eat-next-shell-prompt
+You can navigate shell prompts in ``emacs'' and ``semi-char'' mode.
+@kbd{C-c C-p}, bound to @command{eat-previous-shell-prompt}, goes to
+the previous shell prompt.  @kbd{C-c C-n}, bound to
+@command{eat-next-shell-prompt}, is the opposite, it goes to the next
+shell prompt.  This doesn't work in Eshell.
+
+@cindex shell prompt annotation
+@cindex annotation, shell prompt
+@cindex annotate, shell prompt
+@cindex prompt annotation
+@cindex annotation, prompt
+@cindex annotate, prompt
+When shell integration is setup, Eat annotates each shell prompt.  Eat
+puts a mark on the shell prompt indicating the whether the command
+entered in that prompt is running, exited successfully or exited with
+non-zero status.  This doesn't work in Eshell.  You can disable this
+feature if you want.
+
+@vindex eat-enable-shell-prompt-annotation
+@defopt eat-enable-shell-prompt-annotation
+This controls shell prompt annotation by Eat.  When set to
+non-@code{nil}, Eat annotates shell prompts to indicate the status of
+the command entered in that prompt.
+@end defopt
+
+Eat uses the marginal area
+(@pxref{Display Margins,,, emacs, GNU Emacs Manual}) on the left side
+to display the annotation.  You also use the right margin.
+
+@vindex eat-shell-prompt-annotation-position
+@defopt eat-shell-prompt-annotation-position
+This c

[nongnu] elpa/eat 62a09caef1 7/9: * eat.el (eat--t-term): Fix initial value of 'cwd'

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit 62a09caef1fc4a8219eefe74b3902bfa09ffc4eb
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

* eat.el (eat--t-term): Fix initial value of 'cwd'
---
 eat.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/eat.el b/eat.el
index 9853c7e75c..5ab017e3c2 100644
--- a/eat.el
+++ b/eat.el
@@ -742,7 +742,7 @@ For example: when THRESHOLD is 3, \"*foobarbaz\" is 
converted to
   (end nil :documentation "End of terminal area.")
   (title "" :documentation "The title of the terminal.")
   (cwd
-   default-directory
+   (cons (system-name) default-directory)
:documentation "The working directory of the terminal.")
   (bell-fn
(1value #'ignore)



[nongnu] elpa/eat 8188f71562 8/9: * eat-tests.el (eat-test-set-cwd): Update test

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit 8188f71562d6dac35b747a63bd16ec06e0396724
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

* eat-tests.el (eat-test-set-cwd): Update test
---
 eat-tests.el | 33 -
 1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/eat-tests.el b/eat-tests.el
index 476072587c..0fa1677e81 100644
--- a/eat-tests.el
+++ b/eat-tests.el
@@ -5752,25 +5752,32 @@ Write plain text and newline to move cursor."
 (ert-deftest eat-test-set-cwd ()
   "Test setting current working directory."
   (eat--tests-with-term '()
-(let ((cwd default-directory))
-  (should (string= (eat-term-cwd (terminal)) default-directory))
+(let ((cwd default-directory)
+  (host (system-name)))
+  (should (string= (car (eat-term-cwd (terminal))) host))
+  (should (string= (cdr (eat-term-cwd (terminal))) cwd))
   (setf (eat-term-set-cwd-function (terminal))
-(lambda (term dir)
+(lambda (term hostname dir)
   (should (eq term (terminal)))
-  (setq cwd dir)))
+  (setq cwd dir)
+  (setq host hostname)))
   ;; file://HOST/PATH/.
-  (output (format "\e]7;file://%s/foo/bar/\e\\" (system-name)))
+  (output (format "\e]51;e;A;%s;%s\e\\"
+  (base64-encode-string "frob")
+  (base64-encode-string "/foo/bar/")))
+  (should (string= host "frob"))
+  (should (string= (car (eat-term-cwd (terminal))) "frob"))
   (should (string= cwd "/foo/bar/"))
-  (should (string= (eat-term-cwd (terminal)) "/foo/bar/"))
+  (should (string= (cdr (eat-term-cwd (terminal))) "/foo/bar/"))
+  (should-term :cursor '(1 . 1))
   ;; file://HOST/PATH (note the missing trailing slash).
-  (output (format "\e]7;file://%s/bar/baz\a" (system-name)))
+  (output (format "\e]51;e;A;%s;%s\e\\"
+  (base64-encode-string "foo")
+  (base64-encode-string "/bar/baz")))
+  (should (string= host "foo"))
+  (should (string= (car (eat-term-cwd (terminal))) "foo"))
   (should (string= cwd "/bar/baz/"))
-  (should (string= (eat-term-cwd (terminal)) "/bar/baz/"))
-  ;; file://SOME-OTHER-HOST/PATH/
-  (output (format "\e]7;file://%s/baz/foo/\e\\"
-  (if (string= (system-name) "foo") "bar" "foo")))
-  (should (string= cwd "/bar/baz/"))
-  (should (string= (eat-term-cwd (terminal)) "/bar/baz/"))
+  (should (string= (cdr (eat-term-cwd (terminal))) "/bar/baz/"))
   (should-term :cursor '(1 . 1)
 
 



[nongnu] elpa/eat b4d07cb474 2/9: Add shell commands run in Eat to Emacs history

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit b4d07cb4740d8e3cf36e523d7d8fae70361a144e
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Add shell commands run in Eat to Emacs history

* eat.el (eat-enable-shell-command-history): New user option.
* eat.el (eat--set-cmd): New function.
* eat.el (eat-exec, eat--eshell-setup-proc-and-term): Call
'eat--set-cmd' when the shell reports the command being run.
---
 eat.el | 22 --
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/eat.el b/eat.el
index 249ee93e1d..2c2908b80a 100644
--- a/eat.el
+++ b/eat.el
@@ -151,6 +151,16 @@ to setup your shell."
   :group 'eat-ui
   :group 'eat-eshell)
 
+(defcustom eat-enable-shell-command-history t
+  "Non-nil means add shell commands to Emacs history.
+
+When non-nil, any command you run in your shell will also appear in
+the history of commands like `eat', `shell-command' and
+`async-shell-command'."
+  :type 'boolean
+  :group 'eat-ui
+  :group 'eat-eshell)
+
 (defconst eat--cursor-type-value-type
   (let ((cur-type
  '(choice
@@ -4159,6 +4169,12 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
  (string= host (system-name)))
 (ignore-errors
   (cd-absolute cwd
+
+(defun eat--set-cmd (_ cmd)
+  "Add CMD to `shell-command-history'."
+  (when eat-enable-shell-command-history
+(add-to-history 'shell-command-history cmd)))
+
 
 ; Input.
 
@@ -4799,7 +4815,8 @@ same Eat buffer.  The hook `eat-exec-hook' is run after 
each exec."
 (eat-term-manipulate-selection-function eat--terminal)
 #'eat--manipulate-kill-ring
 (eat-term-ring-bell-function eat--terminal) #'eat--bell
-(eat-term-set-cwd-function eat--terminal) #'eat--set-cwd)
+(eat-term-set-cwd-function eat--terminal) #'eat--set-cwd
+(eat-term-set-cmd-function eat--terminal) #'eat--set-cmd)
   ;; Crank up a new process.
   (let* ((size (eat-term-size eat--terminal))
  (process-environment
@@ -5064,7 +5081,8 @@ PROGRAM can be a shell command."
   (eat-term-manipulate-selection-function eat--terminal)
   #'eat--manipulate-kill-ring
   (eat-term-ring-bell-function eat--terminal) #'eat--bell
-  (eat-term-set-cwd-function eat--terminal) #'eat--set-cwd)
+  (eat-term-set-cwd-function eat--terminal) #'eat--set-cwd
+  (eat-term-set-cmd-function eat--terminal) #'eat--set-cmd)
 (when-let* ((window (get-buffer-window nil t)))
   (with-selected-window window
 (eat-term-resize eat--terminal (window-max-chars-per-line)



[nongnu] elpa/eat 2c6afa4dc0 4/9: Add shell prompt navigation commands

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit 2c6afa4dc0506054de717260d12fbf936317da47
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Add shell prompt navigation commands

* eat.el (eat--post-prompt): Add special text property on the
last character of shell prompt.
* eat.el (eat-previous-shell-prompt, eat-next-shell-prompt):
New command.
* eat.el (eat-mode-map): Bind 'eat-previous-shell-prompt' and
'eat-next-shell-prompt' to 'C-c C-p' and 'C-c C-n'
respectively.
---
 eat.el | 41 -
 1 file changed, 40 insertions(+), 1 deletion(-)

diff --git a/eat.el b/eat.el
index 824277e028..e00bf649a7 100644
--- a/eat.el
+++ b/eat.el
@@ -4279,7 +4279,10 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
  (list 'eat--before-string before-str
'eat--shell-prompt-mark-id identifier
'eat--shell-prompt-mark-overlay ov))
-(push ov eat--shell-prompt-mark-overlays)))
+(push ov eat--shell-prompt-mark-overlays))
+  ;; Put a text property to allow previous or next prompts.
+  (put-text-property (1- (point)) (point)
+ 'eat--shell-prompt-end t))
 (setq eat--shell-prompt-begin nil)
 
 (defun eat--update-shell-prompt-mark-overlays (buffer)
@@ -4351,6 +4354,40 @@ BUFFER is the terminal buffer."
 ;; We'll update the mark later when the prompt appears.
 (setq eat--shell-command-status code)))
 
+(defun eat-previous-shell-prompt (&optional arg)
+  "Go to the previous shell prompt.
+
+When numeric prefix argument, ARG, is given, go to ARGth previous
+shell prompt."
+  (interactive "p")
+  (dotimes (_ (or arg 1))
+(let ((previous (previous-single-property-change
+ (point) 'eat--shell-prompt-end)))
+  (goto-char (or previous (point-min)))
+  (when (get-text-property (point) 'eat--shell-prompt-end)
+(setq previous (previous-single-property-change
+(point) 'eat--shell-prompt-end))
+(goto-char (or previous (point-min
+  (unless previous
+(user-error "No previous prompt")
+
+(defun eat-next-shell-prompt (&optional arg)
+  "Go to the next shell prompt.
+
+When numeric prefix argument, ARG, is given, go to ARGth next shell
+prompt."
+  (interactive "p")
+  (dotimes (_ (or arg 1))
+(let ((next (next-single-property-change
+ (point) 'eat--shell-prompt-end)))
+  (goto-char (or next (point-max)))
+  (when (get-text-property (point) 'eat--shell-prompt-end)
+(goto-char (or (next-single-property-change
+(point) 'eat--shell-prompt-end)
+   (point-max
+  (unless next
+(user-error "No next prompt")
+
 
 ; Input.
 
@@ -4548,6 +4585,8 @@ ARG is passed to `yank-pop', which see."
 (define-key map [?\C-c ?\M-d] #'eat-char-mode)
 (define-key map [?\C-c ?\C-j] #'eat-semi-char-mode)
 (define-key map [?\C-c ?\C-k] #'eat-kill-process)
+(define-key map [?\C-c ?\C-p] #'eat-previous-shell-prompt)
+(define-key map [?\C-c ?\C-n] #'eat-next-shell-prompt)
 map)
   "Keymap for Eat mode.")
 



[nongnu] elpa/eat updated (d35864ca6b -> 693940c733)

2022-12-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/eat.

  from  d35864ca6b Calculate the number of lines on window properly
   new  9caa496e45 Tighter shell integration
   new  b4d07cb474 Add shell commands run in Eat to Emacs history
   new  a04999011f Annotate shell prompts
   new  2c6afa4dc0 Add shell prompt navigation commands
   new  b42687f146 Fix prompt navigation when annotation is disabled
   new  e287487b42 Document everything about shell integration
   new  62a09caef1 * eat.el (eat--t-term): Fix initial value of 'cwd'
   new  8188f71562 * eat-tests.el (eat-test-set-cwd): Update test
   new  693940c733 * README.org: Add shell integration instructions


Summary of changes:
 README.org   |  10 +
 eat-tests.el |  33 ++-
 eat.el   | 730 ++-
 eat.texi | 161 
 integration/bash |  39 ++-
 5 files changed, 783 insertions(+), 190 deletions(-)



[nongnu] elpa/eat a04999011f 3/9: Annotate shell prompts

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit a04999011f303ec0940cf7edc19b1c98f7608f40
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Annotate shell prompts

* eat.el (eat-enable-shell-prompt-annotation)
(eat-shell-prompt-annotation-position)
(eat-shell-prompt-annotation-running-margin-indicator)
(eat-shell-prompt-annotation-success-margin-indicator)
(eat-shell-prompt-annotation-failure-margin-indicator)
(eat-shell-prompt-annotation-delay): New user option.
* eat.el (eat-shell-prompt-annotation-running)
(eat-shell-prompt-annotation-success)
(eat-shell-prompt-annotation-failure): New face.
* eat.el (eat--shell-command-status, eat--shell-prompt-begin)
(eat--shell-prompt-mark, eat--shell-prompt-mark-overlays): New
variable.
* eat.el (eat--pre-prompt, eat--post-prompt)
(eat--update-shell-prompt-mark-overlays, eat--pre-cmd)
(eat--set-cmd-status): New function.
* eat.el (eat-mode): Make 'eat--shell-command-status',
'eat--shell-prompt-begin', 'eat--shell-prompt-mark',
'eat--shell-prompt-mark-overlays' and
'eat--shell-prompt-annotation-update-timer' local.  Set margin
width if shell prompt annotation is enabled.
* eat.el (eat--shell-prompt-annotation-update-timer): New
variable.
* eat.el (eat--process-output-queue): Call or schedule
'eat--update-shell-prompt-mark-overlays' call.
* eat.el (eat--filter): Cancel timer
'eat--shell-prompt-annotation-update-timer'.
* eat.el (eat-exec): Set prompt start & end and command start &
end functions.
---
 eat.el | 252 -
 1 file changed, 235 insertions(+), 17 deletions(-)

diff --git a/eat.el b/eat.el
index 2c2908b80a..824277e028 100644
--- a/eat.el
+++ b/eat.el
@@ -161,6 +161,63 @@ the history of commands like `eat', `shell-command' and
   :group 'eat-ui
   :group 'eat-eshell)
 
+(defcustom eat-enable-shell-prompt-annotation t
+  "Non-nil means annotate shell prompt with the status of command.
+
+When non-nil, display a mark in front of shell prompt describing the
+status of the command executed in that prompt."
+  :type 'boolean
+  :group 'eat-ui)
+
+(defcustom eat-shell-prompt-annotation-position 'left-margin
+  "The position where to display shell prompt annotation.
+
+The value can be one of the following:
+
+`left-margin'   Use the left margin.
+`right-margin'  Use the right margin."
+  :type '(choice (const :tag "Left margin" left-margin)
+ (const :tag "Right margin" right-margin))
+  :group 'eat-ui)
+
+(defcustom eat-shell-prompt-annotation-running-margin-indicator "-"
+  "String in margin annotation to indicate the command is running."
+  :type 'string
+  :group 'eat-ui)
+
+(defface eat-shell-prompt-annotation-running
+  '((t :inherit compilation-info))
+  "Face used in annotation to indicate the command is running."
+  :group 'eat-ui)
+
+(defcustom eat-shell-prompt-annotation-success-margin-indicator "0"
+  "String in margin annotation to indicate the command has succeeded."
+  :type 'string
+  :group 'eat-ui)
+
+(defface eat-shell-prompt-annotation-success
+  '((t :inherit success))
+  "Face used in annotation to indicate the command has succeeded."
+  :group 'eat-ui)
+
+(defcustom eat-shell-prompt-annotation-failure-margin-indicator "X"
+  "String in margin annotation to indicate the command has failed."
+  :type 'string
+  :group 'eat-ui)
+
+(defface eat-shell-prompt-annotation-failure
+  '((t :inherit error))
+  "Face used in annotation to indicate the command has failed."
+  :group 'eat-ui)
+
+(defcustom eat-shell-prompt-annotation-delay 0.1
+  "Seconds to wait before updating prompt annotations.
+
+Nil means update immediately."
+  :type '(choice (const :tag "Immediately" nil)
+ number)
+  :group 'eat-ui)
+
 (defconst eat--cursor-type-value-type
   (let ((cur-type
  '(choice
@@ -4112,6 +4169,18 @@ return \"eat-color\", otherwise return \"eat-mono\"."
 (defvar eat--synchronize-scroll-function nil
   "Function to synchronize scrolling between terminal and window.")
 
+(defvar eat--shell-command-status 0
+  "If the current shell command has finished, its exit status.")
+
+(defvar eat--shell-prompt-begin nil
+  "Beginning of last shell prompt.")
+
+(defvar eat--shell-prompt-mark nil
+  "Display property used to put a mark before the previous prompt.")
+
+(defvar eat--shell-prompt-mark-overlays nil
+  "List of overlay used to put marks before shell prompts.")
+
 (defun eat-reset ()
   "Perform a terminal reset."
   (interactive)
@@ -4170,11 +4239,118 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
 (ignore-errors
   (cd-absolute cwd
 
+(defun eat--pre-prompt (_)
+  "Save the beginning position of shell prompt."
+  (when eat-enable-shell-prompt-annotation
+(setq eat--shell-prompt-begin (point-marker
+
+(defun eat--post-prompt (_)
+  "Put a mark in the marginal area on current line."
+  (when eat-enable-shell-prompt-annotati

[nongnu] elpa/eat 693940c733 9/9: * README.org: Add shell integration instructions

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit 693940c73351a19eaa099006e89d44d20ee1b474
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

* README.org: Add shell integration instructions
---
 README.org | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/README.org b/README.org
index ffc31962a4..1c4d596145 100644
--- a/README.org
+++ b/README.org
@@ -15,6 +15,8 @@ have, for example complete mouse support.
 It flickers less than other Emacs terminal emulator, so you get more
 performance and a smooth experience.
 
+To get the most out of Eat, you should also setup shell integration.
+
 * Usage
 
 To start Eat, run =M-x eat=.  Eat has three keybinding modes:
@@ -62,6 +64,14 @@ following:
 (add-hook 'eshell-first-time-mode-hook #'eat-eshell-mode)
 #+end_src
 
+To setup shell integration for GNU Bash, put the following at the end
+of your ~.bashrc~:
+
+#+begin_src sh
+[ -n "$EAT_SHELL_INTEGRATION_DIR" ] && \
+  source "$EAT_SHELL_INTEGRATION_DIR/bash"
+#+end_src sh
+
 * Installation
 
 Eat requires at least Emacs 28.1 or above.



[nongnu] elpa/eat b42687f146 5/9: Fix prompt navigation when annotation is disabled

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit b42687f1466f48bfb3453d55441f98e30fba8e98
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Fix prompt navigation when annotation is disabled

* eat.el (eat--pre-prompt): Always set
'eat--shell-prompt-begin'.
* eat.el (eat--post-prompt): Always put special prompt end
marking text property.
---
 eat.el | 15 ---
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/eat.el b/eat.el
index e00bf649a7..9853c7e75c 100644
--- a/eat.el
+++ b/eat.el
@@ -4241,8 +4241,7 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
 
 (defun eat--pre-prompt (_)
   "Save the beginning position of shell prompt."
-  (when eat-enable-shell-prompt-annotation
-(setq eat--shell-prompt-begin (point-marker
+  (setq eat--shell-prompt-begin (point-marker)))
 
 (defun eat--post-prompt (_)
   "Put a mark in the marginal area on current line."
@@ -4279,11 +4278,13 @@ If HOST isn't the host Emacs is running on, don't do 
anything."
  (list 'eat--before-string before-str
'eat--shell-prompt-mark-id identifier
'eat--shell-prompt-mark-overlay ov))
-(push ov eat--shell-prompt-mark-overlays))
-  ;; Put a text property to allow previous or next prompts.
-  (put-text-property (1- (point)) (point)
- 'eat--shell-prompt-end t))
-(setq eat--shell-prompt-begin nil)
+(push ov eat--shell-prompt-mark-overlays)))
+(setq eat--shell-prompt-begin nil
+  (when eat--shell-prompt-begin
+(when (< eat--shell-prompt-begin (point))
+  ;; Put a text property to allow previous or next prompts.
+  (put-text-property (1- (point)) (point)
+ 'eat--shell-prompt-end t
 
 (defun eat--update-shell-prompt-mark-overlays (buffer)
   "Update all overlays used to add mark before shell prompt.



[nongnu] elpa/eat 9caa496e45 1/9: Tighter shell integration

2022-12-06 Thread ELPA Syncer
branch: elpa/eat
commit 9caa496e454aea4193df2a3638309dd0ddb205ea
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Tighter shell integration

* eat.el (eat--t-term): New slots: 'prompt-start-fn',
'prompt-end-fn', 'cont-prompt-start-fn', 'cont-prompt-end-fn',
'set-cmd-fn', 'cmd-start-fn', 'cmd-finish-fn'
* eat.el (eat--t-set-cwd): Accept three arguments in two
different formats.
* eat.el (eat--t-prompt-start, eat--t-prompt-end)
(eat--t-cont-prompt-start, eat--t-cont-prompt-end)
(eat--t-set-cmd, eat--t-cmd-start, eat--t-cmd-finish): New
function.
* eat.el (eat--t-handle-output): Accept Eat's own
OSC 51 ; e ; ... ST sequences.
* eat.el (eat-term-prompt-start-function)
(eat-term-prompt-end-function)
(eat-term-continuation-prompt-start-function)
(eat-term-continuation-prompt-end-function)
(eat-term-set-cmd-function, eat-term-cmd-start-function)
(eat-term-cmd-finish-function): New generalized variable.
* integration/bash (__eat_current_command, __eat_exit_status):
New variable.
* integration/bash (__eat_prompt_command): Send exit status of
last command, if applicable.  Use Eat specific sequence to
report working directory.  Set title.
* integration/bash (__eat_preexec): Report current command and
execution start.
* integration/bash (__eat_before_prompt_command): Set
'__eat_exit_status' to the exit status of the last command.
* integration/bash (__eat_prompt_start, __eat_prompt_end)
(__eat_continuation_start, __eat_continuation_end): New
variable, used as constant only to make the code more readable.
* integration/bash (__eat_enable_integration): Wrap 'PS1' and
'PS2'.  Don't set title from 'PS1'.
---
 eat.el   | 416 ++-
 integration/bash |  39 +-
 2 files changed, 351 insertions(+), 104 deletions(-)

diff --git a/eat.el b/eat.el
index 6eaacf328c..249ee93e1d 100644
--- a/eat.el
+++ b/eat.el
@@ -689,18 +689,39 @@ For example: when THRESHOLD is 3, \"*foobarbaz\" is 
converted to
   (manipulate-selection-fn
(1value #'ignore)
:documentation "Function to manipulate selection.")
+  (grab-mouse-fn
+   (1value #'ignore)
+   :documentation "Function to grab mouse.")
+  (set-focus-ev-mode-fn
+   (1value #'ignore)
+   :documentation "Function to set focus event mode.")
   (set-title-fn
(1value #'ignore)
-   :documentation "Function to set title.")
+   :documentation "Function to set the title.")
   (set-cwd-fn
(1value #'ignore)
:documentation "Function to set the current working directory.")
-  (grab-mouse-fn
+  (prompt-start-fn
(1value #'ignore)
-   :documentation "Function to grab mouse.")
-  (set-focus-ev-mode-fn
+   :documentation "Function to call when prompt starts.")
+  (prompt-end-fn
(1value #'ignore)
-   :documentation "Function to set focus event mode.")
+   :documentation "Function to call when prompt ends.")
+  (cont-prompt-start-fn
+   (1value #'ignore)
+   :documentation "Function to call when prompt starts.")
+  (cont-prompt-end-fn
+   (1value #'ignore)
+   :documentation "Function to call when prompt ends.")
+  (set-cmd-fn
+   (1value #'ignore)
+   :documentation "Function to set the command being executed.")
+  (cmd-start-fn
+   (1value #'ignore)
+   :documentation "Function to call just before a command is run.")
+  (cmd-finish-fn
+   (1value #'ignore)
+   :documentation "Function to call after a command has finished.")
   (parser-state nil :documentation "State of parser.")
   (scroll-begin 1 :documentation "First line of scroll region.")
   (scroll-end 24 :documentation "Last line of scroll region.")
@@ -,23 +2243,38 @@ MODE should be one of nil and `x10', `normal', 
`button-event',
   ;; Inform the UI.
   (funcall (eat--t-term-set-title-fn eat--t-term) eat--t-term title))
 
-(defun eat--t-set-cwd (url)
+(defun eat--t-set-cwd (format host path)
   "Set the working directory of terminal to URL.
 
-URL should be a URL in the format \"file://HOST/CWD/\"; HOST can be
-empty."
-  (let ((obj (url-generic-parse-url url)))
-(when (and (string= (url-type obj) "file")
-   (or (null (url-host obj))
-   (string= (url-host obj) (system-name
-  (let ((dir (expand-file-name
-  (file-name-as-directory
-   (url-unhex-string (url-filename obj))
-;; Update working directory.
-(setf (eat--t-term-cwd eat--t-term) dir)
-;; Inform the UI.
-(funcall (eat--t-term-set-cwd-fn eat--t-term)
- eat--t-term dir)
+If FORMAT is `base64', HOST should be base64 encoded hostname and PATH
+should be base64 encoded working directory path.
+
+If FORMAT is `url', HOST should be nil and PATH should be an URL in
+the format \"file://HOST/CWD/\"; HOST can be empty."
+  (pcase-exhaustive format
+('base64
+ (let ((dir (ignore-errors (expand-file-name
+(file

[nongnu] elpa/kotlin-mode 55eed95033 2/2: Merge pull request #73 from bricka/improve-indentation

2022-12-06 Thread ELPA Syncer
branch: elpa/kotlin-mode
commit 55eed95033a59d7448a4b2bc11879e62c05e361b
Merge: 99499e1500 8d5b1cada0
Author: Gregg Hernandez 
Commit: GitHub 

Merge pull request #73 from bricka/improve-indentation

Making a number of improvements to the indentation logic
---
 kotlin-mode.el   | 280 ---
 test/kotlin-mode-test.el |  28 +
 test/sample.kt   |  65 +--
 3 files changed, 129 insertions(+), 244 deletions(-)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index f494a26c27..201b00691e 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -155,6 +155,7 @@
 (modify-syntax-entry ?\r "> b" st)
 st))
 
+(defconst kotlin-mode--closing-brackets '(?} ?\) ?\]))
 
 ;;; Font Lock
 
@@ -368,187 +369,13 @@
 (defun kotlin-mode--line-continuation()
   "Return whether this line continues a statement in the previous line"
   (or
-   (and (kotlin-mode--prev-line-begins "\\(if\\|else\\|for\\|while\\)[ \t]*")
+   (and (kotlin-mode--prev-line-begins "\\(if\\|for\\|while\\)[ \t]+(")
+(kotlin-mode--prev-line-ends ")[[:space:]]*\\(\/\/.*\\|\\/\\*.*\\)?"))
+   (and (kotlin-mode--prev-line-begins "else[ \t]*")
+(not (kotlin-mode--prev-line-begins "else [ \t]*->"))
 (not (kotlin-mode--prev-line-ends "{.*")))
(or
-(kotlin-mode--line-begins 
"\\([.=:]\\|->\\|\\(\\(private\\|public\\|protected\\|internal\\)[ 
\t]*\\)?[sg]et\\b\\)")
-(save-excursion
-  (kotlin-mode--prev-line)
-  (kotlin-mode--line-ends "\\([=:]\\|->\\)")
-
-(defun kotlin-mode--base-indentation ()
-  "Return the indentation level of the current line based on brackets only,
-   i.e. ignoring 'continuation' indentation."
-  (cond ((kotlin-mode--line-continuation)
- (- (current-indentation) kotlin-tab-width))
-((kotlin-mode--in-comment-block)
- (- (current-indentation) 1))
-(t
- (current-indentation
-
-(defclass kotlin-mode--bracket-counter ()
-  ((count :initarg :count
-  :initform 0
-  :type integer
-  :documentation "The net bracket count (+1 for open, -1 for close).")
-   (indent :initarg :indent
-   :initform 0
-   :type integer
-   :documentation "The indentation based on bracket layout.")
-   (finished :initarg :finished
- :initform nil
- :type boolean
- :documentation "Whether the counting has finished.")
-   (use-base :initarg :use-base
- :initform t
- :type boolean
- :documentation "Whether to factor out extra indentations."))
-  "A class for counting brackets to find the appropriate bracket-based indent.
-   The logic here involves keeping track of the net-bracket-count,
-   defined as the number of open-brackets minus the number of close-brackets.
-   We scroll backwards until the net-bracket-count is zero, and this point
-   determines the desired indentation level for the current line.")
-
-(defun kotlin-mode--count-to-line-start (counter)
-  "Count the brackets on the current line, starting from the
-cursor position, and working backward, incrementing the count +1
-for open-brackets, -1 for close-brackets.
-
-Mark the COUNTER finished, set indentation, and return as soon as
-the overall count exceeds zero.  If the counter is zero at the
-beginning of the line, Mark the counter finished and set
-indentation.  If we hit a beginning of line but the counter is
-negative, just return without marking finished."
-  (when (nth 4 (syntax-ppss))
-;; If the point is inside a comment, goto the beginning of the comment.
-(goto-char (nth 8 (syntax-ppss
-  (save-excursion
-(let ((line-beginning-position (line-beginning-position)))
-  (while (and (<= (oref counter count) 0) (not (bolp)))
-(forward-comment (- (point)))
-(backward-char)
-(when (< (point) line-beginning-position)
-  (goto-char line-beginning-position))
-(cond ((eq (char-syntax (char-after)) ?\()
-   (cl-incf (oref counter count)))
-  ((eq (char-syntax (char-after)) ?\))
-   (cl-decf (oref counter count))
-;; We are at the beginning of the line, or just before an
-;; unmatching open bracket.
-(cond
- ;; If the net-bracket-count is zero, use this indentation
- ((= (oref counter count) 0)
-  (oset counter finished t)
-  (if (oref counter use-base)
-  ;; Indenting a line that is neither close bracket nor the
-  ;; first element of a block or a list.  Found the previous
-  ;; line.  So align with the previous line, without effect of
-  ;; continued expression at the previous line.
-  (kotlin-mode--add-indent counter (kotlin-mode--base-indentation))
-;; Indenting close bracket or the first element of a block or
-;; a list.  So align with this line, optionally with extra
-;; indentation.
-(kotlin-mode--add-indent counter (current-inde

[nongnu] elpa/kotlin-mode 8d5b1cada0 1/2: Making a number of improvements to the indentation logic

2022-12-06 Thread ELPA Syncer
branch: elpa/kotlin-mode
commit 8d5b1cada00aaea4824b97a4cabdd153efb174fa
Author: Alex Figl-Brick 
Commit: Alex Figl-Brick 

Making a number of improvements to the indentation logic

Major changes:

1. `->` is no longer considered a continuation
2. Control statements without brackets correctly indent the following line

I also simplified quite a bit of the logic by using Emacs's ability to
automatically find enclosing blocks using syntax tables.
---
 kotlin-mode.el   | 280 ---
 test/kotlin-mode-test.el |  28 +
 test/sample.kt   |  65 +--
 3 files changed, 129 insertions(+), 244 deletions(-)

diff --git a/kotlin-mode.el b/kotlin-mode.el
index f494a26c27..201b00691e 100644
--- a/kotlin-mode.el
+++ b/kotlin-mode.el
@@ -155,6 +155,7 @@
 (modify-syntax-entry ?\r "> b" st)
 st))
 
+(defconst kotlin-mode--closing-brackets '(?} ?\) ?\]))
 
 ;;; Font Lock
 
@@ -368,187 +369,13 @@
 (defun kotlin-mode--line-continuation()
   "Return whether this line continues a statement in the previous line"
   (or
-   (and (kotlin-mode--prev-line-begins "\\(if\\|else\\|for\\|while\\)[ \t]*")
+   (and (kotlin-mode--prev-line-begins "\\(if\\|for\\|while\\)[ \t]+(")
+(kotlin-mode--prev-line-ends ")[[:space:]]*\\(\/\/.*\\|\\/\\*.*\\)?"))
+   (and (kotlin-mode--prev-line-begins "else[ \t]*")
+(not (kotlin-mode--prev-line-begins "else [ \t]*->"))
 (not (kotlin-mode--prev-line-ends "{.*")))
(or
-(kotlin-mode--line-begins 
"\\([.=:]\\|->\\|\\(\\(private\\|public\\|protected\\|internal\\)[ 
\t]*\\)?[sg]et\\b\\)")
-(save-excursion
-  (kotlin-mode--prev-line)
-  (kotlin-mode--line-ends "\\([=:]\\|->\\)")
-
-(defun kotlin-mode--base-indentation ()
-  "Return the indentation level of the current line based on brackets only,
-   i.e. ignoring 'continuation' indentation."
-  (cond ((kotlin-mode--line-continuation)
- (- (current-indentation) kotlin-tab-width))
-((kotlin-mode--in-comment-block)
- (- (current-indentation) 1))
-(t
- (current-indentation
-
-(defclass kotlin-mode--bracket-counter ()
-  ((count :initarg :count
-  :initform 0
-  :type integer
-  :documentation "The net bracket count (+1 for open, -1 for close).")
-   (indent :initarg :indent
-   :initform 0
-   :type integer
-   :documentation "The indentation based on bracket layout.")
-   (finished :initarg :finished
- :initform nil
- :type boolean
- :documentation "Whether the counting has finished.")
-   (use-base :initarg :use-base
- :initform t
- :type boolean
- :documentation "Whether to factor out extra indentations."))
-  "A class for counting brackets to find the appropriate bracket-based indent.
-   The logic here involves keeping track of the net-bracket-count,
-   defined as the number of open-brackets minus the number of close-brackets.
-   We scroll backwards until the net-bracket-count is zero, and this point
-   determines the desired indentation level for the current line.")
-
-(defun kotlin-mode--count-to-line-start (counter)
-  "Count the brackets on the current line, starting from the
-cursor position, and working backward, incrementing the count +1
-for open-brackets, -1 for close-brackets.
-
-Mark the COUNTER finished, set indentation, and return as soon as
-the overall count exceeds zero.  If the counter is zero at the
-beginning of the line, Mark the counter finished and set
-indentation.  If we hit a beginning of line but the counter is
-negative, just return without marking finished."
-  (when (nth 4 (syntax-ppss))
-;; If the point is inside a comment, goto the beginning of the comment.
-(goto-char (nth 8 (syntax-ppss
-  (save-excursion
-(let ((line-beginning-position (line-beginning-position)))
-  (while (and (<= (oref counter count) 0) (not (bolp)))
-(forward-comment (- (point)))
-(backward-char)
-(when (< (point) line-beginning-position)
-  (goto-char line-beginning-position))
-(cond ((eq (char-syntax (char-after)) ?\()
-   (cl-incf (oref counter count)))
-  ((eq (char-syntax (char-after)) ?\))
-   (cl-decf (oref counter count))
-;; We are at the beginning of the line, or just before an
-;; unmatching open bracket.
-(cond
- ;; If the net-bracket-count is zero, use this indentation
- ((= (oref counter count) 0)
-  (oset counter finished t)
-  (if (oref counter use-base)
-  ;; Indenting a line that is neither close bracket nor the
-  ;; first element of a block or a list.  Found the previous
-  ;; line.  So align with the previous line, without effect of
-  ;; continued expression at the previous line.
-  (kotlin-mode--add-indent counter (kotlin-mode--base-indentation))
-  

[elpa] externals/poke updated (6c2f906053 -> 314387d108)

2022-12-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/poke.

  from  6c2f906053 doc: fix location of the git repo for poke.el
   new  fbd1bd1fcf poke.el: update protocol in `poke-out-handle-cmd'
   new  314387d108 poke.el: update protocol in `poke-complete-handle-cmd'


Summary of changes:
 poke.el | 20 
 1 file changed, 12 insertions(+), 8 deletions(-)



[elpa] externals/poke 314387d108 2/2: poke.el: update protocol in `poke-complete-handle-cmd'

2022-12-06 Thread ELPA Syncer
branch: externals/poke
commit 314387d108be30951045a9422475fc7c70b92e8a
Author: Mohammad-Reza Nabipoor 
Commit: Mohammad-Reza Nabipoor 

poke.el: update protocol in `poke-complete-handle-cmd'
---
 poke.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/poke.el b/poke.el
index 4c9100947b..b8dd85fd1d 100644
--- a/poke.el
+++ b/poke.el
@@ -709,7 +709,11 @@ buffer."
 
 (defun poke-complete-handle-cmd (proc cmd data)
   (pcase cmd
-(1 ; Complete identifier: variable, type, function, unit.
+(1 ; Completion iteration begin.  Unused
+ )
+(2 ; Completion iteration end.  Unused
+ )
+(4 ; Complete identifier: variable, type, function, unit.
  (let ((alternatives nil))
(with-current-buffer (process-buffer proc)
  (delete-region (point-min) (point-max))
@@ -734,7 +738,7 @@ buffer."
(completion-in-region poke-repl-complete-begin
  poke-repl-complete-end
  poke-complete-alternatives)
-(2 ; Complete IO space.  Unused
+(5 ; Complete IO space.  Unused
  )
 (_ ;; Protocol error
  (process-put proc 'pokelet-buf "")



[elpa] externals/poke fbd1bd1fcf 1/2: poke.el: update protocol in `poke-out-handle-cmd'

2022-12-06 Thread ELPA Syncer
branch: externals/poke
commit fbd1bd1fcfd67096bbe99b69b6e901b312b19896
Author: Mohammad-Reza Nabipoor 
Commit: Mohammad-Reza Nabipoor 

poke.el: update protocol in `poke-out-handle-cmd'
---
 poke.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/poke.el b/poke.el
index f9141cc442..4c9100947b 100644
--- a/poke.el
+++ b/poke.el
@@ -262,7 +262,7 @@ following attributes in its alist:
(with-current-buffer (process-buffer proc)
  (goto-char (point-max))
  (process-put proc 'poke-out-iter-begin (point)
-(3 ;; Iteration end
+(2 ;; Iteration end
  (when (buffer-live-p (process-buffer proc))
(with-current-buffer (process-buffer proc)
  (save-excursion
@@ -275,7 +275,7 @@ following attributes in its alist:
  (process-put proc 'poke-out-emitted-iter-string nil)
  (when (process-live-p poke-repl-process)
(poke-repl-end-of-iteration (process-get proc 'poke-out-eval
-(2 ;; Process terminal poke output
+(4 ;; Process terminal poke output
  (let ((output (poke-out-stylize
 (process-get proc 'poke-out-styles) data)))
(when (buffer-live-p (process-buffer proc))
@@ -287,7 +287,7 @@ following attributes in its alist:
  (insert (concat poke-out-iter-string "\n"))
  (process-put proc 'poke-out-emitted-iter-string t))
(insert output)))
-(6 ;; Process eval poke output
+(7 ;; Process eval poke output
  (let ((output (poke-out-stylize
 (process-get proc 'poke-out-styles) data)))
;; Append the output to the global variable which will be
@@ -302,7 +302,7 @@ following attributes in its alist:
  (let ((inhibit-read-only t))
(goto-char (point-max))
(insert (concat ">" output
-(7 ;; Error output
+(3 ;; Error output
  (let ((output (poke-out-stylize
 (process-get proc 'poke-out-styles) data)))
;; Append to the eval output for now.
@@ -316,12 +316,12 @@ following attributes in its alist:
  (let ((inhibit-read-only t))
(goto-char (point-max))
(insert (concat "error>" output
-(4 ;; Styling class begin
+(5 ;; Styling class begin
  (let ((style data))
(process-put proc
 'poke-out-styles
 (cons style (process-get proc 'poke-out-styles)
-(5 ;; Styling class end
+(6 ;; Styling class end
  (let ((style data)
(styles (process-get proc 'poke-out-styles)))
(if (or (not styles)



[nongnu] elpa/sweeprolog 0e324b3216: Announce recent changes in NEWS.org and bump version to 0.9.4

2022-12-06 Thread ELPA Syncer
branch: elpa/sweeprolog
commit 0e324b3216ff031104fefbdb23e081d88ed1e7f6
Author: Eshel Yaron 
Commit: Eshel Yaron 

Announce recent changes in NEWS.org and bump version to 0.9.4
---
 NEWS.org| 17 +
 README.org  | 36 +++-
 sweeprolog-tests.el | 32 
 sweeprolog.el   |  2 +-
 4 files changed, 77 insertions(+), 10 deletions(-)

diff --git a/NEWS.org b/NEWS.org
index 0d1a0eb46a..8f785a5e25 100644
--- a/NEWS.org
+++ b/NEWS.org
@@ -11,6 +11,23 @@ SWI-Prolog in Emacs.
 For further details, please consult the manual:
 .
 
+* Version 0.9.4 on 2022-12-06
+
+** New minor mode for moving to holes with ~TAB~
+
+This version introduces a new minor mode
+~sweeprolog-forward-hole-on-tab-mode~, which binds ~TAB~ to a command that
+moves either indents the current line or moves to the next hole in the
+buffer, in a DWIM fashion.
+
+** Fixes and minor improvements
+
+- Automatic indentation is improved to accommodate for DCG RHS
+  contexts and SSU guards.
+- ~sweeprolog-identifier-at-point~ now qualifies head terms with
+  according to the current module (e.g. ~foo:bar/2~ is returned when
+  point is over ~bar(_, _)~ in module ~foo~).
+
 * Version 0.9.3 on 2022-11-27
 
 ** Added repeat keymap for ~sweeprolog-forward-hole~ (Emacs 28+)
diff --git a/README.org b/README.org
index 03115c0e9b..e3b19e9a27 100644
--- a/README.org
+++ b/README.org
@@ -158,9 +158,8 @@ corresponds to =argv[0]=.
 #+VINDEX: sweeprolog-init-args
 ~sweep~ loads and initializes Prolog on-demand at the first invocation
 of a command that requires the embedded Prolog.  The arguments used to
-initialize Prolog in case are determined by the value of the
-user-option ~sweeprolog-init-args~ which the user is free to extend with
-e.g.:
+initialize Prolog are then determined by the value of the user-option
+~sweeprolog-init-args~ which the user is free to extend with e.g.:
 
 #+begin_src emacs-lisp
   (add-to-list 'sweeprolog-init-args "--stack-limit=512m")
@@ -171,6 +170,31 @@ The default value of ~sweeprolog-init-args~ is set to load 
the Prolog
 helper library =sweep.pl= and to create a boolean Prolog flag ~sweep~, set
 to ~true~, which indicates to SWI-Prolog that it is running under ~sweep~.
 
+#+CINDEX: command line arguments
+#+FINDEX: sweeprolog-handle-command-line-args
+It is also possible to specify initialization arguments to SWI-Prolog
+by passing them as command line arguments to Emacs, which can be
+convenient when using Emacs and =sweep= as an alternative for the common
+shell-based interaction with SWI-Prolog.  This is achieved by adding
+the flag ~--swipl-args~ followed by any number of arguments intended for
+SWI-Prolog, with a single semicolon (";") argument marking the end of
+the SWI-Prolog arguments, after which further arguments are processed
+by Emacs as usual (see [[info:emacs#Emacs Invocation][Emacs Invocation]] for 
more information about
+Emacs's command line options), for example:
+
+#+begin_src sh
+  emacs --some-emacs-option --swipl-args -l foobar.pl \; --more-emacs-options
+#+end_src
+
+In order for =sweep= to be able to handle Emacs's command line
+arguments, the function ~sweeprolog-handle-command-line-args~ must be
+called before Emacs processes the ~--swipl-args~ argument.  This can be
+ensured by calling it from the command line as well:
+
+#+begin_src sh
+  emacs -f sweeprolog-handle-command-line-args --swipl-args -l foobar.pl \;
+#+end_src
+
 #+FINDEX: sweeprolog-restart
 The embedded Prolog runtime can be reset using the command
 ~sweeprolog-restart~.  This command cleans up the the Prolog state and
@@ -1712,12 +1736,6 @@ there some further improvements that we want to pursue:
   directories containing SWI-Prolog =pack.pl= package definitions as
   root project directories.
 
-- Add command line arguments handling for Prolog flags :: ~sweep~ should
-  make it easy to specify Prolog initialization arguments (see 
[[#prolog-init][Prolog
-  initialization and cleanup]]) already in the Emacs command line
-  invocation.  One way to achieve that would be to extend
-  ~command-line-functions~ with a custom command line arguments handler.
-
 - Extend the provided Elisp-Prolog interface :: Currently, the Elisp
   interface that ~sweep~ provides for querying Prolog only allows
   calling directly to predicates of arity 2 (see [[#querying-prolog][Querying 
Prolog]]),
diff --git a/sweeprolog-tests.el b/sweeprolog-tests.el
index 46a4c612a4..43abff1745 100644
--- a/sweeprolog-tests.el
+++ b/sweeprolog-tests.el
@@ -762,6 +762,38 @@ bar(X) :- permutation(X, [1,2,3]).
 "
  
 
+(ert-deftest update-dependencies-autoload-from-package ()
+  "Tests making implicit autoloads from a package explicit."
+  (let ((temp (make-temp-file "sweeprolog-test"
+  nil
+  "pl"
+  "
+:- module(foo, [bar/1]).
+
+/**  F

[elpa] externals/cape 351d7a65fc: Add Elixir keywords (#68)

2022-12-06 Thread ELPA Syncer
branch: externals/cape
commit 351d7a65fc8ac76d7d5c737354ed7b2d7750b261
Author: Ashton Wiersdorf 
Commit: GitHub 

Add Elixir keywords (#68)
---
 cape-keyword.el | 17 +
 1 file changed, 17 insertions(+)

diff --git a/cape-keyword.el b/cape-keyword.el
index 8d046e040c..29ca19dc52 100644
--- a/cape-keyword.el
+++ b/cape-keyword.el
@@ -85,6 +85,23 @@
  "super" "switch" "synchronized" "template" "this" "throw" "true" "try"
  "typedef" "typeid" "typeof" "ubyte" "ucent" "uint" "ulong" "union"
  "unittest" "ushort" "version" "void" "volatile" "wchar" "while" "with")
+(elixir-mode ;; https://hexdocs.pm/elixir/Kernel.html
+ "__CALLER__" "__DIR__" "__ENV__" "__MODULE__" "__STACKTRACE__"
+ "__aliases__" "__block__" "abs" "alias" "alias!" "and" "apply"
+ "binary_part" "binary_slice" "binding" "bit_size" "byte_size" "case" 
"ceil"
+ "cond" "dbg" "def" "defdelegate" "defexception" "defguard" "defguardp"
+ "defimpl" "defmacro" "defmacrop" "defmodule" "defoverridable" "defp"
+ "defprotocol" "defstruct" "destructure" "div" "elem" "exit" "floor" "fn"
+ "for" "function_exported?" "get_and_update_in" "get_in" "hd" "if" "import"
+ "in" "inspect" "is_atom" "is_binary" "is_bitstring" "is_boolean"
+ "is_exception" "is_float" "is_function" "is_integer" "is_list" "is_map"
+ "is_map_key" "is_nil" "is_number" "is_pid" "is_port" "is_reference"
+ "is_struct" "is_tuple" "length" "macro_exported?" "make_ref" "map_size"
+ "match?" "max" "min" "node" "not" "or" "pop_in" "put_elem" "put_in" 
"quote"
+ "raise" "receive" "rem" "require" "reraise" "round" "self" "send" "spawn"
+ "spawn_link" "spawn_monitor" "struct" "struct!" "super" "tap" "then"
+ "throw" "tl" "to_charlist" "to_string" "trunc" "try" "tuple_size" "unless"
+ "unquote" "unquote_splicing" "update_in" "use" "var!" "with")
 (erlang-mode ;; 
https://www.erlang.org/docs/20/reference_manual/introduction.html
  "after" "and" "andalso" "band" "begin" "bnot" "bor" "bsl" "bsr" "bxor"
  "case" "catch" "cond" "div" "end" "fun" "if" "let" "not" "of" "or" 
"orelse"



[elpa] externals/company ea77c7e8ec 1/2: Add keywords for Elixir

2022-12-06 Thread ELPA Syncer
branch: externals/company
commit ea77c7e8ecb7a7d9a3f33a813514d9b864dec5de
Author: Ashton Wiersdorf 
Commit: Ashton Wiersdorf 

Add keywords for Elixir
---
 company-keywords.el | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/company-keywords.el b/company-keywords.el
index 1a1dda0f0a..1e42a54ef5 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -105,6 +105,24 @@
  "super" "switch" "synchronized" "template" "this" "throw" "true" "try"
  "typedef" "typeid" "typeof" "ubyte" "ucent" "uint" "ulong" "union"
  "unittest" "ushort" "version" "void" "volatile" "wchar" "while" "with")
+(elixir-mode
+ ;; from https://hexdocs.pm/elixir/Kernel.html
+ "__CALLER__" "__DIR__" "__ENV__" "__MODULE__" "__STACKTRACE__"
+ "__aliases__" "__block__" "abs" "alias" "alias!" "and" "apply"
+ "binary_part" "binary_slice" "binding" "bit_size" "byte_size" "case" 
"ceil"
+ "cond" "dbg" "def" "defdelegate" "defexception" "defguard" "defguardp"
+ "defimpl" "defmacro" "defmacrop" "defmodule" "defoverridable" "defp"
+ "defprotocol" "defstruct" "destructure" "div" "elem" "exit" "floor" "fn"
+ "for" "function_exported?" "get_and_update_in" "get_in" "hd" "if" "import"
+ "in" "inspect" "is_atom" "is_binary" "is_bitstring" "is_boolean"
+ "is_exception" "is_float" "is_function" "is_integer" "is_list" "is_map"
+ "is_map_key" "is_nil" "is_number" "is_pid" "is_port" "is_reference"
+ "is_struct" "is_tuple" "length" "macro_exported?" "make_ref" "map_size"
+ "match?" "max" "min" "node" "not" "or" "pop_in" "put_elem" "put_in" 
"quote"
+ "raise" "receive" "rem" "require" "reraise" "round" "self" "send" "spawn"
+ "spawn_link" "spawn_monitor" "struct" "struct!" "super" "tap" "then"
+ "throw" "tl" "to_charlist" "to_string" "trunc" "try" "tuple_size" "unless"
+ "unquote" "unquote_splicing" "update_in" "use" "var!" "with")
 (erlang-mode
  ;; from 
https://www.erlang.org/docs/20/reference_manual/introduction.html#id63536
  "after" "and" "andalso" "band" "begin" "bnot" "bor" "bsl" "bsr" "bxor"



[elpa] externals/company-math 585063e03d 1/2: [#20] Detect regexp start within a symbol

2022-12-06 Thread ELPA Syncer
branch: externals/company-math
commit 585063e03dd907714fa321ce1d2430f6d715af80
Author: Vitalie Spinu 
Commit: Vitalie Spinu 

[#20] Detect regexp start within a symbol

  In order to allow for modes where regexp can be part of the symbol

  E.g. in org bla\t is a symbol. Thus completion were not started after 
45778f5.
---
 company-math.el | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/company-math.el b/company-math.el
index 92ec5ac979..c778578cd9 100644
--- a/company-math.el
+++ b/company-math.el
@@ -158,9 +158,13 @@ various faces to allow or disallow completion on."
   (save-match-data
 (when (and bounds
(save-excursion
- (goto-char (car bounds))
- (or (looking-at regexp) ;; symbol might contain 
prefix (like in org)
- (looking-back regexp min-point 'greedy
+ (or
+  ;; start is internal to the symbol (e.g. org symbols 
contain \)
+  (re-search-backward regexp (car bounds) 'no-error)
+  (progn
+(goto-char (car bounds))
+(or (looking-at regexp) ;; symbol might contain 
prefix (like in org)
+(looking-back regexp min-point 'greedy))
   (buffer-substring-no-properties (match-beginning 0) 
(point)
 
 (defun company-math--substitute-unicode (symbol)



[elpa] externals/company 6884e3ad71 2/2: Merge pull request #1353 from ashton314/master

2022-12-06 Thread ELPA Syncer
branch: externals/company
commit 6884e3ad717419b4a64a5fab08c8cb9bd20a0b27
Merge: 48f8119db5 ea77c7e8ec
Author: Dmitry Gutov 
Commit: GitHub 

Merge pull request #1353 from ashton314/master

Add keywords for Elixir
---
 company-keywords.el | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/company-keywords.el b/company-keywords.el
index 1a1dda0f0a..1e42a54ef5 100644
--- a/company-keywords.el
+++ b/company-keywords.el
@@ -105,6 +105,24 @@
  "super" "switch" "synchronized" "template" "this" "throw" "true" "try"
  "typedef" "typeid" "typeof" "ubyte" "ucent" "uint" "ulong" "union"
  "unittest" "ushort" "version" "void" "volatile" "wchar" "while" "with")
+(elixir-mode
+ ;; from https://hexdocs.pm/elixir/Kernel.html
+ "__CALLER__" "__DIR__" "__ENV__" "__MODULE__" "__STACKTRACE__"
+ "__aliases__" "__block__" "abs" "alias" "alias!" "and" "apply"
+ "binary_part" "binary_slice" "binding" "bit_size" "byte_size" "case" 
"ceil"
+ "cond" "dbg" "def" "defdelegate" "defexception" "defguard" "defguardp"
+ "defimpl" "defmacro" "defmacrop" "defmodule" "defoverridable" "defp"
+ "defprotocol" "defstruct" "destructure" "div" "elem" "exit" "floor" "fn"
+ "for" "function_exported?" "get_and_update_in" "get_in" "hd" "if" "import"
+ "in" "inspect" "is_atom" "is_binary" "is_bitstring" "is_boolean"
+ "is_exception" "is_float" "is_function" "is_integer" "is_list" "is_map"
+ "is_map_key" "is_nil" "is_number" "is_pid" "is_port" "is_reference"
+ "is_struct" "is_tuple" "length" "macro_exported?" "make_ref" "map_size"
+ "match?" "max" "min" "node" "not" "or" "pop_in" "put_elem" "put_in" 
"quote"
+ "raise" "receive" "rem" "require" "reraise" "round" "self" "send" "spawn"
+ "spawn_link" "spawn_monitor" "struct" "struct!" "super" "tap" "then"
+ "throw" "tl" "to_charlist" "to_string" "trunc" "try" "tuple_size" "unless"
+ "unquote" "unquote_splicing" "update_in" "use" "var!" "with")
 (erlang-mode
  ;; from 
https://www.erlang.org/docs/20/reference_manual/introduction.html#id63536
  "after" "and" "andalso" "band" "begin" "bnot" "bor" "bsl" "bsr" "bxor"



[elpa] externals/company-math updated (45778f5731 -> 3e1bd33f5a)

2022-12-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/company-math.

  from  45778f5731 [Fix #20] Use symbol boundary for prefix computation
   new  585063e03d [#20] Detect regexp start within a symbol
   new  3e1bd33f5a Version 1.5


Summary of changes:
 .gitignore  |  1 +
 company-math.el | 12 
 2 files changed, 9 insertions(+), 4 deletions(-)
 create mode 100644 .gitignore



[elpa] externals/company-math 3e1bd33f5a 2/2: Version 1.5

2022-12-06 Thread ELPA Syncer
branch: externals/company-math
commit 3e1bd33f5a5a3fe4afc834919a4ad36c34f5ce98
Author: Vitalie Spinu 
Commit: Vitalie Spinu 

Version 1.5
---
 .gitignore  | 1 +
 company-math.el | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00..1c2f433de1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+tmp
\ No newline at end of file
diff --git a/company-math.el b/company-math.el
index c778578cd9..34d73e965b 100644
--- a/company-math.el
+++ b/company-math.el
@@ -4,7 +4,7 @@
 ;; Author: Vitalie Spinu 
 ;; URL: https://github.com/vspinu/company-math
 ;; Keywords:  Unicode, symbols, completion
-;; Version: 1.4
+;; Version: 1.5
 ;; Package-Requires: ((company "0.8.0") (math-symbol-lists "1.3"))
 ;;
 ;;



[nongnu] elpa/cider fc7b92918e: Tweak a couple of changelog entries

2022-12-06 Thread ELPA Syncer
branch: elpa/cider
commit fc7b92918ef3d46ad5bafa7418f0f1b0dfa69040
Author: Bozhidar Batsov 
Commit: Bozhidar Batsov 

Tweak a couple of changelog entries
---
 CHANGELOG.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index f54cc1b61e..071ea60aaf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,7 +5,7 @@
 ### New features
 
 - [#3249](https://github.com/clojure-emacs/cider/pull/3249): Add support for 
Clojure Spec 2.
-- [#3247](https://github.com/clojure-emacs/cider/pull/3247) Add the 
`cider-stacktrace-analyze-at-point` and `cider-stacktrace-analyze-in-region` 
commands to view printed exceptions in the stacktrace inspector.
+- [#3247](https://github.com/clojure-emacs/cider/pull/3247): Add the 
`cider-stacktrace-analyze-at-point` and `cider-stacktrace-analyze-in-region` 
commands to view printed exceptions in the stacktrace inspector.
 
 ### Changes
 
@@ -19,7 +19,7 @@
 - Consecutive overlays will not be spuriously deleted.
 - [#3260](https://github.com/clojure-emacs/cider/pull/3260): Scroll REPL 
buffer in other frame.
 - [#3061](https://github.com/clojure-emacs/cider/issues/3061): Allow
-  connect-clj for plain cljs repls (nbb etc).
+  to use `cider-connect-clj` for self-hosted cljs repls (e.g. `nbb`).
 
 ## 1.5.0 (2022-08-24)
 



[elpa] externals/gnat-compiler c13ca26054 1/2: Add wisi-prj-default

2022-12-06 Thread Stephen Leake
branch: externals/gnat-compiler
commit c13ca260542997b4277404346287e3f0828370b2
Author: Stephen Leake 
Commit: Stephen Leake 

Add wisi-prj-default

* gnat-alire.el (alire-prj): New, for wisi-prj-default.
(create-alire-project): Use it.
(wisi-prj-default): New.
---
 gnat-alire.el | 26 +++---
 1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/gnat-alire.el b/gnat-alire.el
index b9b9dadcce..64f579aa1a 100644
--- a/gnat-alire.el
+++ b/gnat-alire.el
@@ -24,6 +24,13 @@
 
 (require 'gnat-compiler)
 
+(cl-defstruct
+(alire-prj
+ (:include wisi-prj)
+ (:copier nil))
+  xref-label
+  )
+
 (defun alire-get-env (project)
   "Set PROJECT slots from Alire as needed."
 
@@ -93,12 +100,15 @@
   "Return an initial wisi project for the current Alire workspace."
   (let* ((default-directory (locate-dominating-file default-directory 
"alire.toml"))
 (abs-gpr-file (expand-file-name gpr-file))
-(project (make-wisi-prj :name name :compile-env compile-env :file-env 
file-env))
-)
+(project (make-alire-prj :name name
+  :compile-env compile-env
+  :file-env file-env
+  :xref-label xref-label)))
 
 (alire-get-env project)
 
-;; We need a gnat-compiler to set compilation-search-path.
+;; We need a gnat-compiler to set compilation-search-path; this
+;; must run after alire-get-env because it uses GPR_PROJECT_PATH.
 (setf (wisi-prj-compiler project)
  (create-gnat-compiler
   :gpr-file abs-gpr-file
@@ -110,5 +120,15 @@
 
 project))
 
+(cl-defmethod wisi-prj-default ((project alire-prj))
+  (let* ((gpr-file (gnat-compiler-gpr-file (wisi-prj-compiler project)))
+ (default-directory (file-name-directory gpr-file)))
+(create-alire-project
+ :name(wisi-prj-name project)
+ :gpr-filegpr-file
+ :compile-env (wisi-prj-compile-env project)
+ :file-env(wisi-prj-file-env project)
+ :xref-label  (alire-prj-xref-label project
+
 (provide 'gnat-alire)
 ;;; gnat-alire.el ends here



[elpa] externals/gnat-compiler updated (e69c29af4d -> 0a14c9a2ca)

2022-12-06 Thread Stephen Leake
stephen_leake pushed a change to branch externals/gnat-compiler.

  from  e69c29af4d Misc cleanups, fix bug in gnat-find-als
   new  c13ca26054 Add wisi-prj-default
   new  0a14c9a2ca * gnat-alire.el (create-alire-project): Respect 
convention for create-%s-xref


Summary of changes:
 gnat-alire.el | 31 ++-
 1 file changed, 26 insertions(+), 5 deletions(-)



[elpa] externals/gnat-compiler 0a14c9a2ca 2/2: * gnat-alire.el (create-alire-project): Respect convention for create-%s-xref

2022-12-06 Thread Stephen Leake
branch: externals/gnat-compiler
commit 0a14c9a2ca2df43714136ad9dfa6089bb0fc4288
Author: Stephen Leake 
Commit: Stephen Leake 

* gnat-alire.el (create-alire-project): Respect convention for 
create-%s-xref
---
 gnat-alire.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/gnat-alire.el b/gnat-alire.el
index 64f579aa1a..489df1d450 100644
--- a/gnat-alire.el
+++ b/gnat-alire.el
@@ -115,8 +115,9 @@
   :run-buffer-name (gnat-run-buffer-name abs-gpr-file)))
 
 (setf (wisi-prj-xref project)
- (funcall (intern (format "create-%s-xref" (symbol-name xref-label)))
-  :gpr-file abs-gpr-file))
+ (funcall (intern (format "create-%s-xref" (symbol-name xref-label)
+
+(wisi-xref-parse-one (wisi-prj-xref project) project "gpr_file" 
abs-gpr-file)
 
 project))
 



[elpa] externals/ada-mode b16f2ce40b 1/2: * install.sh: Fix comment on argument

2022-12-06 Thread Stephen Leake
branch: externals/ada-mode
commit b16f2ce40bac8f23e04e6f7891bc05dc9661b2f3
Author: Stephen Leake 
Commit: Stephen Leake 

* install.sh: Fix comment on argument
---
 install.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install.sh b/install.sh
index 0ff97429d2..420a7f37e4 100755
--- a/install.sh
+++ b/install.sh
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Install executables for Ada mode.
 # 
-# $1 : optional --prefix=
+# $1 : optional 
 #   
 # See build.sh for build (must be run before install).
 



[elpa] externals/gpr-query fd1670eded 4/5: * install.sh: Just copy alr build binary, clean up

2022-12-06 Thread Stephen Leake
branch: externals/gpr-query
commit fd1670eded985f20ca0fd1f9254f7d8f05452e12
Author: Stephen Leake 
Commit: Stephen Leake 

* install.sh: Just copy alr build binary, clean up
---
 install.sh | 17 +++--
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/install.sh b/install.sh
index 961272cba8..b6d6c25113 100755
--- a/install.sh
+++ b/install.sh
@@ -3,21 +3,26 @@
 #
 # See build.sh for build (must be run before install).
 
-# $1 : optional --prefix=
+# $1 : optional 
 #
 # If you don't have write permission in the GNAT installation
 # directory, you need to use --prefix=, or run with root
 # privileges.
 
-# We use 'gprinstall', because it defaults to the gnat compiler
-# install directory; gpr_query relies on the format of the *.ali
-# files, so it is tightly tied to the compiler version.
+if [ x$1 = x ]; then
+PREFIX=$HOME/.local
+# as recommended by 
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+else
+PREFIX=$1
+fi
+
+echo "installing gpr-query executables to" $PREFIX/bin
 
 if type alr; then
-alr exec -- gprinstall -f -p -P emacs_gpr_query.gpr 
--install-name=emacs_gpr_query $1
+cp emacs_gpr_query/bin/* $PREFIX/bin
 
 elif type gprbuild; then
-gprinstall -f -p -P emacs_gpr_query.gpr --install-name=emacs_gpr_query $1 
+cp bin/* $PREFIX/bin
 
 else
 echo "neither Alire nor gnat compiler found"



[elpa] externals/gpr-query 99f50385ee 2/5: * gpr-query.el (gpr-query-session-wait): Restore busy message

2022-12-06 Thread Stephen Leake
branch: externals/gpr-query
commit 99f50385eee43429ce0ad34d4a86b32b8bdb07e3
Author: Stephen Leake 
Commit: Stephen Leake 

* gpr-query.el (gpr-query-session-wait): Restore busy message
---
 gpr-query.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gpr-query.el b/gpr-query.el
index 97046cc427..e8303a32d4 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -419,7 +419,7 @@ COMMAND-TYPE is one of xref or symbols."
   (message "gpr-query receiving symbols %s" 
gpr-query--symbols-progress
 
(xref
-(message "running gpr_query xref ... %d" wait-count)
+(message "running gpr_query xref ... %s" (make-string wait-count ?.))
 
 ;; process output is inserted before point, so move back over it to 
search it
 (with-current-buffer (process-buffer process)



[elpa] externals/gpr-query updated (6356b18639 -> ca70129df3)

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

  from  6356b18639 * build.sh: Show compiler
   new  5104f6f836 * prj.el ("gpr-query.prj"): Use elpa package dirs
   new  99f50385ee * gpr-query.el (gpr-query-session-wait): Restore busy 
message
   new  3a8e67a795 Delete gpr-query minor mode; fix executable bit
   new  fd1670eded * install.sh: Just copy alr build binary, clean up
   new  ca70129df3 Finish merge


Summary of changes:
 build.sh |  0
 gpr-query.el | 40 
 install.sh   | 17 +++--
 prj.el   |  4 ++--
 4 files changed, 17 insertions(+), 44 deletions(-)
 mode change 100644 => 100755 build.sh
 mode change 100644 => 100755 install.sh



[elpa] externals/gpr-mode 1030be428b 1/3: * build.sh, install.sh: Set executable bit

2022-12-06 Thread Stephen Leake
branch: externals/gpr-mode
commit 1030be428b0ceab93e5fec785728dca76da8f7de
Author: Stephen Leake 
Commit: Stephen Leake 

* build.sh, install.sh: Set executable bit
---
 build.sh   | 0
 install.sh | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/build.sh b/build.sh
old mode 100644
new mode 100755
diff --git a/install.sh b/install.sh
old mode 100644
new mode 100755



[elpa] externals/gpr-query ca70129df3 5/5: Finish merge

2022-12-06 Thread Stephen Leake
branch: externals/gpr-query
commit ca70129df33adc80340b40edb860c3bfe0d5d718
Merge: fd1670eded 6356b18639
Author: Stephen Leake 
Commit: Stephen Leake 

Finish merge
---
 build.sh | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/build.sh b/build.sh
index 2c70e6607a..4f6d3f1ad0 100755
--- a/build.sh
+++ b/build.sh
@@ -9,7 +9,8 @@
 
 if type alr; then
 # alr can be installed from https://alire.ada.dev/
-echo "building gpr_query via Alire"
+echo "building gpr_query via Alire; compiler:"
+alr toolchain
 alr get emacs_gpr_query~1.0.1
 cd emacs_gpr_query_*; alr build --release
 



[elpa] externals/gpr-query 3a8e67a795 3/5: Delete gpr-query minor mode; fix executable bit

2022-12-06 Thread Stephen Leake
branch: externals/gpr-query
commit 3a8e67a7955ec1e2ec28a34640b4a50ec552b656
Author: Stephen Leake 
Commit: Stephen Leake 

Delete gpr-query minor mode; fix executable bit

* gpr-query.el (gpr-query-map, gpr-query-menu, gpr-query): Delete;
replaced by minor-mode in ada-mode.
(create-gpr_query-xref): Don't take gpr-file arg.

* build.sh, install.sh: Set executable bit.
---
 build.sh |  0
 gpr-query.el | 38 +++---
 install.sh   |  0
 3 files changed, 3 insertions(+), 35 deletions(-)

diff --git a/build.sh b/build.sh
old mode 100644
new mode 100755
diff --git a/gpr-query.el b/gpr-query.el
index e8303a32d4..ec7b277314 100644
--- a/gpr-query.el
+++ b/gpr-query.el
@@ -653,39 +653,6 @@ with compilation-error-regexp-alist set to COMP-ERR."
   (+ (abs (- found-col col))
  (* (abs (- found-line line)) 250)))
 
-(defvar gpr-query-map
-  (let ((map (make-sparse-keymap)))
-;; C-c C-i prefix for gpr-query minor mode
-
-(define-key map "\C-c\C-i\C-d" 'gpr-query-goto-declaration)
-(define-key map "\C-c\C-i\C-q" 'gpr-query-refresh)
-(define-key map "\C-c\C-i\C-r" 'gpr-query-show-references)
-;; IMPROVEME: (define-key map "\C-c\M-d" 'gpr-query-parents)
-;; IMPROVEME: overriding
-map
-  )  "Local keymap used for gpr query minor mode.")
-
-(defvar gpr-query-menu (make-sparse-keymap "gpr-query"))
-(easy-menu-define gpr-query-menu gpr-query-map "Menu keymap for gpr-query 
minor mode"
-  '("gpr-query"
-["Next xref" next-error   t]
-["Goto declaration/body" xref-find-definitionst]
-["Show parent declarations"  wisi-show-declaration-parents t]
-["Show references"   wisi-show-references t]
-["Show overriding"   wisi-show-overriding t]
-["Show overridden"   wisi-show-overridden t]
-["Refresh cross reference cache" wisi-refresh-prj-cache   t]
-))
-
-(define-minor-mode gpr-query
-  "Minor mode for navigating sources using GNAT cross reference tool.
-Enable mode if ARG is positive."
-  :initial-value t
-  :lighter   " gpr-query"   ;; mode line
-
-  ;; just enable the menu and keymap
-  )
-
 (defun gpr-query--normalize-filename (file)
   "Convert FILE from native format to Emacs standard.
 FILE is from gpr-query."
@@ -712,9 +679,10 @@ FILE is from gpr-query."
   )
 
 ;;;###autoload
-(cl-defun create-gpr_query-xref (&key gpr-file)
+(cl-defun create-gpr_query-xref ()
   ;; See note on `create-ada-prj' for why this is not a defalias.
-  (make-gpr-query-xref :gpr-file gpr-file))
+  ;; The gpr file is set later by parsing the project file.
+  (make-gpr-query-xref))
 
 (cl-defmethod wisi-xref-parse-one ((xref gpr-query-xref) project name value)
   (wisi-compiler-parse-one xref project name value))
diff --git a/install.sh b/install.sh
old mode 100644
new mode 100755



[elpa] externals/gpr-query 5104f6f836 1/5: * prj.el ("gpr-query.prj"): Use elpa package dirs

2022-12-06 Thread Stephen Leake
branch: externals/gpr-query
commit 5104f6f8368a8fbe6162d030c3218ea30b580f55
Author: Stephen Leake 
Commit: Stephen Leake 

* prj.el ("gpr-query.prj"): Use elpa package dirs
---
 prj.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/prj.el b/prj.el
index bc6ad675f1..d16bcb9007 100644
--- a/prj.el
+++ b/prj.el
@@ -8,8 +8,8 @@
 :name "gpr-query elpa"
 :compile-env
 (list
- (concat "GNAT_COMPILER=" (expand-file-name "../org.emacs.gnat-compiler"))
- (concat "WISI=" (expand-file-name "../org.emacs.wisi"))
+ (concat "GNAT_COMPILER=" (expand-file-name "../gnat-compiler"))
+ (concat "WISI=" (expand-file-name "../wisi"))
  ))
"ELPA.make"
)



[elpa] externals/ada-mode 27395c6f1e 2/2: Finish merge

2022-12-06 Thread Stephen Leake
branch: externals/ada-mode
commit 27395c6f1e5070b074b0e0cc9f7749f6c6780cd7
Merge: b16f2ce40b e72d65d459
Author: Stephen Leake 
Commit: Stephen Leake 

Finish merge
---
 build.sh | 4 
 1 file changed, 4 insertions(+)

diff --git a/build.sh b/build.sh
index f88790beba..fa87fda833 100755
--- a/build.sh
+++ b/build.sh
@@ -15,6 +15,9 @@ if type alr; then
 alr get emacs_ada_mode~8.0.2
 cd emacs_ada_mode_*; alr build --release
 
+# WORKAROUND: this should be in alire_rules.make
+mv emacs_ada_mode_*/ada_annex_p_lr1_parse_table.txt emacs_ada_mode_*/bin
+
 elif type gprbuild; then
 echo "building ada-mode executables via gnat compiler"
 
@@ -45,6 +48,7 @@ elif type gprbuild; then
 $WISI_DIR/wisitoken-bnf-generate --task_count 1 ada_annex_p.wy
 
 gprbuild -p -j8 -P ada_mode_wisi_parse.gpr -aP $WISI_DIR "$@"
+mv ada_annex_p_lr1_parse_table.txt bin
 
 else
 echo "neither Alire nor gnat compiler found"



[elpa] externals/gpr-mode 69de22ba68 3/3: Resolve conflicts, finish merge

2022-12-06 Thread Stephen Leake
branch: externals/gpr-mode
commit 69de22ba688fb5df8cd2d4830aa27d8f651e24d6
Merge: 781e7993cc 924bad9645
Author: Stephen Leake 
Commit: Stephen Leake 

Resolve conflicts, finish merge
---
 gpr-indent-user-options.el |  4 ++--
 gpr-mode.el|  2 +-
 gpr-skel.el|  4 ++--
 install.sh |  2 +-
 prj-eglot.el   | 40 
 5 files changed, 6 insertions(+), 46 deletions(-)

diff --git a/gpr-indent-user-options.el b/gpr-indent-user-options.el
index 174a5ebc0b..b724ad274b 100644
--- a/gpr-indent-user-options.el
+++ b/gpr-indent-user-options.el
@@ -1,4 +1,4 @@
-;; user options shared by gpr mode indentation engines  -*- lexical-binding:t 
-*-
+;;; user options shared by gpr mode indentation engines  -*- lexical-binding:t 
-*-
 ;;
 ;; Copyright (C) 2017, 2019  Free Software Foundation, Inc.
 ;;
@@ -45,4 +45,4 @@
 
 (provide 'gpr-indent-user-options)
 
-;; end file
+;; gpr-indent-user-options.el ends here
diff --git a/gpr-mode.el b/gpr-mode.el
index d5b7db2ba7..a8b5d8fe41 100644
--- a/gpr-mode.el
+++ b/gpr-mode.el
@@ -1,4 +1,4 @@
-;; gpr-mode --- Major mode for editing GNAT project files  -*- 
lexical-binding:t -*-
+;;; gpr-mode.el --- Major mode for editing GNAT project files  -*- 
lexical-binding:t -*-
 
 ;; Copyright (C) 2004, 2007, 2008, 2012-2015, 2017 - 2020, 2022  Free Software 
Foundation, Inc.
 
diff --git a/gpr-skel.el b/gpr-skel.el
index 9a53364fcf..599fadcb5e 100644
--- a/gpr-skel.el
+++ b/gpr-skel.el
@@ -1,4 +1,4 @@
-;; gpr-skel.el --- Extension to gpr-mode for inserting statement skeletons  
-*- lexical-binding:t -*-
+;;; gpr-skel.el --- Extension to gpr-mode for inserting statement skeletons  
-*- lexical-binding:t -*-
 
 ;; Copyright (C) 2013-2015, 2018 - 2021 Free Software Foundation, Inc.
 
@@ -134,4 +134,4 @@ Each user will probably want to override this."
 (add-hook 'gpr-mode-hook #'gpr-skel-setup)
 
 (provide 'gpr-skel)
-;;; end of file
+;;; gpr-skel.el ends here
diff --git a/install.sh b/install.sh
index 2d37134cb6..5e3456be3d 100755
--- a/install.sh
+++ b/install.sh
@@ -14,7 +14,7 @@ fi
 
 echo "installing gpr-mode executables to" $PREFIX/bin
 
-# No need for gprinstall; we only need the executable 
+# No need for gprinstall; we only need the executables
 
 if type alr; then
 cp emacs_gpr_mode*/bin/* $PREFIX/bin
diff --git a/prj-eglot.el b/prj-eglot.el
deleted file mode 100644
index a88589f730..00
--- a/prj-eglot.el
+++ /dev/null
@@ -1,40 +0,0 @@
-;; project settings for building gpr-mode 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_mode.gpr" (file-name-directory 
load-file-name)))
-   (prj-file (expand-file-name "prj-eglot.prj" (file-name-directory 
load-file-name)))
-   (eglot-workspace-configuration (list `(ada (projectFile . ,gpr-file
-
-   (project
-   (create-alire-project
-:prj-name "gpr-mode main Alire eglot"
-:prj-file prj-file
-:gpr-file gpr-file)))
-
-  (wisi-prj-select-cache prj-file nil "Makefile")
-
-  ;; 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-mode 781e7993cc 2/3: * install.sh: Just copy executable; clean up

2022-12-06 Thread Stephen Leake
branch: externals/gpr-mode
commit 781e7993cc4ffdd48fe966d397b7755e95c439fb
Author: Stephen Leake 
Commit: Stephen Leake 

* install.sh: Just copy executable; clean up
---
 install.sh | 35 +++
 1 file changed, 15 insertions(+), 20 deletions(-)

diff --git a/install.sh b/install.sh
index 0f279215ac..2d37134cb6 100755
--- a/install.sh
+++ b/install.sh
@@ -1,31 +1,26 @@
 #!/bin/sh
 # Install executables for Gpr mode.
 #
+# $1 : optional 
+#   
 # See build.sh for build (must be run before install).
 
-if type alr; then
-echo "installing gpr-mode executables via Alire"
+if [ x$1 = x ]; then
+PREFIX=$HOME/.local
+# as recommended by 
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+else
+PREFIX=$1
+fi
+
+echo "installing gpr-mode executables to" $PREFIX/bin
 
-if [ x$1 == x ]; then
-echo "you must specify the install directory with 'install.sh '"
-return 1
-fi
-# IMPROVEME: when alr supports install, use that
-cp emacs_gpr_mode*/bin/* $1
+# No need for gprinstall; we only need the executable 
 
-elif type gprbuild; then
-echo "installing gpr-mode executables via gnat compiler"
-
-# $1 : optional --prefix=
-#
-# If you don't have write permission in the GNAT installation
-# directory, you need to use --prefix=, or run with root priviledges.
+if type alr; then
+cp emacs_gpr_mode*/bin/* $PREFIX/bin
 
-if [ -d ../wisi-4.1.? ]; then
-WISI_DIR=`ls -d ../wisi-4.1.?`
-fi
-
-gprinstall -f -p -P gpr_mode_wisi_parse.gpr -aP $WISI_DIR 
--install-name=gpr_mode_wisi_parse $1 
+elif type gprbuild; then
+cp bin/* $PREFIX/bin
 
 else
 echo "neither Alire nor gnat compiler found"



[elpa] externals/gpr-mode updated (924bad9645 -> 69de22ba68)

2022-12-06 Thread Stephen Leake
stephen_leake pushed a change to branch externals/gpr-mode.

  from  924bad9645 Fix header comment style again, improve install.sh
   new  1030be428b * build.sh, install.sh: Set executable bit
   new  781e7993cc * install.sh: Just copy executable; clean up
   new  69de22ba68 Resolve conflicts, finish merge


Summary of changes:
 build.sh   | 0
 install.sh | 4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)
 mode change 100644 => 100755 build.sh
 mode change 100644 => 100755 install.sh



[elpa] externals/denote 2e681cf6da: Use 'make-obsolete-variable' for variables

2022-12-06 Thread ELPA Syncer
branch: externals/denote
commit 2e681cf6dab5f621366eada191d7033d750c1644
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

Use 'make-obsolete-variable' for variables

The 'make-obsolete' is for functions: I forgot about that.
---
 denote.el | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/denote.el b/denote.el
index 5cb7be478d..076e73160f 100644
--- a/denote.el
+++ b/denote.el
@@ -377,7 +377,7 @@ current note."
   :package-version '(denote . "1.2.0")
   :type 'boolean)
 
-(make-obsolete 'denote-link-fontify-backlinks 'denote-backlinks-show-context 
"1.2.0")
+(make-obsolete-variable 'denote-link-fontify-backlinks 
'denote-backlinks-show-context "1.2.0")
 
 (defcustom denote-excluded-directories-regexp nil
   "Regular expression of directories to exclude from all operations.
@@ -2249,7 +2249,7 @@ relevant front matter."
   :group 'denote-faces
   :package-version '(denote . "0.5.0"))
 
-(make-obsolete 'denote-faces-broken-link nil "1.0.0")
+(make-obsolete-variable 'denote-faces-broken-link nil "1.0.0")
 
 (defface denote-faces-subdirectory '((t :inherit bold))
   "Face for subdirectory of file name.