Subject: [bug#36778] [PATCH] Add and update Emacs packages.

From: Brian Leung <[email-masked]>
Date: Sat, 27 Jul 2019 05:23:55 +0200

I rebased and added a few additional patches.
From 210a0651ee61504a9b0d3032d39ea589ad13cb6e Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Wed, 24 Jul 2019 04:29:55 +0200
Subject: [PATCH 03/10] gnu: Add emacs-scroll-on-drag.

* gnu/packages/emacs-xyz.scm (emacs-scroll-on-drag): New variable.
---
 gnu/packages/emacs-xyz.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 14490833cb..a5215ef530 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -12679,6 +12679,30 @@ When @code{gac-automatically-push-p} is non-nil, it also tries to push to
 the current upstream.")
     (license license:gpl3+)))
 
+(define-public emacs-scroll-on-drag
+  (let ((commit "e509c10ccdf6f4239d448da8aa6f8b9cc36bb340")
+        (version "0.1")
+        (revision "1"))
+    (package
+      (name "emacs-scroll-on-drag")
+      (version (git-version version revision commit))
+      (source
+       (origin
+         (method git-fetch)
+         (uri (git-reference
+               (url "https://gitlab.com/ideasman42/emacs-scroll-on-drag.git")
+               (commit commit)))
+         (file-name (git-file-name name version))
+         (sha256
+          (base32
+           "00yy0bx874ijg8s16bp13n0w5q2fmjiklz0kgbwh4wpb7fawk8vv"))))
+      (build-system emacs-build-system)
+      (home-page "https://gitlab.com/ideasman42/emacs-scroll-on-drag")
+      (synopsis "Interactive scrolling")
+      (description "This package permits scrolling at increasing speeds based
+on drag distance.")
+      (license license:gpl3+))))
+
 (define-public emacs-company-restclient
   (package
     (name "emacs-company-restclient")
-- 
2.22.0

From 6ed981dc09ef870e033095a79b74cb65c4b9d8b2 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Wed, 24 Jul 2019 04:05:29 +0200
Subject: [PATCH 02/10] gnu: Add emacs-evil-traces.

* gnu/packages/emacs-xyz.scm (emacs-evil-traces): New variable.
---
 gnu/packages/emacs-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 33fcc9a108..14490833cb 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -16635,6 +16635,31 @@ provided.  Those alternative commands are and bound by default to their
 corresponding Evil keys.")
       (license license:expat))))
 
+(define-public emacs-evil-traces
+  (let ((commit "b41b7432b8110378c199a3d25af464083777f453")
+        (version "0.0.1")
+        (revision "1"))
+    (package
+      (name "emacs-evil-traces")
+      (version (git-version version revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/mamapanda/evil-traces.git")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "0a15f2saynz9fws1h5s7py3cshsk4xs1kwgwj1m5rsin36g0j6hc"))
+                (file-name (git-file-name name version))))
+      (build-system emacs-build-system)
+      (propagated-inputs
+       `(("emacs-evil" ,emacs-evil)))
+      (home-page "https://github.com/mamapanda/evil-traces")
+      (synopsis "Visual hints for @code{evil-ex}")
+      (description "This adds visual hints to certain @code{ex} commands in
+@code{evil-mode}.")
+      (license license:gpl3+))))
+
 (define-public emacs-xterm-color
   (let ((commit "a452ab38a7cfae97078062ff8885b5d74fd1e5a6")
         (version "1.8")
-- 
2.22.0

From 9dbf3be6049ca7f0e852b013aae23987f4853809 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Wed, 24 Jul 2019 05:54:14 +0200
Subject: [PATCH 04/10] gnu: emacs-magit-todos: Update to 1.3.

* gnu/packages/emacs-xyz.scm (emacs-magit-todos): Update to 1.3.
---
 gnu/packages/emacs-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index a5215ef530..12ccb3f369 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -14169,7 +14169,7 @@ buffers – other modes on the TODO list).
 (define-public emacs-magit-todos
   (package
     (name "emacs-magit-todos")
-    (version "1.2")
+    (version "1.3")
     (source
      (origin
        (method git-fetch)
@@ -14179,7 +14179,7 @@ buffers – other modes on the TODO list).
        (file-name (git-file-name name version))
        (sha256
         (base32
-         "17a18gszbypz82bj36xbfyykc4s9rz83vwmpxvlf65svhd51c0nh"))))
+         "0gfm6wn2a4v5i9lfsvvin0kwpr9n96ddm3z4yf50jd3kg2igzry1"))))
     (build-system emacs-build-system)
     (propagated-inputs
      `(("emacs-async" ,emacs-async)
-- 
2.22.0

From 82288de61756ab5f20f66d6ea973f95a04fb5cbc Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Wed, 24 Jul 2019 04:05:18 +0200
Subject: [PATCH 01/10] gnu: emacs-helm: Update to 3.3.

* gnu/packages/emacs-xyz.scm (emacs-helm): Update to 3.3.
---
 gnu/packages/emacs-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 314f4867b3..33fcc9a108 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5931,7 +5931,7 @@ ack, ag, helm and pt.")
 (define-public emacs-helm
   (package
     (name "emacs-helm")
-    (version "3.2")
+    (version "3.3")
     (source
      (origin
        (method git-fetch)
@@ -5940,7 +5940,7 @@ ack, ag, helm and pt.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "12yyprpgh2by2pd41i4z9gz55fxg0f90x03bfrsf791xwbhf6931"))))
+        (base32 "0fqhw7r9fcsja5d3pgbipw7pkw9nj534faav6hi45413hc3gyv92"))))
     (build-system emacs-build-system)
     (propagated-inputs
      `(("emacs-async" ,emacs-async)
-- 
2.22.0

From d3c2b530ae58d1b6548a62c70d13807a57073919 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Thu, 25 Jul 2019 00:03:59 +0200
Subject: [PATCH 05/10] gnu: Add emacs-helm-org-rifle.

* gnu/packages/emacs-xyz.scm (emacs-helm-org-rifle): New variable.
---
 gnu/packages/emacs-xyz.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 12ccb3f369..18edb58d87 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -7159,6 +7159,32 @@ find files owned by packages...  And much more, including performing all the
 above over the network.")
       (license license:gpl3+))))
 
+(define-public emacs-helm-org-rifle
+  (package
+    (name "emacs-helm-org-rifle")
+    (version "1.6.1")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/alphapapa/helm-org-rifle")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1r38xhwvgbv6kn5x159phz3xgss7f1rc7icq27rnr4d8aj91wm6k"))))
+    (build-system emacs-build-system)
+    (propagated-inputs
+     `(("emacs-dash" ,emacs-dash)
+       ("emacs-f" ,emacs-f)
+       ("emacs-helm" ,emacs-helm)
+       ("emacs-s" ,emacs-s)))
+    (home-page "https://github.com/alphapapa/helm-org-rifle")
+    (synopsis "Rifle through Org files")
+    (description "This package searches both headings and contents of entries
+in Org buffers and displays matching entries.")
+    (license license:gpl3+)))
+
 (define-public emacs-memoize
   (package
     (name "emacs-memoize")
-- 
2.22.0

From 00d15729c28b5f8c9fd58a7be02ba98373d5db2f Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Sat, 27 Jul 2019 01:00:50 +0200
Subject: [PATCH 06/10] gnu: Add emacs-dired-toggle-sudo.

* gnu/packages/emacs-xyz.scm (emacs-dired-toggle-sudo): New variable.
* gnu/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/emacs-xyz.scm                    | 24 +++++++++
 .../emacs-dired-toggle-sudo-emacs-26.patch    | 49 +++++++++++++++++++
 3 files changed, 74 insertions(+)
 create mode 100644 gnu/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index bd509647dc..92fa4f37a9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -772,6 +772,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/elfutils-tests-ptrace.patch		\
   %D%/packages/patches/elixir-path-length.patch			\
   %D%/packages/patches/einstein-build.patch			\
+  %D%/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch   \
   %D%/packages/patches/emacs-exec-path.patch			\
   %D%/packages/patches/emacs-fix-scheme-indent-function.patch	\
   %D%/packages/patches/emacs-json-reformat-fix-tests.patch	\
diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 18edb58d87..73a7668b08 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -7185,6 +7185,30 @@ above over the network.")
 in Org buffers and displays matching entries.")
     (license license:gpl3+)))
 
+(define-public emacs-dired-toggle-sudo
+  (package
+    (name "emacs-dired-toggle-sudo")
+    (version "1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/renard/dired-toggle-sudo")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "0ajj8d6k5in2hclcrqckinfh80ylddplva0ryfbkzsjkfq167cv2"))
+       (patches
+        (search-patches
+         "emacs-dired-toggle-sudo-emacs-26.patch"))))
+    (build-system emacs-build-system)
+    (home-page "https://github.com/renard/dired-toggle-sudo")
+    (synopsis "Browse directory with @code{sudo} privileges")
+    (description "This package allows for the use of @code{dired} with
+@code{sudo} privileges.")
+    (license license:wtfpl2)))
+
 (define-public emacs-memoize
   (package
     (name "emacs-memoize")
diff --git a/gnu/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch b/gnu/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch
new file mode 100644
index 0000000000..d979b113d0
--- /dev/null
+++ b/gnu/packages/patches/emacs-dired-toggle-sudo-emacs-26.patch
@@ -0,0 +1,49 @@
+From 3c0f4b27a079b90dc632f5061a81ce28cef24801 Mon Sep 17 00:00:00 2001
+From: eryx67 <[email-masked]>
+Date: Thu, 29 Nov 2018 10:30:20 +0500
+Subject: [PATCH] fix for latest emacs
+
+---
+ dired-toggle-sudo.el | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/dired-toggle-sudo.el b/dired-toggle-sudo.el
+index 386921b..fe5898e 100644
+--- a/dired-toggle-sudo.el
++++ b/dired-toggle-sudo.el
+@@ -37,17 +37,20 @@
+ unless SUDO-USER is provided."
+   (let* (;; Handle the case of local files. `tramp-dissect-file-name' does
+ 	 ;; not raise an error anymore.
+-	 (path (if (tramp-tramp-file-p path) path (concat "/:" path)))
++	 ;;(path (if (tramp-tramp-file-p path) path (concat "/-::" path)))
+ 	 (file-vec (or (ignore-errors (tramp-dissect-file-name
+ 				       path))
+ 		       (tramp-dissect-file-name
+-			(concat "/:" path) 1)))
++			(concat "/-::" path) 1)))
+ 	 (method  (tramp-file-name-method file-vec))
+ 	 (user (tramp-file-name-user file-vec))
+ 	 (host  (tramp-file-name-host file-vec))
++         (domain  (tramp-file-name-domain file-vec))
++         (port  (tramp-file-name-port file-vec))
+ 	 (localname (expand-file-name
+ 		     (tramp-file-name-localname file-vec))))
+-    (when (string= system-name host)
++    (when (or (string= (system-name) host)
++              (string= "-" host))
+       (setq host nil))
+     (cond
+      ;; remote directory -> sudo
+@@ -67,7 +70,7 @@ unless SUDO-USER is provided."
+       (setq method "sudo" user sudo-user)))
+     (replace-regexp-in-string
+      "^/:/" "/"
+-     (tramp-make-tramp-file-name method user host localname))))
++     (tramp-make-tramp-file-name method domain user host port localname))))
+ 
+ (defun dired-toggle-sudo-find (fname)
+   "Create a new buffer for file name FNAME."
+-- 
+2.22.0
+
-- 
2.22.0

From 7bf0691a2dc64ab27bbb841b1c5d20121b760252 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Sat, 27 Jul 2019 01:49:54 +0200
Subject: [PATCH 07/10] gnu: emacs-highlight-indentation: Update to
 0.7.0-1.d03803f.

* gnu/packages/emacs-xyz.scm (emacs-highlight-indentation): Update to 0.7.0-1.d03803f.
---
 gnu/packages/emacs-xyz.scm | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 73a7668b08..3eaebe49e2 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -5580,28 +5580,32 @@ environments (virtualenv) inside Emacs.")
     (license license:gpl3+)))
 
 (define-public emacs-highlight-indentation
-  (package
-    (name "emacs-highlight-indentation")
-    (version "0.7.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/antonj/Highlight-Indentation-for-Emacs.git")
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "00l54k75qk24a0znzl4ij3s3nrnr2wy9ha3za8apphzlm98m907k"))))
-    (build-system emacs-build-system)
-    (home-page "https://github.com/antonj/Highlight-Indentation-for-Emacs/")
-    (synopsis "Highlighting indentation for Emacs")
-    (description "Provides two minor modes to highlight indentation guides in Emacs:
+  ;; Last release version is from 2015.
+  (let ((commit "d03803f2c06749c430443a3d24e039cbafc9c58f")
+        (version "0.7.0")
+        (revision "1"))
+    (package
+      (name "emacs-highlight-indentation")
+      (version (git-version version revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/antonj/Highlight-Indentation-for-Emacs.git")
+                      (commit commit)))
+                (file-name (git-file-name name version))
+                (sha256
+                 (base32
+                  "1jq0gf4kcx9hvrw40rnw5c2qynjpjw1vsjbi2i4lqjbsnfnxn4wz"))))
+      (build-system emacs-build-system)
+      (home-page "https://github.com/antonj/Highlight-Indentation-for-Emacs/")
+      (synopsis "Highlighting indentation for Emacs")
+      (description "Provides two minor modes to highlight indentation guides in Emacs:
 @enumerate
 @item @code{highlight-indentation-mode}, which displays guidelines
 indentation (space indentation only).
 @item @code{highlight-indentation-current-column-mode}, which displays guidelines for the current-point indentation (space indentation only).
 @end enumerate")
-    (license license:gpl2+)))
+      (license license:gpl2+))))
 
 (define-public emacs-elpy
   (package
-- 
2.22.0

From 12dc56cf83e77632b6cdcd36ed7ab61612dd40e7 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Sat, 27 Jul 2019 04:14:24 +0200
Subject: [PATCH 08/10] gnu: emacs-so-long: Update to 1.0-2.cfae473.

* gnu/packages/emacs-xyz.scm (emacs-so-long): Update to 1.0-2.cfae473.
---
 gnu/packages/emacs-xyz.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3eaebe49e2..448e0ab4aa 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -13773,9 +13773,9 @@ server with @code{M-x pinentry-start}.")
       (license license:gpl3+))))
 
 (define-public emacs-so-long
-  (let ((commit "3ebe97decdb5cbbfba82ca686e0ad2c7d2722b4a")
+  (let ((commit "cfae473b1bf65f78ddb015159e667ec0103d881c")
         (version "1.0")
-        (revision "1"))
+        (revision "2"))
     (package
       (name "emacs-so-long")
       (version (git-version version revision commit))
@@ -13788,7 +13788,7 @@ server with @code{M-x pinentry-start}.")
          (file-name (git-file-name name version))
          (sha256
           (base32
-           "0fi71g5rsdsi978jz8406k8hvzgnssm9wxar8yqfhs97178r9s5m"))))
+           "0g943n5cl9lz5s7hszg6yvp10xd1xvd8mfgxyg0yckmp8fqkswin"))))
       (build-system emacs-build-system)
       (home-page "https://www.emacswiki.org/emacs/SoLong")
       (synopsis "Improve performance in files with long lines")
-- 
2.22.0

From 9ddf79585c315b16988d2078fc61edea27e6255d Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Sat, 27 Jul 2019 05:00:46 +0200
Subject: [PATCH 09/10] gnu: emacs-evil-expat: Update to 0.0.1-1.f4fcd0a.

* gnu/packages/emacs-xyz.scm (emacs-evil-expat): Update to 0.0.1-1.f4fcd0a.
---
 gnu/packages/emacs-xyz.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 448e0ab4aa..3fd5e67e2f 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6403,7 +6403,7 @@ aligning text objects based on separators.")
       (license license:gpl3+))))
 
 (define-public emacs-evil-expat
-  (let ((commit "4c344ea19b789002d759a202ffbf594730d2c59a")
+  (let ((commit "f4fcd0aa3edc359adb5c986b5dd9188d220d84e2")
         (version "0.0.1")
         (revision "1"))
     (package
@@ -6418,7 +6418,7 @@ aligning text objects based on separators.")
          (file-name (git-file-name name version))
          (sha256
           (base32
-           "16v7fnldxag6l1lsnrnhdjkga9qi78lbdfbb82k6pmv04991mbkr"))))
+           "0872ix682hkdz0k8pn6sb54rqkx00rz5fxpd5j2snx406yagpaxz"))))
       (build-system emacs-build-system)
       (propagated-inputs `(("emacs-evil" ,emacs-evil)))
       (home-page "https://github.com/edkolev/evil-expat")
-- 
2.22.0

From 50e1455b401a869d682e79cf065a3b44890b17a1 Mon Sep 17 00:00:00 2001
From: Brian Leung <[email-masked]>
Date: Sat, 27 Jul 2019 05:16:30 +0200
Subject: [PATCH 10/10] gnu: emacs-lua-mode: Update to 20151025-2.95c64bb.

* gnu/packages/emacs-xyz.scm (emacs-lua-mode): Update to 20151025-2.95c64bb.
---
 gnu/packages/emacs-xyz.scm | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm
index 3fd5e67e2f..861c4099f3 100644
--- a/gnu/packages/emacs-xyz.scm
+++ b/gnu/packages/emacs-xyz.scm
@@ -6123,21 +6123,22 @@ xref, etc...) are still available, but with better integration.")
       (license license:gpl3+))))
 
 (define-public emacs-lua-mode
-  (let ((commit "652e299cb967fccca827dda381d61a9c144d97de")
-        (revision "1"))
+  (let ((commit "95c64bb5634035630e8c59d10d4a1d1003265743")
+        (version "20151025")
+        (revision "2"))
     (package
       (name "emacs-lua-mode")
-      (version (string-append "20151025." revision "-" (string-take commit 9)))
+      (version (git-version version revision commit))
       (home-page "https://github.com/immerrr/lua-mode/")
       (source (origin
                 (method git-fetch)
                 (uri (git-reference
                       (url home-page)
                       (commit commit)))
-                (file-name (string-append name "-" version ".checkout"))
+                (file-name (git-file-name name version))
                 (sha256
                  (base32
-                  "053025k930wh0lak6rc1973ynfrmm8zsyzfqhhd39x7abkl41hc9"))))
+                  "1mra4db25ds64526dsj8m5yv0kfq3lgggjh1x6xmqypdaryddbcp"))))
       (build-system emacs-build-system)
       (synopsis "Major mode for lua")
       (description
-- 
2.22.0