[elpa] master c29228e 01/33: posframe: update README.md

2018-12-14 Thread Feng Shu
branch: master
commit c29228eb2100503a0fda39252d4f11c1eb5acc56
Author: Feng Shu 
Commit: Feng Shu 

posframe: update README.md
---
 README.md | 48 ++--
 1 file changed, 26 insertions(+), 22 deletions(-)

diff --git a/README.md b/README.md
index 3f227e5..96508aa 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,23 @@
 
 # 目录
 
-1.  [Posframe README](#org53f6910)
-1.  [What is posframe](#org5cf1be8)
-2.  [Installation](#org5f830e9)
-3.  [Usage](#org40db1ee)
-1.  [Create a posframe](#org6f36699)
-2.  [Hide a posframe](#orgcd529fe)
-3.  [Hide all posframes](#org4e71a28)
-4.  [Delete a posframe](#org0f069f2)
-5.  [Delete all posframes](#org853d491)
+1.  [Posframe README](#orgb0e618a)
+1.  [What is posframe](#orga5aca6b)
+2.  [Installation](#orgc054dab)
+3.  [Usage](#orga60ff65)
+1.  [Create a posframe](#org216b84e)
+2.  [Hide a posframe](#orgda0528f)
+3.  [Hide all posframes](#org7904f7f)
+4.  [Delete a posframe](#org9aed6aa)
+5.  [Delete all posframes](#orga1ab8fd)
 
 
-
+
 
 # Posframe README
 
 
-
+
 
 ## What is posframe
 
@@ -29,24 +29,24 @@ The main advantages are:
 1.  It is fast enough for daily usage :-)
 2.  It works well with CJK language.
 
-NOTE: For MacOS users, posframe need emacs (version >= 26.0.91)
+NOTE: For MacOS users, posframe need Emacs (version >= 26.0.91)
 
 ![img](./snapshots/posframe-1.png)
 
 
-
+
 
 ## Installation
 
 (require 'posframe)
 
 
-
+
 
 ## Usage
 
 
-
+
 
 ### Create a posframe
 
@@ -59,28 +59,33 @@ Arguments documents:
 C-h f posframe-show
 
 
-
+
 
 ### Hide a posframe
 
 (posframe-hide " *my-posframe-buffer*")
 
 
-
+
 
 ### Hide all posframes
 
 M-x posframe-hide-all
 
 
-
+
 
 ### Delete a posframe
 
-(posframe-delete " *my-posframe-buffer*")
+1.  Delete posframe and its buffer
 
+(posframe-delete " *my-posframe-buffer*")
+2.  Only delete posframe's frame
 
-
+(posframe-delete-frame " *my-posframe-buffer*")
+
+
+
 
 ### Delete all posframes
 
@@ -91,5 +96,4 @@ suggest not run this command if you are sharing a buffer
 between posframe and other packages.
 
 
-
-Converted from posframe.el by [el2org](https://github.com/tumashu/el2org) .
\ No newline at end of file
+Converted from posframe.el by [el2org](https://github.com/tumashu/el2org).



[elpa] master 3a8c29e 05/33: posframe: version 0.4.0

2018-12-14 Thread Feng Shu
branch: master
commit 3a8c29e91048015ce6a30d18809b034ece3e1267
Author: Feng Shu 
Commit: Feng Shu 

posframe: version 0.4.0
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index 393c1c0..b1bc196 100644
--- a/posframe.el
+++ b/posframe.el
@@ -5,7 +5,7 @@
 ;; Author: Feng Shu 
 ;; Maintainer: Feng Shu 
 ;; URL: https://github.com/tumashu/posframe
-;; Version: 0.3.0
+;; Version: 0.4.0
 ;; Keywords: tooltip
 ;; Package-Requires: ((emacs "26"))
 



[elpa] master 0e031b3 02/33: posframe: posframe--last-position -> posframe--last-posframe-pixel-position

2018-12-14 Thread Feng Shu
branch: master
commit 0e031b3543ea7afabdbe84111a110eccb3eb3fc7
Author: Feng Shu 
Commit: Feng Shu 

posframe: posframe--last-position -> posframe--last-posframe-pixel-position

* posframe.el (posframe--last-posframe-pixel-position): rename 
posframe--last-position.
(posframe--create-posframe): Use posframe--last-posframe-pixel-position 
instead.
(posframe--set-frame-position): Use posframe--last-posframe-pixel-position 
instead.
---
 posframe.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/posframe.el b/posframe.el
index 9a7a73f..628aa9a 100644
--- a/posframe.el
+++ b/posframe.el
@@ -111,7 +111,7 @@
 (defvar-local posframe--frame nil
   "Record posframe's frame.")
 
-(defvar-local posframe--last-position nil
+(defvar-local posframe--last-posframe-pixel-position nil
   "Record the last pixel position of posframe's frame.")
 
 (defvar-local posframe--last-posframe-size nil
@@ -184,7 +184,7 @@ This posframe's buffer is POSFRAME-BUFFER."
(equal posframe--last-args args))
 (posframe-delete-frame posframe-buffer)
 (setq-local posframe--last-args args)
-(setq-local posframe--last-position nil)
+(setq-local posframe--last-posframe-pixel-position nil)
 (setq-local posframe--last-posframe-size nil)
 (setq-local posframe--frame
 (make-frame
@@ -442,13 +442,13 @@ WIDTH and MIN-WIDTH."
   parent-frame-height)
   "Move POSFRAME to POSITION.
 This need PARENT-FRAME-WIDTH and PARENT-FRAME-HEIGHT"
-  (unless (and (equal position posframe--last-position)
+  (unless (and (equal position posframe--last-posframe-pixel-position)
;; When working frame's size change, re-posit
;; the posframe.
(equal posframe--last-parent-frame-size
   (cons parent-frame-width parent-frame-height)))
 (set-frame-position posframe (car position) (cdr position))
-(setq-local posframe--last-position position)
+(setq-local posframe--last-posframe-pixel-position position)
 (setq-local posframe--last-parent-frame-size
 (cons parent-frame-width parent-frame-height)))
   ;; Make posframe's posframe--frame visible



[elpa] master updated (d461e05 -> 769adaa)

2018-12-14 Thread Feng Shu
tumashu pushed a change to branch master.

  from  d461e05   Merge commit 'ac82e875e144b227e926c09c53def9b0c059115c' 
from company
   new  c29228e   posframe: update README.md
   new  0e031b3   posframe: posframe--last-position -> 
posframe--last-posframe-pixel-position
   new  f88138f   posframe: Add posframe--last-poshandler-info
   new  2e8003e   posframe: Add posframe--last-font-height-info.
   new  3a8c29e   posframe: version 0.4.0
   new  26d36c7   Account for frame height and width when repositioning
   new  c94bf8a   Merge pull request #9 from 
aaronjensen/account-for-frame-height-and-width-when-positioning
   new  0ac1e46   Disable posframe-mouse-banish on macOS
   new  fe30ee8   Merge pull request #7 from 
raxod502/feat/mouse-banish-on-macos
   new  272ca09   Use posframe-hide-frame instead make-frame-invisible
   new  4c31de2   Merge pull request #10 from manateelazycat/patch-1
   new  713a4ef   Fix indent
   new  d8ec23d   posframe-hide-frame -> posframe--make-frame-invisible
   new  c048016   Add posframe-poshandler-frame-top-left/right-corner
   new  c156667   Add more information to README
   new  a8e1bda   Update README again.
   new  b79f1ce   posframe: Add fullscreen parameter
   new  9768b0a   posframe: support internal-border-width
   new  5803070   posframe: Recreate posframe when internal-border-width 
changed
   new  1ed5492   posframe: Add face-remap argument
   new  945761d   posframe: cache posframe/parent-frame/parent-window's 
more info
   new  a0dfcde   use empty posframe title for window manager
   new  d115a5a   Merge pull request #13 from yqrashawn/empty-frame-name
   new  1b309a2   posframe: Add posframe-poshandler-frame-top-center
   new  7ba9d9d   posframe: Add posframe-poshandler-frame-top-center 
document
   new  575e902   * posframe.el (posframe-show): Remove useless space
   new  02b446a   posframe: Add initialize argument to posframe-show
   new  d09e283   * posframe.el (posframe-show, posframe--initialized-p): 
Rename posframe--initialize-p to posframe--initialized-p
   new  08ef38d   posframe: Add posframe-default-initialize-function
   new  baa2289   Change to looser line-end-style specification
   new  2f4baf0   Merge pull request #17 from jingqi/master
   new  09e3f19   bump to version 0.4.2
   new  769adaa   Merge commit '09e3f1937d19243cfb02178540aaf5c78f2e2939'


Summary of changes:
 packages/posframe/README.md   |  75 +
 packages/posframe/posframe.el | 362 +-
 2 files changed, 294 insertions(+), 143 deletions(-)



[elpa] master a0dfcde 22/33: use empty posframe title for window manager

2018-12-14 Thread Feng Shu
branch: master
commit a0dfcde2e88e9694cbee25fa8a4a507289bebffa
Author: yqrashawn 
Commit: yqrashawn 

use empty posframe title for window manager
---
 posframe.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/posframe.el b/posframe.el
index a095fde..affc072 100644
--- a/posframe.el
+++ b/posframe.el
@@ -189,6 +189,7 @@ This posframe's buffer is POSFRAME-BUFFER."
 face-remap)))
 (with-current-buffer posframe-buffer
   ;; Many variables take effect after call `set-window-buffer'
+  (setq-local frame-title-format "")
   (setq-local left-fringe-width nil)
   (setq-local right-fringe-width nil)
   (setq-local fringes-outside-margins 0)



[elpa] master 1ed5492 20/33: posframe: Add face-remap argument

2018-12-14 Thread Feng Shu
branch: master
commit 1ed5492f42065d69205a8d08e4cefe9583630d57
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add face-remap argument

* posframe.el (posframe--create-posframe, posframe-show): Add face-remap
---
 posframe.el | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/posframe.el b/posframe.el
index 0436e26..f466a64 100644
--- a/posframe.el
+++ b/posframe.el
@@ -166,7 +166,8 @@ frame.")
  keep-ratio
  override-parameters
  respect-header-line
- respect-mode-line)
+ respect-mode-line
+ face-remap)
   "Create a child-frame for posframe.
 This posframe's buffer is POSFRAME-BUFFER."
   (let ((left-fringe (or left-fringe 0))
@@ -184,7 +185,8 @@ This posframe's buffer is POSFRAME-BUFFER."
 keep-ratio
 override-parameters
 respect-header-line
-respect-mode-line)))
+respect-mode-line
+face-remap)))
 (with-current-buffer posframe-buffer
   ;; Many variables take effect after call `set-window-buffer'
   (setq-local left-fringe-width nil)
@@ -194,6 +196,7 @@ This posframe's buffer is POSFRAME-BUFFER."
   (setq-local cursor-type nil)
   (setq-local cursor-in-non-selected-windows nil)
   (setq-local show-trailing-whitespace nil)
+  (setq-local face-remapping-alist face-remap)
   (unless respect-mode-line
 (setq-local mode-line-format nil))
   (unless respect-header-line
@@ -276,6 +279,7 @@ This posframe's buffer is POSFRAME-BUFFER."
  background-color
  respect-header-line
  respect-mode-line
+ face-remap
  no-properties
  keep-ratio
  override-parameters
@@ -344,6 +348,11 @@ By default, posframe will force hide header-line and 
mode-line
 If user want to show header-line or mode-line in posframe,
 set RESPECT-HEADER-LINE or RESPECT-MODE-LINE to t.
 
+If user want to let posframe use different faces from other frame.
+user can set FACE-REMAP, more setting details can be found:
+
+  C-h v face-remapping-alist
+
 OVERRIDE-PARAMETERS is very powful, *all* the frame parameters
 used by posframe's frame can be overrided by it.
 
@@ -387,6 +396,7 @@ you can use `posframe-delete-all' to delete all posframes."
  :keep-ratio keep-ratio
  :respect-header-line respect-header-line
  :respect-mode-line respect-mode-line
+ :face-remap face-remap
  :override-parameters override-parameters))
 
   ;; Insert string to posframe-buffer.



[elpa] master 2f4baf0 31/33: Merge pull request #17 from jingqi/master

2018-12-14 Thread Feng Shu
branch: master
commit 2f4baf00ab9184dff75ec97fc520d1c91e1acb9c
Merge: 08ef38d baa2289
Author: tumashu 
Commit: GitHub 

Merge pull request #17 from jingqi/master

Change to looser line-end-style specification
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index bb10ef5..39015ff 100644
--- a/posframe.el
+++ b/posframe.el
@@ -878,7 +878,7 @@ docstring of `posframe-show'."
 (provide 'posframe)
 
 ;; Local Variables:
-;; coding: utf-8-unix
+;; coding: utf-8
 ;; End:
 
 ;;; posframe.el ends here



[elpa] master f88138f 03/33: posframe: Add posframe--last-poshandler-info

2018-12-14 Thread Feng Shu
branch: master
commit f88138f4763136da3e8122c9720cfaf252c7337a
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add posframe--last-poshandler-info

* posframe.el (posframe--last-poshandler-info): New variable
(posframe-run-poshandler): Use posframe--last-poshandler-info to cache
---
 posframe.el | 28 +---
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/posframe.el b/posframe.el
index 628aa9a..4b76901 100644
--- a/posframe.el
+++ b/posframe.el
@@ -120,6 +120,9 @@
 (defvar-local posframe--last-parent-frame-size nil
   "Record the last size of posframe's parent-frame.")
 
+(defvar-local posframe--last-poshandler-info nil
+  "Record the last poshandler info.")
+
 (defvar-local posframe--last-args nil
   "Record the last arguments of `posframe--create-posframe'.
 
@@ -552,17 +555,20 @@ This function is used by `kill-buffer-hook'."
 
 the structure of INFO can be found in docstring
 of `posframe-show'."
-  (funcall
-   (or (plist-get info :poshandler)
-   (let ((position (plist-get info :position)))
- (cond ((integerp position)
-#'posframe-poshandler-point-bottom-left-corner)
-   ((and (consp position)
- (integerp (car position))
- (integerp (cdr position)))
-#'posframe-poshandler-absolute-x-y)
-   (t (error "Posframe: have no valid poshandler")
-   info))
+  (if (equal info posframe--last-poshandler-info)
+  posframe--last-posframe-pixel-position
+(setq posframe--last-poshandler-info info)
+(funcall
+ (or (plist-get info :poshandler)
+ (let ((position (plist-get info :position)))
+   (cond ((integerp position)
+  #'posframe-poshandler-point-bottom-left-corner)
+ ((and (consp position)
+   (integerp (car position))
+   (integerp (cdr position)))
+  #'posframe-poshandler-absolute-x-y)
+ (t (error "Posframe: have no valid poshandler")
+ info)))
 
 (defun posframe-poshandler-absolute-x-y (info)
   "Posframe's position hanlder.



[elpa] master 4c31de2 11/33: Merge pull request #10 from manateelazycat/patch-1

2018-12-14 Thread Feng Shu
branch: master
commit 4c31de20ff32669d38c3322f3c93f218a9b3d554
Merge: fe30ee8 272ca09
Author: tumashu 
Commit: GitHub 

Merge pull request #10 from manateelazycat/patch-1

Use posframe-hide-frame instead make-frame-invisible
---
 posframe.el | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/posframe.el b/posframe.el
index 5b06d0c..7a568e6 100644
--- a/posframe.el
+++ b/posframe.el
@@ -5,7 +5,7 @@
 ;; Author: Feng Shu 
 ;; Maintainer: Feng Shu 
 ;; URL: https://github.com/tumashu/posframe
-;; Version: 0.4.0
+;; Version: 0.4.1
 ;; Keywords: tooltip
 ;; Package-Requires: ((emacs "26"))
 
@@ -372,7 +372,7 @@ you can use `posframe-delete-all' to delete all posframes."
   (posframe--set-frame-position
posframe
(posframe-run-poshandler
-`(;All poshandlers will get info from this plist.
+`( ;All poshandlers will get info from this plist.
   :position ,position
   :poshandler ,poshandler
   :font-height ,font-height
@@ -475,7 +475,12 @@ This need PARENT-FRAME-WIDTH and PARENT-FRAME-HEIGHT"
   (cancel-timer posframe--timeout-timer))
 (setq-local posframe--timeout-timer
 (run-with-timer
- secs nil #'make-frame-invisible posframe
+ secs nil #'posframe-hide-frame posframe
+
+(defun posframe-hide-frame (frame)
+  "This function used to instead `make-frame-invisible' to make hide frame 
safely."
+  (when (frame-live-p frame)
+(make-frame-invisible frame)))
 
 (defun posframe--run-refresh-timer (posframe repeat
  height min-height
@@ -503,7 +508,7 @@ WIDTH and MIN-WIDTH."
 (let ((buffer-info (frame-parameter frame 'posframe-buffer)))
   (when (or (equal posframe-buffer (car buffer-info))
 (equal posframe-buffer (cdr buffer-info)))
-(make-frame-invisible frame)
+(posframe-hide-frame frame)
 
 (defun posframe-delete (posframe-buffer)
   "Delete posframe which buffer POSFRAME-BUFFER."
@@ -537,7 +542,7 @@ This posframe's buffer is POSFRAME-BUFFER."
   (interactive)
   (dolist (frame (frame-list))
 (let ((buffer-info (frame-parameter frame 'posframe-buffer)))
-  (when buffer-info (make-frame-invisible frame)
+  (when buffer-info (posframe-hide-frame frame)
 
 ;;;###autoload
 (defun posframe-delete-all ()



[elpa] master c94bf8a 08/33: Merge pull request #9 from aaronjensen/account-for-frame-height-and-width-when-positioning

2018-12-14 Thread Feng Shu
branch: master
commit c94bf8a1481b094f48ba729c3c9d80df92dd2f67
Merge: 3a8c29e 26d36c7
Author: tumashu 
Commit: GitHub 

Merge pull request #9 from 
aaronjensen/account-for-frame-height-and-width-when-positioning

Account for frame height and width when repositioning
---
 posframe.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/posframe.el b/posframe.el
index b1bc196..26b843c 100644
--- a/posframe.el
+++ b/posframe.el
@@ -378,6 +378,8 @@ you can use `posframe-delete-all' to delete all posframes."
   :font-height ,font-height
   :font-width ,font-width
   :posframe ,posframe
+  :height ,(frame-pixel-height posframe)
+  :width ,(frame-pixel-width posframe)
   :posframe-buffer ,posframe-buffer
   :parent-frame ,parent-frame
   :parent-window ,parent-window



[elpa] master 08ef38d 29/33: posframe: Add posframe-default-initialize-function

2018-12-14 Thread Feng Shu
branch: master
commit 08ef38d27dad266fb3f666890df4994db2346427
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add posframe-default-initialize-function

* posframe.el (posframe-default-initialize-function): New variable,
  user can use this function to set posframe buffer globally.
---
 posframe.el | 18 ++
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/posframe.el b/posframe.el
index b629596..bb10ef5 100644
--- a/posframe.el
+++ b/posframe.el
@@ -123,6 +123,13 @@
   :group 'posframe
   :type 'boolean)
 
+(defcustom posframe-default-initialize-function nil
+  "The default :initialize function of `posframe-show'.
+
+If :initialize argument of `posframe-show' is nil, this function
+will be called as fallback."
+  :type 'function)
+
 (defvar-local posframe--frame nil
   "Record posframe's frame.")
 
@@ -377,7 +384,9 @@ user can set FACE-REMAP, more setting details can be found:
 
 INITIALIZE is a function with no argument, it will run when
 posframe buffer is first selected with `with-current-buffer'
-in posframe-show, and only run once for speed reason.
+in posframe-show, and only run once for speed reason, If INITIALIZE
+is nil, `posframe-default-initialize-function' will be used as
+fallback, user can use this variable to global set posframe buffer.
 
 OVERRIDE-PARAMETERS is very powful, *all* the frame parameters
 used by posframe's frame can be overrided by it.
@@ -416,9 +425,10 @@ you can use `posframe-delete-all' to delete all posframes."
 
   ;; Initialize
   (unless posframe--initialized-p
-(when (functionp initialize)
-  (funcall initialize)
-  (setq posframe--initialized-p t)))
+(let ((func (or initialize posframe-default-initialize-function)))
+  (when (functionp func)
+(funcall func)
+(setq posframe--initialized-p t
 
   ;; Move mouse to (0 . 0)
   (posframe--mouse-banish parent-frame)



[elpa] master 7ba9d9d 25/33: posframe: Add posframe-poshandler-frame-top-center document

2018-12-14 Thread Feng Shu
branch: master
commit 7ba9d9d27b60cb2e87bbf5e2351685e4e95c129a
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add posframe-poshandler-frame-top-center document

* posframe.el (posframe-show): Add posframe-poshandler-frame-top-center 
document
---
 posframe.el | 23 ---
 1 file changed, 12 insertions(+), 11 deletions(-)

diff --git a/posframe.el b/posframe.el
index 2262c44..0abc81c 100644
--- a/posframe.el
+++ b/posframe.el
@@ -325,17 +325,18 @@ POSITION's type, but user can *force* set one with
 the help of POSHANDLER argument. the below are buildin
 poshandler functions:
 1.  `posframe-poshandler-frame-center'
-2.  `posframe-poshandler-frame-top-left-corner'
-3.  `posframe-poshandler-frame-top-right-corner'
-4.  `posframe-poshandler-frame-bottom-left-corner'
-5.  `posframe-poshandler-frame-bottom-right-corner'
-6.  `posframe-poshandler-window-center'
-7.  `posframe-poshandler-window-top-left-corner'
-8.  `posframe-poshandler-window-top-right-corner'
-9.  `posframe-poshandler-window-bottom-left-corner'
-10. `posframe-poshandler-window-bottom-right-corner'
-11. `posframe-poshandler-point-top-left-corner'
-12. `posframe-poshandler-point-bottom-left-corner'
+2.  `posframe-poshandler-frame-top-center'
+3.  `posframe-poshandler-frame-top-left-corner'
+4.  `posframe-poshandler-frame-top-right-corner'
+5.  `posframe-poshandler-frame-bottom-left-corner'
+6.  `posframe-poshandler-frame-bottom-right-corner'
+7.  `posframe-poshandler-window-center'
+8.  `posframe-poshandler-window-top-left-corner'
+9.  `posframe-poshandler-window-top-right-corner'
+10.  `posframe-poshandler-window-bottom-left-corner'
+11. `posframe-poshandler-window-bottom-right-corner'
+12. `posframe-poshandler-point-top-left-corner'
+13. `posframe-poshandler-point-bottom-left-corner'
 
 This posframe's buffer is POSFRAME-BUFFER.
 



[elpa] master d8ec23d 13/33: posframe-hide-frame -> posframe--make-frame-invisible

2018-12-14 Thread Feng Shu
branch: master
commit d8ec23d41c40eff70e4c63a8b3c3b5bdf735c82e
Author: Feng Shu 
Commit: Feng Shu 

posframe-hide-frame -> posframe--make-frame-invisible

posframe-hide-frame is a good name, may be used as user commands
in the future.
---
 posframe.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/posframe.el b/posframe.el
index 35b8fab..9fa4d74 100644
--- a/posframe.el
+++ b/posframe.el
@@ -475,9 +475,9 @@ This need PARENT-FRAME-WIDTH and PARENT-FRAME-HEIGHT"
   (cancel-timer posframe--timeout-timer))
 (setq-local posframe--timeout-timer
 (run-with-timer
- secs nil #'posframe-hide-frame posframe
+ secs nil #'posframe--make-frame-invisible posframe
 
-(defun posframe-hide-frame (frame)
+(defun posframe--make-frame-invisible (frame)
   "This function used to instead `make-frame-invisible' to make hide frame 
safely."
   (when (frame-live-p frame)
 (make-frame-invisible frame)))
@@ -508,7 +508,7 @@ WIDTH and MIN-WIDTH."
 (let ((buffer-info (frame-parameter frame 'posframe-buffer)))
   (when (or (equal posframe-buffer (car buffer-info))
 (equal posframe-buffer (cdr buffer-info)))
-(posframe-hide-frame frame)
+(posframe--make-frame-invisible frame)
 
 (defun posframe-delete (posframe-buffer)
   "Delete posframe which buffer POSFRAME-BUFFER."
@@ -542,7 +542,7 @@ This posframe's buffer is POSFRAME-BUFFER."
   (interactive)
   (dolist (frame (frame-list))
 (let ((buffer-info (frame-parameter frame 'posframe-buffer)))
-  (when buffer-info (posframe-hide-frame frame)
+  (when buffer-info (posframe--make-frame-invisible frame)
 
 ;;;###autoload
 (defun posframe-delete-all ()



[elpa] master d115a5a 23/33: Merge pull request #13 from yqrashawn/empty-frame-name

2018-12-14 Thread Feng Shu
branch: master
commit d115a5abf71fcb2fbaa7a682aa4c08acc37a1983
Merge: 945761d a0dfcde
Author: tumashu 
Commit: GitHub 

Merge pull request #13 from yqrashawn/empty-frame-name

use empty posframe title for window manager
---
 posframe.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/posframe.el b/posframe.el
index a095fde..affc072 100644
--- a/posframe.el
+++ b/posframe.el
@@ -189,6 +189,7 @@ This posframe's buffer is POSFRAME-BUFFER."
 face-remap)))
 (with-current-buffer posframe-buffer
   ;; Many variables take effect after call `set-window-buffer'
+  (setq-local frame-title-format "")
   (setq-local left-fringe-width nil)
   (setq-local right-fringe-width nil)
   (setq-local fringes-outside-margins 0)



[elpa] master 1b309a2 24/33: posframe: Add posframe-poshandler-frame-top-center

2018-12-14 Thread Feng Shu
branch: master
commit 1b309a2f1531865c45d70cb8cdcec6aaf5f78f3d
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add posframe-poshandler-frame-top-center

* posframe.el (posframe-poshandler-frame-top-center): New poshandler
---
 posframe.el | 12 
 1 file changed, 12 insertions(+)

diff --git a/posframe.el b/posframe.el
index affc072..2262c44 100644
--- a/posframe.el
+++ b/posframe.el
@@ -728,6 +728,18 @@ be found in docstring of `posframe-show'."
   (plist-get info :posframe-height))
2)))
 
+
+(defun posframe-poshandler-frame-top-center (info)
+  "Posframe's position handler.
+
+Get a position which let posframe stay onto its
+parent-frame's top center.  The structure of INFO can
+be found in docstring of `posframe-show'."
+  (cons (/ (- (plist-get info :parent-frame-width)
+  (plist-get info :posframe-width))
+   2)
+0))
+
 (defun posframe-poshandler-frame-top-left-corner (_info)
   "Posframe's position handler.
 



[elpa] master 945761d 21/33: posframe: cache posframe/parent-frame/parent-window's more info

2018-12-14 Thread Feng Shu
branch: master
commit 945761dc70c62a04747c4c892bdf5fc38670e50e
Author: Feng Shu 
Commit: Feng Shu 

posframe: cache posframe/parent-frame/parent-window's more info

  (:position xxx
   :position-info xxx
   :poshandler xxx
   :font-height xxx
   :font-width xxx
   :posframe xxx
   :posframe-width xxx
   :posframe-height xxx
   :posframe-buffer xxx
   :parent-frame xxx
   :parent-window-left xxx
   :parent-window-top xxx
   :parent-frame-width xxx
   :parent-frame-height xxx
   :parent-window xxx
   :parent-window-width  xxx
   :parent-window-height xxx
   :minibuffer-height
   :mode-line-height
   :header-line-height
   :x-pixel-offset xxx
   :y-pixel-offset xxx)
---
 posframe.el | 162 ++--
 1 file changed, 91 insertions(+), 71 deletions(-)

diff --git a/posframe.el b/posframe.el
index f466a64..a095fde 100644
--- a/posframe.el
+++ b/posframe.el
@@ -296,11 +296,28 @@ POSITION can be:
 POSHANDLER is a function with one argument, and return
 a real position. its argument is a plist, which like
 
-  (:position xxx :poshandler xxx
-   :font-height xxx :font-width xxx
-   :posframe xxx :posframe-buffer xxx
-   :parent-frame xxx :parent-window xxx
-   :x-pixel-offset xxx :y-pixel-offset xxx)
+  (:position xxx
+   :position-info xxx
+   :poshandler xxx
+   :font-height xxx
+   :font-width xxx
+   :posframe xxx
+   :posframe-width xxx
+   :posframe-height xxx
+   :posframe-buffer xxx
+   :parent-frame xxx
+   :parent-window-left xxx
+   :parent-window-top xxx
+   :parent-frame-width xxx
+   :parent-frame-height xxx
+   :parent-window xxx
+   :parent-window-width  xxx
+   :parent-window-height xxx
+   :minibuffer-height
+   :mode-line-height
+   :header-line-height
+   :x-pixel-offset xxx
+   :y-pixel-offset xxx)
 
 by default, poshandler is auto selected based on
 POSITION's type, but user can *force* set one with
@@ -370,11 +387,19 @@ you can use `posframe-delete-all' to delete all 
posframes."
  (min-width (or min-width 1))
  (min-height (or min-height 1))
  (parent-window (selected-window))
+ (parent-window-top (window-pixel-top parent-window))
+ (parent-window-left (window-pixel-left parent-window))
+ (parent-window-width (window-pixel-width parent-window))
+ (parent-window-height (window-pixel-height parent-window))
+ (position-info (posn-at-point position parent-window))
  (parent-frame (window-frame parent-window))
  (parent-frame-width (frame-pixel-width parent-frame))
  (parent-frame-height (frame-pixel-height parent-frame))
  (font-width (default-font-width))
  (font-height (posframe--get-font-height position))
+ (mode-line-height (window-mode-line-height))
+ (minibuffer-height (window-pixel-height (minibuffer-window)))
+ (header-line-height (window-header-line-height parent-window))
  (frame-resize-pixelwise t)
  posframe)
 
@@ -412,15 +437,25 @@ you can use `posframe-delete-all' to delete all 
posframes."
(posframe-run-poshandler
 `(;All poshandlers will get info from this plist.
   :position ,position
+  :position-info ,position-info
   :poshandler ,poshandler
   :font-height ,font-height
   :font-width ,font-width
   :posframe ,posframe
-  :height ,(frame-pixel-height posframe)
-  :width ,(frame-pixel-width posframe)
+  :posframe-width ,(frame-pixel-width posframe)
+  :posframe-height ,(frame-pixel-height posframe)
   :posframe-buffer ,posframe-buffer
   :parent-frame ,parent-frame
+  :parent-frame-width ,parent-frame-width
+  :parent-frame-height ,parent-frame-height
   :parent-window ,parent-window
+  :parent-window-top ,parent-window-top
+  :parent-window-left ,parent-window-left
+  :parent-window-width ,parent-window-width
+  :parent-window-height ,parent-window-height
+  :mode-line-height ,mode-line-height
+  :minibuffer-height ,minibuffer-height
+  :header-line-height ,header-line-height
   :x-pixel-offset ,x-pixel-offset
   :y-pixel-offset ,y-pixel-offset))
parent-frame-width parent-frame-height)
@@ -643,29 +678,25 @@ the structure of INFO can be found in docstring
 of `posframe-show'.
 
 Optional argument FONT-HEIGHT ."
-  (let* ((position (plist-get info :position))
- (x-pixel-offset (plist-get info :x-pixel-offset))
+  (let* ((x-pixel-offset (plist-get info :x-pixel-offset))
  (y-pixel-offset (plist-get info :y-pixel-offset))
- (posframe-width (frame-pixel-width
-  (plist-get info :posframe)))
- (posframe-height (frame-pixel-height
-   (plist-get info :posframe)))
+ (posframe-width (plist-get info :posf

[elpa] master d09e283 28/33: * posframe.el (posframe-show, posframe--initialized-p): Rename posframe--initialize-p to posframe--initialized-p

2018-12-14 Thread Feng Shu
branch: master
commit d09e283443b62866afc7ab3714d60d513d9b4ec1
Author: Feng Shu 
Commit: Feng Shu 

* posframe.el (posframe-show, posframe--initialized-p): Rename 
posframe--initialize-p to posframe--initialized-p
---
 posframe.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/posframe.el b/posframe.el
index b2f4fae..b629596 100644
--- a/posframe.el
+++ b/posframe.el
@@ -153,7 +153,7 @@ frame.")
 (defvar-local posframe--refresh-timer nil
   "Record the timer to deal with refresh argument of `posframe-show'.")
 
-(defvar-local posframe--initialize-p nil
+(defvar-local posframe--initialized-p nil
   "Record initialize status of `posframe-show'.")
 
 (cl-defun posframe--create-posframe (posframe-buffer
@@ -415,10 +415,10 @@ you can use `posframe-delete-all' to delete all 
posframes."
 (with-current-buffer posframe-buffer
 
   ;; Initialize
-  (unless posframe--initialize-p
+  (unless posframe--initialized-p
 (when (functionp initialize)
   (funcall initialize)
-  (setq posframe--initialize-p t)))
+  (setq posframe--initialized-p t)))
 
   ;; Move mouse to (0 . 0)
   (posframe--mouse-banish parent-frame)



[elpa] master 0ac1e46 06/33: Disable posframe-mouse-banish on macOS

2018-12-14 Thread Feng Shu
branch: master
commit 0ac1e469f07a6e41befda2b7183ae43e762da9db
Author: Radon Rosborough 
Commit: Radon Rosborough 

Disable posframe-mouse-banish on macOS
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index b1bc196..8259822 100644
--- a/posframe.el
+++ b/posframe.el
@@ -98,7 +98,7 @@
   :group 'lisp
   :prefix "posframe-")
 
-(defcustom posframe-mouse-banish t
+(defcustom posframe-mouse-banish (not (eq system-type 'darwin))
   "Mouse will be moved to (0 , 0) when it is non-nil."
   :group 'posframe
   :type 'boolean)



[elpa] master 575e902 26/33: * posframe.el (posframe-show): Remove useless space

2018-12-14 Thread Feng Shu
branch: master
commit 575e90271f65d26f685fc30e2d9b589c254967c8
Author: Feng Shu 
Commit: Feng Shu 

* posframe.el (posframe-show): Remove useless space
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index 0abc81c..d187629 100644
--- a/posframe.el
+++ b/posframe.el
@@ -333,7 +333,7 @@ poshandler functions:
 7.  `posframe-poshandler-window-center'
 8.  `posframe-poshandler-window-top-left-corner'
 9.  `posframe-poshandler-window-top-right-corner'
-10.  `posframe-poshandler-window-bottom-left-corner'
+10. `posframe-poshandler-window-bottom-left-corner'
 11. `posframe-poshandler-window-bottom-right-corner'
 12. `posframe-poshandler-point-top-left-corner'
 13. `posframe-poshandler-point-bottom-left-corner'



[elpa] master 26d36c7 07/33: Account for frame height and width when repositioning

2018-12-14 Thread Feng Shu
branch: master
commit 26d36c7169b7e6ab57fdb1e045dfac7f80723bb4
Author: Aaron Jensen 
Commit: Aaron Jensen 

Account for frame height and width when repositioning

Fixes #8
---
 posframe.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/posframe.el b/posframe.el
index 393c1c0..59cc381 100644
--- a/posframe.el
+++ b/posframe.el
@@ -378,6 +378,8 @@ you can use `posframe-delete-all' to delete all posframes."
   :font-height ,font-height
   :font-width ,font-width
   :posframe ,posframe
+  :height ,(frame-pixel-height posframe)
+  :width ,(frame-pixel-width posframe)
   :posframe-buffer ,posframe-buffer
   :parent-frame ,parent-frame
   :parent-window ,parent-window



[elpa] master b79f1ce 17/33: posframe: Add fullscreen parameter

2018-12-14 Thread Feng Shu
branch: master
commit b79f1ce48444291f428aa1579b59af21c965f732
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add fullscreen parameter

* posframe.el (posframe--create-posframe): Add fullscreen parameter.
---
 posframe.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/posframe.el b/posframe.el
index 46551a2..ca64dcf 100644
--- a/posframe.el
+++ b/posframe.el
@@ -220,6 +220,7 @@ This posframe's buffer is POSFRAME-BUFFER."
(keep-ratio ,keep-ratio)
(posframe-buffer . ,(cons (buffer-name posframe-buffer)
  posframe-buffer))
+   (fullscreen . nil)
(no-accept-focus . t)
(min-width  . 0)
(min-height . 0)



[elpa] master 9768b0a 18/33: posframe: support internal-border-width

2018-12-14 Thread Feng Shu
branch: master
commit 9768b0a1b68a55059e6bbcf50ccf0e067e447b1d
Author: Feng Shu 
Commit: Feng Shu 

posframe: support internal-border-width

* posframe.el (posframe--create-posframe, posframe-show): Add 
internal-border-width
---
 posframe.el | 11 ++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index ca64dcf..cea116c 100644
--- a/posframe.el
+++ b/posframe.el
@@ -161,6 +161,7 @@ frame.")
  background-color
  left-fringe
  right-fringe
+ internal-border-width
  font
  keep-ratio
  override-parameters
@@ -170,6 +171,7 @@ frame.")
 This posframe's buffer is POSFRAME-BUFFER."
   (let ((left-fringe (or left-fringe 0))
 (right-fringe (or right-fringe 0))
+(internal-border-width (or internal-border-width 0))
 (posframe-buffer (get-buffer-create posframe-buffer))
 (after-make-frame-functions nil)
 (args (list parent-frame
@@ -225,7 +227,7 @@ This posframe's buffer is POSFRAME-BUFFER."
(min-width  . 0)
(min-height . 0)
(border-width . 0)
-   (internal-border-width . 0)
+   (internal-border-width . ,internal-border-width)
(vertical-scroll-bars . nil)
(horizontal-scroll-bars . nil)
(left-fringe . ,left-fringe)
@@ -267,6 +269,7 @@ This posframe's buffer is POSFRAME-BUFFER."
  y-pixel-offset
  left-fringe
  right-fringe
+ internal-border-width
  font
  foreground-color
  background-color
@@ -324,6 +327,11 @@ size too small, MIN-WIDTH and MIN-HEIGTH will be useful
 If LEFT-FRINGE or RIGHT-FRINGE is a number, Left fringe or
 right fringe with be showed with number width.
 
+By default, posframe shows no border, user can let border
+showed by setting INTERNAL-BORDER-WIDTH to a postive number,
+by the way, border's color is specified by the background of
+the ‘internal-border’ face.
+
 By default, posframe's font is deriverd from current frame
 user can set posframe's font with FONT argument.
 
@@ -372,6 +380,7 @@ you can use `posframe-delete-all' to delete all posframes."
  :parent-frame parent-frame
  :left-fringe left-fringe
  :right-fringe right-fringe
+ :internal-border-width internal-border-width
  :foreground-color foreground-color
  :background-color background-color
  :keep-ratio keep-ratio



[elpa] master fe30ee8 09/33: Merge pull request #7 from raxod502/feat/mouse-banish-on-macos

2018-12-14 Thread Feng Shu
branch: master
commit fe30ee8f4bef854e12a47b9355f3e817251217f6
Merge: c94bf8a 0ac1e46
Author: tumashu 
Commit: GitHub 

Merge pull request #7 from raxod502/feat/mouse-banish-on-macos

Disable posframe-mouse-banish on macOS
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index 26b843c..5b06d0c 100644
--- a/posframe.el
+++ b/posframe.el
@@ -98,7 +98,7 @@
   :group 'lisp
   :prefix "posframe-")
 
-(defcustom posframe-mouse-banish t
+(defcustom posframe-mouse-banish (not (eq system-type 'darwin))
   "Mouse will be moved to (0 , 0) when it is non-nil."
   :group 'posframe
   :type 'boolean)



[elpa] master c048016 14/33: Add posframe-poshandler-frame-top-left/right-corner

2018-12-14 Thread Feng Shu
branch: master
commit c048016c6d36091cdafe30397d5d0d8b276047b4
Author: Feng Shu 
Commit: Feng Shu 

Add posframe-poshandler-frame-top-left/right-corner
---
 posframe.el | 39 +--
 1 file changed, 29 insertions(+), 10 deletions(-)

diff --git a/posframe.el b/posframe.el
index 9fa4d74..001abe4 100644
--- a/posframe.el
+++ b/posframe.el
@@ -282,16 +282,18 @@ by default, poshandler is auto selected based on
 POSITION's type, but user can *force* set one with
 the help of POSHANDLER argument. the below are buildin
 poshandler functions:
-1. `posframe-poshandler-frame-center'
-2. `posframe-poshandler-frame-bottom-left-corner'
-3. `posframe-poshandler-frame-bottom-right-corner'
-4. `posframe-poshandler-window-center'
-5. `posframe-poshandler-window-top-left-corner'
-6. `posframe-poshandler-window-top-right-corner'
-7. `posframe-poshandler-window-bottom-left-corner'
-8. `posframe-poshandler-window-bottom-right-corner'
-9. `posframe-poshandler-point-top-left-corner'
-9. `posframe-poshandler-point-bottom-left-corner'
+1.  `posframe-poshandler-frame-center'
+2.  `posframe-poshandler-frame-top-left-corner'
+3.  `posframe-poshandler-frame-top-right-corner'
+4.  `posframe-poshandler-frame-bottom-left-corner'
+5.  `posframe-poshandler-frame-bottom-right-corner'
+6.  `posframe-poshandler-window-center'
+7.  `posframe-poshandler-window-top-left-corner'
+8.  `posframe-poshandler-window-top-right-corner'
+9.  `posframe-poshandler-window-bottom-left-corner'
+10. `posframe-poshandler-window-bottom-right-corner'
+11. `posframe-poshandler-point-top-left-corner'
+12. `posframe-poshandler-point-bottom-left-corner'
 
 This posframe's buffer is POSFRAME-BUFFER.
 
@@ -660,6 +662,23 @@ be found in docstring of `posframe-show'."
 (frame-pixel-height posframe))
  2
 
+(defun posframe-poshandler-frame-top-left-corner (_info)
+  "Posframe's position handler.
+
+Get a position which let posframe stay onto its parent-frame's
+top left corner.  The structure of INFO can be found
+in docstring of `posframe-show'."
+  '(0 . 0))
+
+(defun posframe-poshandler-frame-top-right-corner (_info)
+  "Posframe's position handler.
+
+Get a position which let posframe stay onto its parent-frame's
+top right corner.  The structure of INFO can be found
+in docstring of `posframe-show'."
+  '(-1 . 0))
+
+
 (defun posframe-poshandler-frame-bottom-left-corner (_info)
   "Posframe's position handler.
 



[elpa] master baa2289 30/33: Change to looser line-end-style specification

2018-12-14 Thread Feng Shu
branch: master
commit baa2289d0d3938ab0339715285c0a3c69253810c
Author: jingqi 
Commit: jingqi 

Change to looser line-end-style specification
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index bb10ef5..39015ff 100644
--- a/posframe.el
+++ b/posframe.el
@@ -878,7 +878,7 @@ docstring of `posframe-show'."
 (provide 'posframe)
 
 ;; Local Variables:
-;; coding: utf-8-unix
+;; coding: utf-8
 ;; End:
 
 ;;; posframe.el ends here



[elpa] master c156667 15/33: Add more information to README

2018-12-14 Thread Feng Shu
branch: master
commit c15666702ff6866963d053e1fb8cecc716ebc579
Author: Feng Shu 
Commit: Feng Shu 

Add more information to README
---
 README.md   | 66 +
 posframe.el | 15 ++
 2 files changed, 55 insertions(+), 26 deletions(-)

diff --git a/README.md b/README.md
index 96508aa..45c7c8e 100644
--- a/README.md
+++ b/README.md
@@ -1,23 +1,25 @@
+Note: this file is auto converted from posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
+
 
 # 目录
 
-1.  [Posframe README](#orgb0e618a)
-1.  [What is posframe](#orga5aca6b)
-2.  [Installation](#orgc054dab)
-3.  [Usage](#orga60ff65)
-1.  [Create a posframe](#org216b84e)
-2.  [Hide a posframe](#orgda0528f)
-3.  [Hide all posframes](#org7904f7f)
-4.  [Delete a posframe](#org9aed6aa)
-5.  [Delete all posframes](#orga1ab8fd)
+1.  [Posframe README](#org0b9c3bd)
+1.  [What is posframe](#org0728352)
+2.  [Installation](#org515eb16)
+3.  [Usage](#orgf346c5e)
+1.  [Create a posframe](#orgfd5312d)
+2.  [Hide a posframe](#org530c1c6)
+3.  [Hide all posframes](#org5cf1eb8)
+4.  [Delete a posframe](#org5147f85)
+5.  [Delete all posframes](#org22b7dfe)
 
 
-
+
 
 # Posframe README
 
 
-
+
 
 ## What is posframe
 
@@ -34,46 +36,61 @@ NOTE: For MacOS users, posframe need Emacs (version >= 
26.0.91)
 ![img](./snapshots/posframe-1.png)
 
 
-
+
 
 ## Installation
 
 (require 'posframe)
 
 
-
+
 
 ## Usage
 
 
-
+
 
 ### Create a posframe
 
-(posframe-show " *my-posframe-buffer*"
-   :string "This is a test"
-   :position (point))
+1.  Simple way
+
+(posframe-show " *my-posframe-buffer*"
+   :string "This is a test"
+   :position (point))
+
+Arguments documents:
+
+C-h f posframe-show
+
+Note: buffers prefixed with space will be not showed in buffer-list.
 
-Arguments documents:
+2.  Advanced way
 
-C-h f posframe-show
+(defvar my-posframe-buffer " *my-posframe-buffer*")
 
+(with-current-buffer my-posframe-buffer
+  (erase-buffer)
+  (insert "Hello world"))
 
-
+(posframe-show my-posframe-buffer
+   :position (point))
+
+
+
 
 ### Hide a posframe
 
 (posframe-hide " *my-posframe-buffer*")
 
 
-
+
 
 ### Hide all posframes
 
 M-x posframe-hide-all
 
 
-
+
 
 ### Delete a posframe
 
@@ -85,7 +102,7 @@ Arguments documents:
 (posframe-delete-frame " *my-posframe-buffer*")
 
 
-
+
 
 ### Delete all posframes
 
@@ -94,6 +111,3 @@ Arguments documents:
 Note: this command will delete all posframe buffers,
 suggest not run this command if you are sharing a buffer
 between posframe and other packages.
-
-
-Converted from posframe.el by [el2org](https://github.com/tumashu/el2org).
diff --git a/posframe.el b/posframe.el
index 001abe4..a66b1f2 100644
--- a/posframe.el
+++ b/posframe.el
@@ -50,6 +50,7 @@
 
 ;; *** Create a posframe
 
+;;  Simple way
 ;; #+BEGIN_EXAMPLE
 ;; (posframe-show " *my-posframe-buffer*"
 ;;:string "This is a test"
@@ -61,6 +62,20 @@
 ;; C-h f posframe-show
 ;; #+END_EXAMPLE
 
+;; Note: buffers prefixed with space will be not showed in buffer-list.
+
+;;  Advanced way
+;; #+BEGIN_EXAMPLE
+;; (defvar my-posframe-buffer " *my-posframe-buffer*")
+
+;; (with-current-buffer my-posframe-buffer
+;;   (erase-buffer)
+;;   (insert "Hello world"))
+
+;; (posframe-show my-posframe-buffer
+;;:position (point))
+;; #+END_EXAMPLE
+
 ;; *** Hide a posframe
 ;; #+BEGIN_EXAMPLE
 ;; (posframe-hide " *my-posframe-buffer*")



[elpa] master 5803070 19/33: posframe: Recreate posframe when internal-border-width changed

2018-12-14 Thread Feng Shu
branch: master
commit 5803070c3e3db098c45e5b266564498328c8628c
Author: Feng Shu 
Commit: Feng Shu 

posframe: Recreate posframe when internal-border-width changed

* posframe.el (posframe--create-posframe): Recreate posframe when 
internal-border-width changed
---
 posframe.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/posframe.el b/posframe.el
index cea116c..0436e26 100644
--- a/posframe.el
+++ b/posframe.el
@@ -179,6 +179,7 @@ This posframe's buffer is POSFRAME-BUFFER."
 background-color
 right-fringe
 left-fringe
+internal-border-width
 font
 keep-ratio
 override-parameters



[elpa] master 713a4ef 12/33: Fix indent

2018-12-14 Thread Feng Shu
branch: master
commit 713a4ef87bfafcdf8a14ee302e5e391d3c998989
Author: Feng Shu 
Commit: Feng Shu 

Fix indent
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index 7a568e6..35b8fab 100644
--- a/posframe.el
+++ b/posframe.el
@@ -372,7 +372,7 @@ you can use `posframe-delete-all' to delete all posframes."
   (posframe--set-frame-position
posframe
(posframe-run-poshandler
-`( ;All poshandlers will get info from this plist.
+`(;All poshandlers will get info from this plist.
   :position ,position
   :poshandler ,poshandler
   :font-height ,font-height



[elpa] master 09e3f19 32/33: bump to version 0.4.2

2018-12-14 Thread Feng Shu
branch: master
commit 09e3f1937d19243cfb02178540aaf5c78f2e2939
Author: Feng Shu 
Commit: Feng Shu 

bump to version 0.4.2
---
 posframe.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/posframe.el b/posframe.el
index 39015ff..2c165d4 100644
--- a/posframe.el
+++ b/posframe.el
@@ -5,7 +5,7 @@
 ;; Author: Feng Shu 
 ;; Maintainer: Feng Shu 
 ;; URL: https://github.com/tumashu/posframe
-;; Version: 0.4.1
+;; Version: 0.4.2
 ;; Keywords: tooltip
 ;; Package-Requires: ((emacs "26"))
 



[elpa] master 272ca09 10/33: Use posframe-hide-frame instead make-frame-invisible

2018-12-14 Thread Feng Shu
branch: master
commit 272ca0966fe850e8598f7799f0e152e39e48371d
Author: Andy Stewart 
Commit: GitHub 

Use posframe-hide-frame instead make-frame-invisible

Hi, I'm AndyStewart from EmacsWiki, your posframe.el is awesome.

I found posframe--run-timeout-timer will trigger error once developer use 
posframe-delete remove frame before posframe timer.
Error running timer ‘make-frame-invisible’: (wrong-type-argument 
frame-live-p #)

I build a new function posframe-hide-frame instead make-frame-invisible 
that use frame-live-p check frame before delete.
---
 posframe.el | 15 ++-
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/posframe.el b/posframe.el
index 5b06d0c..7a568e6 100644
--- a/posframe.el
+++ b/posframe.el
@@ -5,7 +5,7 @@
 ;; Author: Feng Shu 
 ;; Maintainer: Feng Shu 
 ;; URL: https://github.com/tumashu/posframe
-;; Version: 0.4.0
+;; Version: 0.4.1
 ;; Keywords: tooltip
 ;; Package-Requires: ((emacs "26"))
 
@@ -372,7 +372,7 @@ you can use `posframe-delete-all' to delete all posframes."
   (posframe--set-frame-position
posframe
(posframe-run-poshandler
-`(;All poshandlers will get info from this plist.
+`( ;All poshandlers will get info from this plist.
   :position ,position
   :poshandler ,poshandler
   :font-height ,font-height
@@ -475,7 +475,12 @@ This need PARENT-FRAME-WIDTH and PARENT-FRAME-HEIGHT"
   (cancel-timer posframe--timeout-timer))
 (setq-local posframe--timeout-timer
 (run-with-timer
- secs nil #'make-frame-invisible posframe
+ secs nil #'posframe-hide-frame posframe
+
+(defun posframe-hide-frame (frame)
+  "This function used to instead `make-frame-invisible' to make hide frame 
safely."
+  (when (frame-live-p frame)
+(make-frame-invisible frame)))
 
 (defun posframe--run-refresh-timer (posframe repeat
  height min-height
@@ -503,7 +508,7 @@ WIDTH and MIN-WIDTH."
 (let ((buffer-info (frame-parameter frame 'posframe-buffer)))
   (when (or (equal posframe-buffer (car buffer-info))
 (equal posframe-buffer (cdr buffer-info)))
-(make-frame-invisible frame)
+(posframe-hide-frame frame)
 
 (defun posframe-delete (posframe-buffer)
   "Delete posframe which buffer POSFRAME-BUFFER."
@@ -537,7 +542,7 @@ This posframe's buffer is POSFRAME-BUFFER."
   (interactive)
   (dolist (frame (frame-list))
 (let ((buffer-info (frame-parameter frame 'posframe-buffer)))
-  (when buffer-info (make-frame-invisible frame)
+  (when buffer-info (posframe-hide-frame frame)
 
 ;;;###autoload
 (defun posframe-delete-all ()



[elpa] master 02b446a 27/33: posframe: Add initialize argument to posframe-show

2018-12-14 Thread Feng Shu
branch: master
commit 02b446a577f5fb731ef0af31f2c13b14d192c2f3
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add initialize argument to posframe-show

* posframe.el (posframe--initialize-p): New variable.
(posframe-show): Add initialize argument
---
 posframe.el | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/posframe.el b/posframe.el
index d187629..b2f4fae 100644
--- a/posframe.el
+++ b/posframe.el
@@ -153,6 +153,8 @@ frame.")
 (defvar-local posframe--refresh-timer nil
   "Record the timer to deal with refresh argument of `posframe-show'.")
 
+(defvar-local posframe--initialize-p nil
+  "Record initialize status of `posframe-show'.")
 
 (cl-defun posframe--create-posframe (posframe-buffer
  &key
@@ -281,6 +283,7 @@ This posframe's buffer is POSFRAME-BUFFER."
  respect-header-line
  respect-mode-line
  face-remap
+ initialize
  no-properties
  keep-ratio
  override-parameters
@@ -372,6 +375,10 @@ user can set FACE-REMAP, more setting details can be found:
 
   C-h v face-remapping-alist
 
+INITIALIZE is a function with no argument, it will run when
+posframe buffer is first selected with `with-current-buffer'
+in posframe-show, and only run once for speed reason.
+
 OVERRIDE-PARAMETERS is very powful, *all* the frame parameters
 used by posframe's frame can be overrided by it.
 
@@ -406,6 +413,13 @@ you can use `posframe-delete-all' to delete all posframes."
  posframe)
 
 (with-current-buffer posframe-buffer
+
+  ;; Initialize
+  (unless posframe--initialize-p
+(when (functionp initialize)
+  (funcall initialize)
+  (setq posframe--initialize-p t)))
+
   ;; Move mouse to (0 . 0)
   (posframe--mouse-banish parent-frame)
 



[elpa] master 2e8003e 04/33: posframe: Add posframe--last-font-height-info.

2018-12-14 Thread Feng Shu
branch: master
commit 2e8003eb7e110ecb011b4fd9966362388c7e16ab
Author: Feng Shu 
Commit: Feng Shu 

posframe: Add posframe--last-font-height-info.

* posframe.el (posframe--last-font-height-info): New variable.
(posframe--get-font-height): Use posframe--last-font-height-info.
---
 posframe.el | 26 +-
 1 file changed, 17 insertions(+), 9 deletions(-)

diff --git a/posframe.el b/posframe.el
index 4b76901..393c1c0 100644
--- a/posframe.el
+++ b/posframe.el
@@ -123,6 +123,9 @@
 (defvar-local posframe--last-poshandler-info nil
   "Record the last poshandler info.")
 
+(defvar-local posframe--last-font-height-info nil
+  "Record the last font height info.")
+
 (defvar-local posframe--last-args nil
   "Record the last arguments of `posframe--create-posframe'.
 
@@ -394,15 +397,20 @@ you can use `posframe-delete-all' to delete all 
posframes."
 
 (defun posframe--get-font-height (position)
   "Get the font's height at POSITION."
-  (when (integerp position)
-(if (= position 1)
-(default-line-height)
-  (aref (font-info
- (font-at
-  (if (and (= position (point-max)))
-  (- position 1)
-position)))
-3
+  (if (eq position (car posframe--last-font-height-info))
+  (cdr posframe--last-font-height-info)
+(let ((height (when (integerp position)
+(if (= position 1)
+(default-line-height)
+  (aref (font-info
+ (font-at
+  (if (and (= position (point-max)))
+  (- position 1)
+position)))
+3)
+  (setq posframe--last-font-height-info
+(cons position height))
+  height)))
 
 (defun posframe--mouse-banish (frame)
   "Banish mouse to the (0 . 0) of FRAME.



[elpa] master a8e1bda 16/33: Update README again.

2018-12-14 Thread Feng Shu
branch: master
commit a8e1bda648890d611eba76514aa0e3f9865cf2ab
Author: Feng Shu 
Commit: Feng Shu 

Update README again.
---
 README.md   | 49 -
 posframe.el | 16 
 2 files changed, 32 insertions(+), 33 deletions(-)

diff --git a/README.md b/README.md
index 45c7c8e..8648b3b 100644
--- a/README.md
+++ b/README.md
@@ -3,23 +3,23 @@ Note: this file is auto converted from posframe.el by 
[el2org](https://github.co
 
 # 目录
 
-1.  [Posframe README](#org0b9c3bd)
-1.  [What is posframe](#org0728352)
-2.  [Installation](#org515eb16)
-3.  [Usage](#orgf346c5e)
-1.  [Create a posframe](#orgfd5312d)
-2.  [Hide a posframe](#org530c1c6)
-3.  [Hide all posframes](#org5cf1eb8)
-4.  [Delete a posframe](#org5147f85)
-5.  [Delete all posframes](#org22b7dfe)
+1.  [Posframe README](#org83cbaa0)
+1.  [What is posframe](#org3ce725d)
+2.  [Installation](#org545827a)
+3.  [Usage](#orgdac766b)
+1.  [Create a posframe](#orgea6aecd)
+2.  [Hide a posframe](#orga5310b9)
+3.  [Hide all posframes](#orgbf09855)
+4.  [Delete a posframe](#org68db811)
+5.  [Delete all posframes](#org12f2467)
 
 
-
+
 
 # Posframe README
 
 
-
+
 
 ## What is posframe
 
@@ -36,61 +36,60 @@ NOTE: For MacOS users, posframe need Emacs (version >= 
26.0.91)
 ![img](./snapshots/posframe-1.png)
 
 
-
+
 
 ## Installation
 
 (require 'posframe)
 
 
-
+
 
 ## Usage
 
 
-
+
 
 ### Create a posframe
 
 1.  Simple way
 
+NOTE: buffers prefixed with space will be not showed in buffer-list.
 (posframe-show " *my-posframe-buffer*"
:string "This is a test"
:position (point))
 
-Arguments documents:
-
-C-h f posframe-show
-
-Note: buffers prefixed with space will be not showed in buffer-list.
-
 2.  Advanced way
 
 (defvar my-posframe-buffer " *my-posframe-buffer*")
 
-(with-current-buffer my-posframe-buffer
+(with-current-buffer (get-buffer-create my-posframe-buffer)
   (erase-buffer)
   (insert "Hello world"))
 
 (posframe-show my-posframe-buffer
:position (point))
 
+3.  Arguments
+
+C-h f posframe-show
+
 
-
+
 
 ### Hide a posframe
 
 (posframe-hide " *my-posframe-buffer*")
 
 
-
+
 
 ### Hide all posframes
 
 M-x posframe-hide-all
 
 
-
+
 
 ### Delete a posframe
 
@@ -102,7 +101,7 @@ NOTE: For MacOS users, posframe need Emacs (version >= 
26.0.91)
 (posframe-delete-frame " *my-posframe-buffer*")
 
 
-
+
 
 ### Delete all posframes
 
diff --git a/posframe.el b/posframe.el
index a66b1f2..46551a2 100644
--- a/posframe.el
+++ b/posframe.el
@@ -52,23 +52,17 @@
 
 ;;  Simple way
 ;; #+BEGIN_EXAMPLE
+;; ;; NOTE: buffers prefixed with space will be not showed in buffer-list.
 ;; (posframe-show " *my-posframe-buffer*"
 ;;:string "This is a test"
 ;;:position (point))
 ;; #+END_EXAMPLE
 
-;; Arguments documents:
-;; #+BEGIN_EXAMPLE
-;; C-h f posframe-show
-;; #+END_EXAMPLE
-
-;; Note: buffers prefixed with space will be not showed in buffer-list.
-
 ;;  Advanced way
 ;; #+BEGIN_EXAMPLE
 ;; (defvar my-posframe-buffer " *my-posframe-buffer*")
 
-;; (with-current-buffer my-posframe-buffer
+;; (with-current-buffer (get-buffer-create my-posframe-buffer)
 ;;   (erase-buffer)
 ;;   (insert "Hello world"))
 
@@ -76,6 +70,12 @@
 ;;:position (point))
 ;; #+END_EXAMPLE
 
+;;  Arguments
+
+;; #+BEGIN_EXAMPLE
+;; C-h f posframe-show
+;; #+END_EXAMPLE
+
 ;; *** Hide a posframe
 ;; #+BEGIN_EXAMPLE
 ;; (posframe-hide " *my-posframe-buffer*")



[elpa] master 769adaa 33/33: Merge commit '09e3f1937d19243cfb02178540aaf5c78f2e2939'

2018-12-14 Thread Feng Shu
branch: master
commit 769adaaaef6d8266c269e6bab799b5c337fbe5b0
Merge: d461e05 09e3f19
Author: Feng Shu 
Commit: Feng Shu 

Merge commit '09e3f1937d19243cfb02178540aaf5c78f2e2939'
---
 packages/posframe/README.md   |  75 +
 packages/posframe/posframe.el | 362 +-
 2 files changed, 294 insertions(+), 143 deletions(-)

diff --git a/packages/posframe/README.md b/packages/posframe/README.md
index 3f227e5..8648b3b 100644
--- a/packages/posframe/README.md
+++ b/packages/posframe/README.md
@@ -1,23 +1,25 @@
+Note: this file is auto converted from posframe.el by 
[el2org](https://github.com/tumashu/el2org), please do not edit it by hand!!!
+
 
 # 目录
 
-1.  [Posframe README](#org53f6910)
-1.  [What is posframe](#org5cf1be8)
-2.  [Installation](#org5f830e9)
-3.  [Usage](#org40db1ee)
-1.  [Create a posframe](#org6f36699)
-2.  [Hide a posframe](#orgcd529fe)
-3.  [Hide all posframes](#org4e71a28)
-4.  [Delete a posframe](#org0f069f2)
-5.  [Delete all posframes](#org853d491)
+1.  [Posframe README](#org83cbaa0)
+1.  [What is posframe](#org3ce725d)
+2.  [Installation](#org545827a)
+3.  [Usage](#orgdac766b)
+1.  [Create a posframe](#orgea6aecd)
+2.  [Hide a posframe](#orga5310b9)
+3.  [Hide all posframes](#orgbf09855)
+4.  [Delete a posframe](#org68db811)
+5.  [Delete all posframes](#org12f2467)
 
 
-
+
 
 # Posframe README
 
 
-
+
 
 ## What is posframe
 
@@ -29,58 +31,77 @@ The main advantages are:
 1.  It is fast enough for daily usage :-)
 2.  It works well with CJK language.
 
-NOTE: For MacOS users, posframe need emacs (version >= 26.0.91)
+NOTE: For MacOS users, posframe need Emacs (version >= 26.0.91)
 
 ![img](./snapshots/posframe-1.png)
 
 
-
+
 
 ## Installation
 
 (require 'posframe)
 
 
-
+
 
 ## Usage
 
 
-
+
 
 ### Create a posframe
 
-(posframe-show " *my-posframe-buffer*"
-   :string "This is a test"
-   :position (point))
+1.  Simple way
+
+NOTE: buffers prefixed with space will be not showed in buffer-list.
+(posframe-show " *my-posframe-buffer*"
+   :string "This is a test"
+   :position (point))
+
+2.  Advanced way
+
+(defvar my-posframe-buffer " *my-posframe-buffer*")
+
+(with-current-buffer (get-buffer-create my-posframe-buffer)
+  (erase-buffer)
+  (insert "Hello world"))
+
+(posframe-show my-posframe-buffer
+   :position (point))
 
-Arguments documents:
+3.  Arguments
 
-C-h f posframe-show
+C-h f posframe-show
 
 
-
+
 
 ### Hide a posframe
 
 (posframe-hide " *my-posframe-buffer*")
 
 
-
+
 
 ### Hide all posframes
 
 M-x posframe-hide-all
 
 
-
+
 
 ### Delete a posframe
 
-(posframe-delete " *my-posframe-buffer*")
+1.  Delete posframe and its buffer
 
+(posframe-delete " *my-posframe-buffer*")
+2.  Only delete posframe's frame
 
-
+(posframe-delete-frame " *my-posframe-buffer*")
+
+
+
 
 ### Delete all posframes
 
@@ -89,7 +110,3 @@ Arguments documents:
 Note: this command will delete all posframe buffers,
 suggest not run this command if you are sharing a buffer
 between posframe and other packages.
-
-
-
-Converted from posframe.el by [el2org](https://github.com/tumashu/el2org) .
\ No newline at end of file
diff --git a/packages/posframe/posframe.el b/packages/posframe/posframe.el
index 9a7a73f..2c165d4 100644
--- a/packages/posframe/posframe.el
+++ b/packages/posframe/posframe.el
@@ -5,7 +5,7 @@
 ;; Author: Feng Shu 
 ;; Maintainer: Feng Shu 
 ;; URL: https://github.com/tumashu/posframe
-;; Version: 0.3.0
+;; Version: 0.4.2
 ;; Keywords: tooltip
 ;; Package-Requires: ((emacs "26"))
 
@@ -50,13 +50,28 @@
 
 ;; *** Create a posframe
 
+;;  Simple way
 ;; #+BEGIN_EXAMPLE
+;; ;; NOTE: buffers prefixed with space will be not showed in buffer-list.
 ;; (posframe-show " *my-posframe-buffer*"
 ;;:string "This is a test"
 ;;:position (point))
 ;; #+END_EXAMPLE
 
-;; Arguments documents:
+;;  Advanced way
+;; #+BEGIN_EXAMPLE
+;; (defvar my-posframe-buffer " *my-posframe-buffer*")
+
+;; (with-current-buffer (get-buffer-create my-posframe-buffer)
+;;   (erase-buffer)
+;;   (insert "Hello world"))
+
+;; (posframe-show my-posframe-buffer
+;;:position (point))
+;; #+END_EXAMPLE
+
+;;  Arguments
+
 ;; #+BEGIN_EXAMPLE
 ;; C-h f posframe-show
 ;; #+END_EXAMPLE
@@ -98,7 +113,7 @@
   :group 'lisp
   :prefix "posframe-")
 
-(defcustom posframe-mouse-banish t
+(defcustom posframe-mouse-banish (not (eq system-type 'darwin))
   "Mouse will be moved to (0 , 0) when it is non-nil."
   :group 'posframe
   :type 'boolean)
@@ -108,10 +123,17 @@
   :group 'posframe
   :type 'boolean)
 
+(defcustom posframe-default-initialize-function nil
+  "The default :initialize function of `posframe-show'.
+
+If :initialize argumen

[elpa] master 405b5a0 1/2: Remove coding: utf-8

2018-12-14 Thread Feng Shu
branch: master
commit 405b5a07aa2cb923f7657a98c7deaf601f5e09a5
Author: Feng Shu 
Commit: Feng Shu 

Remove coding: utf-8
---
 posframe.el | 4 
 1 file changed, 4 deletions(-)

diff --git a/posframe.el b/posframe.el
index 2c165d4..85f543d 100644
--- a/posframe.el
+++ b/posframe.el
@@ -877,8 +877,4 @@ docstring of `posframe-show'."
 
 (provide 'posframe)
 
-;; Local Variables:
-;; coding: utf-8
-;; End:
-
 ;;; posframe.el ends here



[elpa] master 7fef6fe 2/2: Merge commit '405b5a07aa2cb923f7657a98c7deaf601f5e09a5'

2018-12-14 Thread Feng Shu
branch: master
commit 7fef6fe12c109792deb6d8836bf9b254f5b88b4d
Merge: 769adaa 405b5a0
Author: Feng Shu 
Commit: Feng Shu 

Merge commit '405b5a07aa2cb923f7657a98c7deaf601f5e09a5'
---
 packages/posframe/posframe.el | 4 
 1 file changed, 4 deletions(-)

diff --git a/packages/posframe/posframe.el b/packages/posframe/posframe.el
index 2c165d4..85f543d 100644
--- a/packages/posframe/posframe.el
+++ b/packages/posframe/posframe.el
@@ -877,8 +877,4 @@ docstring of `posframe-show'."
 
 (provide 'posframe)
 
-;; Local Variables:
-;; coding: utf-8
-;; End:
-
 ;;; posframe.el ends here



[elpa] master 1f542c2: * nhexl-mode/nhexl-mode.el: Fix performance bug#33708

2018-12-14 Thread Stefan Monnier
branch: master
commit 1f542c248d671b5d7ba1c5f53a18c8838b0133db
Author: Stefan Monnier 
Commit: Stefan Monnier 

* nhexl-mode/nhexl-mode.el: Fix performance bug#33708

(nhexl--isearch-match-hex-bytes): Also search for the literal hex text.
Make sure we use unibyte strings.
(nhexl--isearch-search-fun): Re-order the different searches.
(nhexl--isearch-highlight-cleanup, nhexl--isearch-highlight-match):
Don't accidentally mark the buffer as modified.
---
 packages/nhexl-mode/nhexl-mode.el | 78 ++-
 1 file changed, 52 insertions(+), 26 deletions(-)

diff --git a/packages/nhexl-mode/nhexl-mode.el 
b/packages/nhexl-mode/nhexl-mode.el
index 89d9118..27dc342 100644
--- a/packages/nhexl-mode/nhexl-mode.el
+++ b/packages/nhexl-mode/nhexl-mode.el
@@ -4,7 +4,7 @@
 
 ;; Author: Stefan Monnier 
 ;; Keywords: data
-;; Version: 1.1
+;; Version: 1.2
 ;; Package-Requires: ((emacs "24.4") (cl-lib "0.5"))
 
 ;; This program is free software; you can redistribute it and/or modify
@@ -807,32 +807,58 @@ Return the corresponding nibble, if applicable."
   (push (string-to-number (substring string i (+ i 2)) 16)
 chars)
   (setq i (+ i 2)))
-(let* ((base (regexp-quote (apply #'string (nreverse chars
-   (newstr
-(if (>= i (length string))
-base
-  (cl-assert (= (1+ i) (length string)))
-  (let ((nibble (string-to-number (substring string i) 16)))
-;; FIXME: if one of the two bounds is a special char
-;; like `]` or `^' we can get into trouble!
-(format "%s[%c-%c]" base
-(* 16 nibble)
-(+ 15 (* 16 nibble)))
+(let* ((base (regexp-quote (apply #'unibyte-string (nreverse chars
+   (re
+(concat (if (>= i (length string))
+base
+  (cl-assert (= (1+ i) (length string)))
+  (let ((nibble (string-to-number (substring string i) 
16)))
+;; FIXME: if one of the two bounds is a special char
+;; like `]` or `^' we can get into trouble!
+(concat base
+(unibyte-string ?\[ (* 16 nibble) ?-
+   (+ 15 (* 16 nibble)) ?\]
+;; We also search for the literal hex string here, so the
+;; search stops as soon as one is found, otherwise we too
+;; easily fall into the trap of bug#33708 where at every
+;; cycle we first search unsuccessfully through the whole
+;; buffer with one kind of search before trying the
+;; other search.
+;; Don't bother regexp-quoting the string since we know
+;; it's only made of hex chars!
+"\\|" string)))
   (let ((case-fold-search nil))
 (funcall (if isearch-forward
  #'re-search-forward
#'re-search-backward)
- newstr bound noerror)
+ re bound noerror)
 
 (defun nhexl--isearch-search-fun (orig-fun)
   (let ((def-fun (funcall orig-fun)))
 (lambda (string bound noerror)
   (unless bound
 (setq bound (if isearch-forward (point-max) (point-min
+  ;; The order we used for the different searches is important:
+  ;; - First we do the hex-address search since it's always fast even in
+  ;;   very large buffers.
+  ;; - Then we do the hex-bytes search.
+  ;; - Only last we fallback to the def-fun: if the user wants to
+  ;;   do an hex-bytes search, the def-fun will likely fail but not
+  ;;   without first scanning the whole buffer which can take a while,
+  ;;   as in bug#33708.
   (let ((startpos (point))
-(def (funcall def-fun string bound noerror)))
-;; Don't search further than what `def-fun' found.
-(if def (setq bound (match-beginning 0)))
+def)
+;; Hex address search.
+(when (and nhexl-isearch-hex-addresses
+   (> (length string) 1)
+   (string-match-p "\\`[[:xdigit:]]+:?\\'" string))
+  ;; Could be a hexadecimal address.
+  (goto-char startpos)
+  (let ((newdef (nhexl--isearch-match-hex-address string bound 
noerror)))
+(when newdef
+  (setq def newdef)
+  (setq bound (match-beginning 0)
+;; Hex bytes search
 (when (and nhexl-isearch-hex-bytes
(> (length string) 1)
(string-match-p "\\`[[:xdigit:]]+\\'" string))
@@ -842,12 +868,10 @@ Return the corresponding nibble, if applicable."
 (when newdef
   (setq def newdef)
   (setq bound (match-beginning 0)
-(when (and nhex

[elpa] master 06f93ec: [el-search] Let el-search-query-replace add undo boundaries

2018-12-14 Thread Michael Heerdegen
branch: master
commit 06f93eccd5df0405001fba3dcfcba94af9f2cfe8
Author: Michael Heerdegen 
Commit: Michael Heerdegen 

[el-search] Let el-search-query-replace add undo boundaries

Also bump version to 1.8.3.

* packages/el-search/el-search.el
(el-search--search-and-replace-pattern): Add undo-boundaries before
and after each manual replacement so that it's possible to undo each
change individually afterwards.
---
 packages/el-search/NEWS |  6 ++
 packages/el-search/el-search.el | 11 ---
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/packages/el-search/NEWS b/packages/el-search/NEWS
index cf1b425..a27b322 100644
--- a/packages/el-search/NEWS
+++ b/packages/el-search/NEWS
@@ -1,6 +1,12 @@
 Some of the user visible news were:
 
 
+Version: 1.8.3
+
+  `el-search-query-replace' now adds undo boundaries for each manual
+  replacement so that afterwards `undo' undoes replacements
+  step-by-step similar to vanilla `query-replace'.
+
 Version: 1.8
 
   Several improvements in `el-search-query-replace':
diff --git a/packages/el-search/el-search.el b/packages/el-search/el-search.el
index 4a51f18..ee3b641 100644
--- a/packages/el-search/el-search.el
+++ b/packages/el-search/el-search.el
@@ -7,7 +7,7 @@
 ;; Created: 29 Jul 2015
 ;; Keywords: lisp
 ;; Compatibility: GNU Emacs 25
-;; Version: 1.8.2
+;; Version: 1.8.3
 ;; Package-Requires: ((emacs "25") (stream "2.2.4") (cl-print "1.0"))
 
 
@@ -3955,6 +3955,7 @@ Ediff match with replacement")
  (if (and replace-all
   (not stopped-for-comments))
  (funcall do-replace)
+   (undo-boundary)
(let* ((handle nil)
   (replace-or-restore
(lambda ()
@@ -3974,7 +3975,9 @@ Ediff match with replacement")
(funcall edit-replacement ediff-only)
(unless (string= old-to-insert 
to-insert)
  (if (not replaced-this)
- (funcall replace-or-restore)
+ (progn
+   (funcall replace-or-restore)
+   (undo-boundary))
(el-search--message-no-log
 "Already replaced this match - hit 
r r to update")
(sit-for 2
@@ -4024,7 +4027,9 @@ Replace all matches in all buffers"
(?e (funcall edit-and-update 
'ediff-only)
nil)
((or ?q ?\C-g ?\r) (signal 
'quit t)
-   (when handle (accept-change-group handle)
+   (when handle (accept-change-group handle
+   (when (and replaced-this (not replace-all))
+ (undo-boundary)))
  (unless (eobp)
(let* ((replacement-contains-another-match
(and replaced-this



[elpa] externals/ebdb 09018d9 5/7: Small manual tweaks and typo fixes

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit 09018d900fb4ecf9fe6d1f4b02408e5fe6e96924
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Small manual tweaks and typo fixes
---
 ebdb.info | 133 +++---
 ebdb.org  |  13 +++---
 ebdb.texi |  13 +++---
 3 files changed, 81 insertions(+), 78 deletions(-)

diff --git a/ebdb.info b/ebdb.info
index f79b37f..59cc362 100644
--- a/ebdb.info
+++ b/ebdb.info
@@ -1086,24 +1086,25 @@ keybindings apply.
 
 ‘C-k’
  With point on a record field, offer to delete that field.  With
- point on a record header, offer to delete the whole record.
- (‘ebdb-delete-field-or-record’)
+ point on a record header, offer to delete the whole record
+ (‘ebdb-delete-field-or-record’).
 
 ‘’
  Run an “action” on the field under point (‘ebdb-record-action’).
  If multiple actions are provided, you’ll be prompted to choose one.
  Not all fields provide actions.  ‘’ on a mail field will
- compose a message to that mail address
+ compose a message to that mail address.
 
 ‘m’
  Begin composing a message to the record under point (‘ebdb-mail’).
  With a prefix arg, prompt for the mail address to use; otherwise
  use the record’s primary address.
+
 ‘M’
  Begin composing a separate message to each marked record in the
- current {{{buf(EBDB)}} buffer, or all records in the buffer if none
- are marked.  In addition, prompt for a common subject header line
- to use for each message, as well as records to add to the “Cc” and
+ current *EBDB* buffer, or all records in the buffer if none are
+ marked.  In addition, prompt for a common subject header line to
+ use for each message, as well as records to add to the “Cc” and
  “Bcc” headers.  Then optionally prompt for a character, interpreted
  as the name of a register.  If that register contains text, insert
  the text as the body of each message.
@@ -1561,7 +1562,7 @@ for basic record and field types.
  possible to create a record of a different class by using ‘C’ in
  ebdb-mode.
 
- -- User Option: ebdb-default-record-class
+ -- User Option: ebdb-default-name-class
  The default class for complex names.  Simple names (used for
  organizations and nicknames) are always plain strings—this option
  only governs the class used for articulated names of individuals,
@@ -1632,11 +1633,11 @@ which returns a string representation of the field 
instance.  The
 simplest field types only need to provide these three methods.
 
The ‘ebdb-read’ and ‘ebdb-parse’ methods are static (class-level)
-methods.  Both take an optional ‘slots’ argument, which a plist of slot
-values that will eventually be fed to ‘make-instance’.  If values are
-already present in the plist, these methods should _not_ override them.
-In addition, ‘ebdb-read’ takes an optional ‘obj’ argument, which, if
-present, is an existing field instance that can be used to provide
+methods.  Both take an optional ‘slots’ argument, which is a plist of
+slot values that will eventually be fed to ‘make-instance’.  If values
+are already present in the plist, these methods should _not_ override
+them.  In addition, ‘ebdb-read’ takes an optional ‘obj’ argument, which,
+if present, is an existing field instance that can be used to provide
 default values for the new object.
 
  (cl-defmethod ebdb-read ((class (subclass ebdb-field-gender))
@@ -1645,7 +1646,7 @@ default values for the new object.
  (let ((gender (intern (completing-read
 "Gender: " '(female male other unknown none)
 nil t
-(when obj (symbol-name (slot-value obj 
:gender)))
+(when obj (symbol-name (slot-value obj 
'gender)))
(setq slots (plist-put slots :gender gender
(cl-call-next-method class slots obj))
 
@@ -2109,7 +2110,7 @@ Index
 * ; t:   Interactive Commands.
   (line  42)
 * ?: The Basics of ebdb-mode.
-  (line 114)
+  (line 115)
 * ^: Searching.   (line  55)
 * Article snarfing:  Snarfing.(line  36)
 * Article snarfing <1>:  Article snarfing.(line   6)
@@ -2170,14 +2171,14 @@ Index
   (line  12)
 * ebdb-cite-records: Citing Records.  (line  11)
 * ebdb-cite-records-ebdb:The Basics of ebdb-mode.
-  (line  88)
+  (line  89)
 * ebdb-clone-buffer: 

[elpa] externals/ebdb 61403ee 7/7: Protect against databases with no records, bump to 0.6.1

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit 61403eeebfe989a5f61822b6b4689cb32ff7e6d9
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Protect against databases with no records, bump to 0.6.1

* ebdb-com.el (ebdb-display-records): New databases will contain no
  records, don't assume there are any.
* ebdb.el: Bump to 0.6.1
---
 ebdb-com.el | 3 ++-
 ebdb.el | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 2a9c95a..30c86ac 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -846,7 +846,8 @@ name based on the current major mode."
;; When appending, we want point to end up on the first of the
;; appended records.  Save the uuid, and later point a marker
;; at it.  Mostly useful for `follow-related'.
-   (target-record-uuid (ebdb-record-uuid (car records)))
+   (target-record-uuid (when records
+ (ebdb-record-uuid (car records
target-record-marker)
 
 (with-current-buffer (get-buffer-create target-buffer)
diff --git a/ebdb.el b/ebdb.el
index ca440ad..ee39ae0 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 2016-2018  Free Software Foundation, Inc.
 
-;; Version: 0.6
+;; Version: 0.6.1
 ;; Package-Requires: ((emacs "25.1") (cl-lib "0.5") (seq "2.15"))
 
 ;; Maintainer: Eric Abrahamsen 



[elpa] externals/ebdb f07cadf 1/7: Exclude full formatter from `ebdb-available-ebdb-formatters'

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit f07cadf1c2028b2aab967bdb31a24ad06f1fe3bf
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Exclude full formatter from `ebdb-available-ebdb-formatters'

* ebdb-com.el (ebdb-available-ebdb-formatters): The full formatter is
  selected with its own function, the toggle/loop shouldn't use it by
  default.
---
 ebdb-com.el | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/ebdb-com.el b/ebdb-com.el
index 4468564..bf98178 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -503,11 +503,15 @@ and 'role, and the special shortcuts 'mail-primary,
   "Formatter used for displaying all values of a record.
 This formatter should not be changed.")
 
-(defun ebdb-available-ebdb-formatters ()
+(defun ebdb-available-ebdb-formatters (&optional full-okay)
   "A list of formatters available in the *EBDB* buffer.
-This list is also used for toggling layouts."
+This list is also used for toggling layouts.  Unless FULL-OKAY is
+non-nil, do not offer the value of `ebdb-full-formatter' as a
+choice: that formatter should be selected explicitly."
   (seq-filter
-   (lambda (f) (object-of-class-p f 'ebdb-formatter-ebdb))
+   (lambda (f) (and (object-of-class-p f 'ebdb-formatter-ebdb)
+   (or full-okay
+   (null (equal f ebdb-full-formatter)
ebdb-formatter-tracker))
 
 (defsubst ebdb-formatter-prefix ()



[elpa] externals/ebdb f7281f8 4/7: Don't exit ebdb-mua-in-ebdb-buffer during minibuffer input

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit f7281f8e10bb902d13039d099bf44c22f2d5ca84
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Don't exit ebdb-mua-in-ebdb-buffer during minibuffer input

* ebdb-mua.el (ebdb-mua-in-ebdb-buffer): Probably I just should have
  fooled with quit-restore rather than doing it this way.
---
 ebdb-mua.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/ebdb-mua.el b/ebdb-mua.el
index f12f5aa..2118414 100644
--- a/ebdb-mua.el
+++ b/ebdb-mua.el
@@ -1154,10 +1154,12 @@ where it was in the MUA, rather than quitting the EBDB 
buffer."
 (set-transient-map
  key-m
  (lambda ()
-   ;; Keep the transient map active until the user hits "q".
-   (null
-   (equal (this-command-keys-vector)
-  [?q]))
+   ;; Keep the transient map active until the user hits "q", but
+   ;; not during minibuffer input.
+   (or (minibufferp)
+  (null
+   (equal (this-command-keys-vector)
+   [?q])))
 
 ;;;###autoload
 (defun ebdb-mua-toggle-records-format ()



[elpa] externals/ebdb updated (4444031 -> 61403ee)

2018-12-14 Thread Eric Abrahamsen
girzel pushed a change to branch externals/ebdb.

  from  031   * ebdb.el (ebdb-add-to-list): Move macro before first use
   new  f07cadf   Exclude full formatter from 
`ebdb-available-ebdb-formatters'
   new  5726c97   Add a ebdb-fmt-field implementation for images
   new  a40874b   Use ebdb-foo-in-list for the fast lookups check
   new  f7281f8   Don't exit ebdb-mua-in-ebdb-buffer during minibuffer input
   new  09018d9   Small manual tweaks and typo fixes
   new  5242e6f   Forgot to reverse the list of collected fields in 
formatting
   new  61403ee   Protect against databases with no records, bump to 0.6.1


Summary of changes:
 ebdb-com.el|  28 ++--
 ebdb-format.el |   2 +-
 ebdb-mua.el|  10 +++--
 ebdb-org.el|   6 ---
 ebdb.el|  13 +++---
 ebdb.info  | 133 +
 ebdb.org   |  13 +++---
 ebdb.texi  |  13 +++---
 8 files changed, 119 insertions(+), 99 deletions(-)



[elpa] externals/ebdb a40874b 3/7: Use ebdb-foo-in-list for the fast lookups check

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit a40874ba6ca8194bbe67c408d98ba37cab9bccd3
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Use ebdb-foo-in-list for the fast lookups check

* ebdb.el (ebdb-search): We want to be able to handle subclasses and
  all that, as per usual.
* ebdb-org.el: This chunk is no longer necessary, as
  `ebdb-org-field-tags' subclasses `ebdb-field-tags'.
---
 ebdb-org.el |  6 --
 ebdb.el | 11 ++-
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/ebdb-org.el b/ebdb-org.el
index 162525f..5f6c3f6 100644
--- a/ebdb-org.el
+++ b/ebdb-org.el
@@ -122,12 +122,6 @@ italicized, in all other cases it is left unchanged."
   nil
   :human-readable "org tags")
 
-;; Use fast lookups on org-tags, too.
-(cl-pushnew (cons 'ebdb-org-field-tags
- (lambda (str rec)
-   (ebdb-record-search rec 'ebdb-org-field-tags str)))
-   ebdb-hash-extra-predicates)
-
 (cl-defmethod ebdb-read ((field (subclass ebdb-org-field-tags)) &optional 
slots obj)
   (let* ((crm-separator (cadr (assq 'ebdb-field-tags ebdb-separator-alist)))
 (val (completing-read-multiple
diff --git a/ebdb.el b/ebdb.el
index a46061c..ca440ad 100644
--- a/ebdb.el
+++ b/ebdb.el
@@ -5260,12 +5260,13 @@ With optional argument INVERT, invert the search 
results."
   (pcase-dolist (`(,key ,crit) clauses)
(or
 ;; Either we get some records out the fast lookup...
-(and (or (memq key (list 'ebdb-field-name
- 'ebdb-field-mail
- 'ebdb-field-tags))
- (assoc key ebdb-hash-extra-predicates))
- (stringp crit)
+(and (stringp crit)
  (string-prefix-p "^" crit)
+ (or (ebdb-foo-in-list-p
+  key (list 'ebdb-field-name
+'ebdb-field-mail
+'ebdb-field-tags))
+ (assoc key ebdb-hash-extra-predicates))
  (setq completed-strings
(all-completions (downcase (substring crit 1))
 ebdb-hashtable)



[elpa] externals/ebdb 5242e6f 6/7: Forgot to reverse the list of collected fields in formatting

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit 5242e6feed371273f35241a40d60653963af3895
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Forgot to reverse the list of collected fields in formatting

* ebdb-format.el (ebdb-prompt-for-formatter): They've been collected
  backwards.
---
 ebdb-format.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ebdb-format.el b/ebdb-format.el
index e1e8e21..48348bc 100644
--- a/ebdb-format.el
+++ b/ebdb-format.el
@@ -331,7 +331,7 @@ grouped by field class."
   ((ebdb-foo-in-list-p f collapse) 'collapse)
   (t 'normal)))
outlist)))
-  outlist)))
+  (nreverse outlist
 
 ;;; Basic export routines
 



[elpa] externals/ebdb 5726c97 2/7: Add a ebdb-fmt-field implementation for images

2018-12-14 Thread Eric Abrahamsen
branch: externals/ebdb
commit 5726c97426ddef356f099e70ccdb0a2df8f9d3ab
Author: Eric Abrahamsen 
Commit: Eric Abrahamsen 

Add a ebdb-fmt-field implementation for images

* ebdb-com.el (ebdb-fmt-field): This used to be hard-coded.
---
 ebdb-com.el | 15 +++
 1 file changed, 15 insertions(+)

diff --git a/ebdb-com.el b/ebdb-com.el
index bf98178..2a9c95a 100644
--- a/ebdb-com.el
+++ b/ebdb-com.el
@@ -642,6 +642,21 @@ Print the first line, add an ellipsis, and add a tooltip."
  (propertize value 'face 'ebdb-role-defunct)
value
 
+(cl-defmethod ebdb-fmt-field ((_fmt ebdb-formatter-ebdb)
+ (field ebdb-field-image)
+ _style
+ (record ebdb-record))
+  (if (display-images-p)
+  (progn
+   (require 'image)
+   (propertize
+" "
+;; Cribbed from `insert-image'.
+(list 'display (ebdb-field-image-get field record)
+   'rear-nonsticky '(display)
+   'keymap image-map)))
+""))
+
 (defsubst ebdb-indent-string (string column)
   "Indent nonempty lines in STRING to COLUMN (except first line).
 This happens in addition to any pre-defined indentation of STRING."



[elpa] externals/system-packages 5512322 021/117: Adds support for dnf

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 55123228f45e0c334accc933f784b68ba5080411
Author: Alex Branham 
Commit: Alex Branham 

Adds support for dnf
---
 system-packages.el | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/system-packages.el b/system-packages.el
index c10bba6..c93d708 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -78,6 +78,16 @@
   (remove-orphaned . "apt-get autoremove")
   (list-installed-packages . nil)
   (list-installed-packages-all . nil)))
+;; Fedora
+(dnf .
+ ((default-sudo . t)
+  (install . "dnf install")
+  (search . "dnf search")
+  (uninstall . "dnf remove")
+  (update . ("dnf upgrade"))
+  (remove-orphaned . "dnf autoremove")
+  (list-installed-packages . "dnf list --installed")
+  (list-installed-packages-all . nil)))
   (list-installed-packages-all . nil)))
 ;; Mac
 (brew .



[elpa] externals/system-packages 38f68ed 019/117: Merge pull request #2 from juergenhoetzel/master

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 38f68eda3c2633a58fcdc4225c0f6db58ec6052d
Merge: 1c1faa4 d2884f5
Author: Alex Branham 
Commit: GitHub 

Merge pull request #2 from juergenhoetzel/master

Fix Arch Linux package list (explicit) commands
---
 system-packages.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 20b1b15..977618b 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -55,8 +55,8 @@
  (uninstall . "pacaur -Rs")
  (update . "pacaur -Syu")
  (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
- (list-installed-packages . "pacman -Q")
- (list-installed-packages-all . "pacman -Qe")))
+ (list-installed-packages . "pacman -Qe")
+ (list-installed-packages-all . "pacman -Q")))
 (pacman .
 ((default-sudo . t)
  (install . "pacman -S")
@@ -64,7 +64,7 @@
  (uninstall . "pacman -Rs")
  (update . "pacman -Syu")
  (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
- (list-installed-packages . "pacman -Q")
+ (list-installed-packages . "pacman -Qe")
  (list-installed-packages-all . "pacman -Q")))
 (apt .
  ((default-sudo . t)
@@ -123,19 +123,19 @@
 (defun system-packages-install (pack)
   "Installs system packages using the package manager named in
 system-packages-packagemanager."
-  (interactive "sWhat package to install?")
+  (interactive "sWhat package to install: ")
   (system-packages--run-command 'install pack))
 
 (defun system-packages-search (pack)
   "Search for system packages using the package manager named in
 system-packages-packagemanager."
-  (interactive "sSearch string?")
+  (interactive "sSearch string: ")
   (system-packages--run-command 'search pack))
 
 (defun system-packages-uninstall (pack)
   "Uninstalls installed system packages using the package manager named in
 system-packages-packagemanager."
-  (interactive "sWhat package to uninstall?")
+  (interactive "sWhat package to uninstall: ")
   (system-packages--run-command 'uninstall pack))
 
 



[elpa] externals/system-packages 47cef47 023/117: Adds support for aptitude

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 47cef47c5afb90ee6c56216bc64b99f7c3649be1
Author: Alex Branham 
Commit: Alex Branham 

Adds support for aptitude
---
 system-packages.el | 9 +
 1 file changed, 9 insertions(+)

diff --git a/system-packages.el b/system-packages.el
index eac40e4..eb1c0aa 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -69,6 +69,15 @@
  (list-installed-packages . "pacman -Qe")
  (list-installed-packages-all . "pacman -Q")))
 ;; Debian (and Ubuntu) based systems
+(aptitude .
+  ((default-sudo . t)
+   (install . "aptitude install")
+   (search . "aptitude search")
+   (uninstall . "aptitude remove")
+   (update . ("aptitude update"))
+   (remove-orphaned . nil) ; aptitude does this automatically
+   (list-installed-packages . "aptitude search '~i!~M'")
+   (list-installed-packages-all . nil)))
 (apt .
  ((default-sudo . t)
   (install . "apt-get install")



[elpa] externals/system-packages 34f898e 007/117: A wild functional package appears!

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 34f898ea6b3a606909ef8bc546d5ce26cb3cd2a1
Author: Alex Branham 
Commit: Alex Branham 

A wild functional package appears!
---
 system-packages.el | 52 ++--
 1 file changed, 30 insertions(+), 22 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 4cd8d88..3d2b1d6 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -55,6 +55,10 @@
   "If non-nil, system-packages will use sudo for appropriate
   commands")
 
+
+;; functions on named packages
+
+
 (defun system-packages-install (pack)
   "Installs system packages"
   (interactive "sWhat package to install?")
@@ -64,38 +68,42 @@
  (if (equal system-packages-packagemanager "brew") "brew 
install")
 (if (equal system-packages-usesudo t)
 (async-shell-command (mapconcat 'identity (list "sudo" command pack) " 
"))
-  (async-shell-command (mapconcat 'identity '(command pack) " ")
+  (async-shell-command (mapconcat 'identity (list command pack) " ")
 
-(defun system-packages-search ()
+(defun system-packages-search (pack)
   "Search for system packages"
   (interactive "sSearch string?")
   (let ((command
- (cond ((equal system-packages-packagemanager "pacman") "pacman -Ss")
-   ((equal system-packages-packagemanager "apt") "apt-cache 
search")
-   ((equal system-packages-packagemanager "brew") "brew search"
-  (async-shell-command command)))
+ (if (equal system-packages-packagemanager "pacman") "pacman -Ss"
+   (if (equal system-packages-packagemanager "apt") "apt-cache search"
+ (if (equal system-packages-packagemanager "brew") "brew 
search")
+(async-shell-command (mapconcat 'identity (list command pack) " "
 
-(defun system-packages-uninstall ()
+(defun system-packages-uninstall (pack)
   "Uninstalls installed system packages"
   (interactive "sWhat package to uninstall?")
   (let ((command
- (cond ((equal system-packages-packagemanager "pacman") "pacman -Rs")
-   ((equal system-packages-packagemanager "apt") "apt-get remove")
-   ((equal system-packages-packagemanager "brew") "brew 
uninstall"
+ (if (equal system-packages-packagemanager "pacman") "pacman -Rs"
+   (if (equal system-packages-packagemanager "apt") "apt-get remove"
+ (if (equal system-packages-packagemanager "brew") "brew 
uninstall")
 (if (equal system-packages-usesudo t)
-(async-shell-command (concat "sudo " command))
-  (async-shell-command command
+(async-shell-command (mapconcat 'identity (list "sudo" command pack) " 
"))
+  (async-shell-command (mapconcat 'identity (list command pack) " ")
+
+
+;; functions that don't take a named package
+
 
 (defun system-packages-update ()
   "Updates installed system packages"
   (interactive)
   (let ((command
- (cond ((equal system-packages-packagemanager "pacman") "pacman -Syu")
-   ((equal system-packages-packagemanager "apt") "apt-get update 
&& sudo apt-get upgrade")
-   ((equal system-packages-packagemanager "brew") "brew update && 
brew upgrade"
+ (if (equal system-packages-packagemanager "pacman") "pacman -Syu"
+   (if (equal system-packages-packagemanager "apt") "apt-get update && 
sudo apt-get upgrade"
+ (if (equal system-packages-packagemanager "brew") "brew update && 
brew upgrade")
 (if (equal system-packages-usesudo t)
-(async-shell-command (concat "sudo " command))
-  (async-shell-command command
+(async-shell-command (mapconcat 'identity (list "sudo" command) " "))
+  (async-shell-command (mapconcat 'identity (list command) " ")
 
 (defun system-packages-remove-orphaned ()
   "This function removes orphaned packages i.e. unused packages."
@@ -103,10 +111,10 @@
   (if (equal system-packages-packagemanager "brew")
   (error "Not supported on homebrew"))
   (let ((command
- (cond ((equal system-packages-packagemanager "pacman") "pacman -Rns 
$(pacman -Qtdq)")
-   ((equal system-packages-packagemanager "apt") "apt-get 
autoremove"))
+ (if (equal system-packages-packagemanager "pacman") "pacman -Rns 
$(pacman -Qtdq)"
+   (if (equal system-packages-packagemanager "apt") "apt-get 
autoremove"
 (if (equal system-packages-usesudo t)
-(async-shell-command (concat "sudo " command))
-  (async-shell-command command))
-  
+(async-shell-command (mapconcat 'identity (list "sudo" command) " "))
+  (async-shell-command (mapconcat 'identity (list command) " ")
+   
 (provide 'system-packa

[elpa] branch externals/system-packages created (now ce23c0e)

2018-12-14 Thread Stefan Monnier
monnier pushed a change to branch externals/system-packages.

at  ce23c0e   Add documentation about changing package manager and sudo

This branch includes the following new commits:

   new  bace616   Initial commit
   new  bccbab3   Initial commit
   new  2737c65   Modifications
   new  7553ef9   More work...
   new  7c17a8b   Adds function to remove orphaned packages
   new  4e7e9e2   Working install command
   new  34f898e   A wild functional package appears!
   new  6d0ebd5   All working, working on listing installed packages
   new  749c053   Finishes list installed packages function
   new  2f0df07   Adds support for pacaur
   new  a6e053e   Fix parens
   new  fd49fc8   Fixes list function
   new  71af8a5   Adds some documentation
   new  0534179   Adds README
   new  a6dcd04   Refactor the package manager specific commands into a 
defconst
   new  1c1faa4   Merge pull request #1 from jiegec/master
   new  eef3e8e   Fix Arch Linux package list (explicit) commands
   new  d2884f5   Use idiomatic prompts in interactive commands
   new  38f68ed   Merge pull request #2 from juergenhoetzel/master
   new  360c427   Adds comments to separate package managers
   new  5512322   Adds support for dnf
   new  07d909e   Adds support for yum
   new  47cef47   Adds support for aptitude
   new  b05fc13   Add package footer for packaging convention
   new  17ffd29   Use cl-lib instead of cl.el
   new  07c4faa   Use defcustom for customizable variable
   new  da5835a   Merge pull request #9 from syohex/fix-package
   new  a39b1f0   Moves brew further up in list
   new  942c9e7   On MELPA
   new  19ab3e9   Adds autoload magic comments
   new  6997440   Adds list-dependencies-of command
   new  24eb0b9   Adds several functions
   new  a831a7e   Fix function names
   new  b394c04   Adds support for openSUSE zypper and Gentoo emerge
   new  47e4119   Fix docstring
   new  5b3f7f5   Whether to use sudo or not should be defcustom not defvar
   new  ebfb6f9   Fix typo
   new  5124f57   add lexical-binding t
   new  170f07c   Update README
   new  ae993f9   Prefer apt to aptitude
   new  ccc2a6b   Add support for xbps, used by void linux
   new  4efd204   Use dedicated buffer
   new  15ba684   Add Macports
   new  3f9b67b   Fix macports install and update
   new  1ec26d1   Add macports
   new  874ab8f   Add directory local variables
   new  1acd87a   Add an optional ARGS for package manager options & 
cleanup file
   new  5058542   Adds :group to defcustom
   new  ea7fa7b   Add an option to bypass user confirmation of package 
manager action
   new  bc30966   Update readme
   new  d89ee30   Mention macports in readme
   new  e3493bb   Make install interactive again
   new  3e41c62   README: correct ordering of package managers
   new  2bf16c6   README: mention that xbps is supported
   new  149c253   Fix typo
   new  e821fa2   Drop support for pacaur
   new  c0354b2   README: add docs for how to add nonsupported package 
manager
   new  5010fb4   Fix spacing in some variable names
   new  feaf28c   Remove unneeded version line
   new  f5576f3   Update copyright
   new  50defa4   Pass --nosave to pacman on package removal
   new  78fd4c0   Initial support for nix
   new  e882ac1   `system-packages-packagemanager' to 
`system-packages-package-manager'
   new  936bb1a   `system-packages-usesudo' to `system-packages-use-sudo'
   new  2e9c031   Setup travis to error on byte compiler warnings
   new  ce34019   Update travis to use latest Emacs release
   new  9ef4751   Fix travis
   new  c4c7a96   Travis...
   new  bd51c53   travis: spit out Emacs version
   new  466785b   Defcustom should specify type
   new  ba902ce   Mention helm-system-packages in commentary and README
   new  5cc9ce7   Change brew upgrade --all to brew upgrade
   new  e1a6811   Fix aptitude upgrade command
   new  26feaab   Include bug reference info in .dir-locals
   new  450cbbb   README: fix bug #22
   new  eead7d6   Prefer apt-get/cache to apt
   new  557b1eb   Support listing installed packages in apt
   new  ec3ca7a   Fix brew list
   new  e4551fc   Add initial support for guix
   new  2046209   Make system-packages-supported-package-managers a defvar
   new  4b774b9   Require cl-lib at compile time
   new  ed5d9cc   Improve system-packages-package-manager :type defcustom
   new  f85a7bf   Remove unneeded :group statements
   new  fff67d1   README: add guix
   new  abddd99   Expose function to return command to run as a string
   new  c4437be   Add some very simple ERT tests
   new  04e2f7f   Make travis run tests
   new  0b04066   Test that we error when we don't know commands
   new  1470962   

[elpa] externals/system-packages a6dcd04 015/117: Refactor the package manager specific commands into a defconst

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit a6dcd04ae2fdd19f7130df4b7d77d66f996b03c6
Author: Jiege Chen 
Commit: Jiege Chen 

Refactor the package manager specific commands into a defconst
---
 system-packages.el | 125 ++---
 1 file changed, 71 insertions(+), 54 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index dbcadad..20b1b15 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -38,29 +38,84 @@
 
 ;;; Code:
 
+(eval-when-compile
+  (require 'cl))
+
 (defgroup system-packages nil
   "Manages system packages"
   :tag "System Packages"
   :prefix "system-packages"
   :group 'packages)
 
+(defconst system-packages-supported-package-managers
+  '((pacaur .
+((default-sudo . nil)
+ (install . "pacaur -S")
+ (search . "pacaur -Ss")
+ (uninstall . "pacaur -Rs")
+ (update . "pacaur -Syu")
+ (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
+ (list-installed-packages . "pacman -Q")
+ (list-installed-packages-all . "pacman -Qe")))
+(pacman .
+((default-sudo . t)
+ (install . "pacman -S")
+ (search . "pacman -Ss")
+ (uninstall . "pacman -Rs")
+ (update . "pacman -Syu")
+ (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
+ (list-installed-packages . "pacman -Q")
+ (list-installed-packages-all . "pacman -Q")))
+(apt .
+ ((default-sudo . t)
+  (install . "apt-get install")
+  (search . "apt-cache search")
+  (uninstall . "apt-get remove")
+  (update . ("apt-get update" "apt-get upgrade"))
+  (remove-orphaned . "apt-get autoremove")
+  (list-installed-packages . nil)
+  (list-installed-packages-all . nil)))
+(brew .
+  ((default-sudo . nil)
+   (install . "brew install")
+   (search . "brew search")
+   (uninstall . "brew uninstall")
+   (update . ("brew update" "brew upgrade --all"))
+   (remove-orphaned . nil)
+   (list-installed-packages . "brew list")
+   (list-installed-packages-all . nil)
+
 (defvar system-packages-packagemanager
-  (if (executable-find "pacaur") "pacaur"
-(if (executable-find "pacman") "pacman"
-  (if (executable-find "apt") "apt"
-(if (executable-find "brew") "brew"
+  (cl-loop for (name . prop) in system-packages-supported-package-managers
+   for path = (executable-find (symbol-name name))
+   when path
+   return name)
   "String containing the package manager to use. Currently
 system-packages supports pacman, pacaur, apt, and
 homebrew. Tries to be smart about selecting the default.")
 
 (defvar system-packages-usesudo
-  (if (equal system-packages-packagemanager "pacman") t
-(if (equal system-packages-packagemanager "apt") t
-  (if (equal system-packages-packagemanager "brew") nil
-(if (equal system-packages-packagemanager "pacaur") nil
+  (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager
+
system-packages-supported-package-managers
   "If non-nil, system-packages will use sudo for appropriate
   commands. Tries to be smart for selecting the default.")
 
+(defun system-packages--run-command (action &optional pack)
+  "ACTION can be `default-sudo', `install', `search',
+`uninstall' etc. Run the command according to
+`system-packages-supported-package-managers' and ACTION."
+  (let ((command
+ (cdr (assoc action (cdr (assoc system-packages-packagemanager
+
system-packages-supported-package-managers))
+(unless command
+  (error (format "%S not supported in %S" action 
system-packages-packagemanager)))
+(unless (listp command)
+  (setq command (list command)))
+(when system-packages-usesudo
+  (setq command (mapcar (lambda (part) (concat "sudo " part)) command)))
+(setq command (mapconcat 'identity command " && "))
+(async-shell-command (mapconcat 'identity (list command pack) " "
+
 
 ;; functions on named packages
 
@@ -69,38 +124,19 @@
   "Installs system packages using the package manager named in
 system-packages-packagemanager."
   (interactive "sWhat package to install?")
-  (let ((command
- (if (equal system-packages-packagemanager "pacaur") "pacaur -S"
-   (if (equal system-packages-packagemanager "pacman") "pacman -S"
- (if (equal system-packages-packagemanager "apt") "apt-get install"
-   (if (equal system-packages-packagemanager "brew") "brew 
install"))
-(if (equal system-packages-usesudo t)
-(async-shell-command (mapconcat 'identity (list "sudo" command pack) " 
"))
-  (async-s

[elpa] externals/system-packages 4e7e9e2 006/117: Working install command

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 4e7e9e2756abcba4c913830faff1fe1f88304401
Author: Alex Branham 
Commit: Alex Branham 

Working install command
---
 system-packages.el | 64 --
 1 file changed, 48 insertions(+), 16 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 6946067..4cd8d88 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -1,10 +1,49 @@
-  ;;; system-packages.el --- functions to manage system packages
+;;; system-packages.el --- functions to manage system packages
 
-;; Copyright
+;; Copyright (C) 2016 J. Alexander Branham
 
-;; Author: J. Alexander Branham
+;; Author: J. Alexander Branham 
+;; Maintainer: J. Alexander Branham 
+;; URL: https://github.com/jabranham/system-packages
 ;; Version: 0.1
 
+;; This file is not part of GNU Emacs.
+
+;;; License:
+;;
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+;;
+;; This program is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+;;
+;; You should have received a copy of the GNU General Public License
+;; along with this program.  If not, see
+;; 
+
+;;; Commentary:
+
+;; This is a package to manage installed system packages. Useful
+;; functions include installing packages, removing packages, listing
+;; installed packages, and others.
+
+;; Usage:
+
+;; (require 'system-packages)
+;;
+
+;;; Code:
+
+(defgroup system-packages nil
+  "Manages system packages"
+  :tag "System Packages"
+  :prefix "system-packages"
+  :group 'packages)
+
 (defvar system-packages-packagemanager
   (if (executable-find "pacman") "pacman"
 (if (executable-find "apt") "apt"
@@ -16,24 +55,16 @@
   "If non-nil, system-packages will use sudo for appropriate
   commands")
 
-
 (defun system-packages-install (pack)
   "Installs system packages"
   (interactive "sWhat package to install?")
   (let ((command
- (cond ((equal system-packages-packagemanager "pacman") "pacman -S")
-   ((equal system-packages-packagemanager "apt") "apt-get install")
-   ((equal system-packages-packagemanager "brew") "brew 
install"
+ (if (equal system-packages-packagemanager "pacman") "pacman -S"
+   (if (equal system-packages-packagemanager "apt") "apt-get install"
+ (if (equal system-packages-packagemanager "brew") "brew 
install")
 (if (equal system-packages-usesudo t)
-(async-shell-command
- (mapconcat 'identity
-'("sudo" command pack)
-" "))
-  (async-shell-command
-   (mapconcat 'identity
-  '(command pack)
-  " ")
-
+(async-shell-command (mapconcat 'identity (list "sudo" command pack) " 
"))
+  (async-shell-command (mapconcat 'identity '(command pack) " ")
 
 (defun system-packages-search ()
   "Search for system packages"
@@ -78,3 +109,4 @@
 (async-shell-command (concat "sudo " command))
   (async-shell-command command))
   
+(provide 'system-packages)



[elpa] externals/system-packages fd49fc8 012/117: Fixes list function

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit fd49fc8923b6799dad27f487ea4baa284047331f
Author: Alex Branham 
Commit: Alex Branham 

Fixes list function
---
 system-packages.el | 12 +---
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 4f0d629..9d9d1f8 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -122,8 +122,8 @@
   (error "Not supported on homebrew"))
   (let ((command
  (if (equal system-packages-packagemanager "pacaur") "pacman -Rns 
$(pacman -Qtdq)"
- (if (equal system-packages-packagemanager "pacman") "pacman -Rns 
$(pacman -Qtdq)"
-   (if (equal system-packages-packagemanager "apt") "apt-get 
autoremove")
+   (if (equal system-packages-packagemanager "pacman") "pacman -Rns 
$(pacman -Qtdq)"
+ (if (equal system-packages-packagemanager "apt") "apt-get 
autoremove")
 (if (equal system-packages-usesudo t)
 (async-shell-command (mapconcat 'identity (list "sudo" command) " "))
   (async-shell-command (mapconcat 'identity (list command) " ")
@@ -135,11 +135,9 @@ list all installed packages."
   (if (equal system-packages-packagemanager "apt")
   (error "Not supported on apt systems"))
   (let ((command
- (if (and arg (or (equal system-packages-packagemanager "pacaur")
-  (equal system-packages-packagemanager "pacman"))) 
"pacman -Q"
-   (if (equal (or (equal system-packages-packagemanager "pacaur")
-  (equal system-packages-packagemanager "pacman")) 
"pacman -Qe"
+ (if (and arg (or (equal system-packages-packagemanager "pacaur") 
(equal system-packages-packagemanager "pacman"))) "pacman -Q"
+   (if (or (equal system-packages-packagemanager "pacaur") (equal 
system-packages-packagemanager "pacman")) "pacman -Qe"
  (if (equal system-packages-packagemanager "brew") "brew list")
- (async-shell-command command
+(async-shell-command command)))

 (provide 'system-packages)



[elpa] externals/system-packages eef3e8e 017/117: Fix Arch Linux package list (explicit) commands

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit eef3e8eb200a792eb7ed12f9f1b9536d2fc53ed4
Author: Juergen Hoetzel 
Commit: Juergen Hoetzel 

Fix Arch Linux package list (explicit) commands
---
 system-packages.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 20b1b15..eb80497 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -55,8 +55,8 @@
  (uninstall . "pacaur -Rs")
  (update . "pacaur -Syu")
  (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
- (list-installed-packages . "pacman -Q")
- (list-installed-packages-all . "pacman -Qe")))
+ (list-installed-packages . "pacman -Qe")
+ (list-installed-packages-all . "pacman -Q")))
 (pacman .
 ((default-sudo . t)
  (install . "pacman -S")
@@ -64,7 +64,7 @@
  (uninstall . "pacman -Rs")
  (update . "pacman -Syu")
  (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
- (list-installed-packages . "pacman -Q")
+ (list-installed-packages . "pacman -Qe")
  (list-installed-packages-all . "pacman -Q")))
 (apt .
  ((default-sudo . t)



[elpa] externals/system-packages d2884f5 018/117: Use idiomatic prompts in interactive commands

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit d2884f5e3f9f37f6c9a7d148d2c0f2ffe274b264
Author: Juergen Hoetzel 
Commit: Juergen Hoetzel 

Use idiomatic prompts in interactive commands
---
 system-packages.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index eb80497..977618b 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -123,19 +123,19 @@
 (defun system-packages-install (pack)
   "Installs system packages using the package manager named in
 system-packages-packagemanager."
-  (interactive "sWhat package to install?")
+  (interactive "sWhat package to install: ")
   (system-packages--run-command 'install pack))
 
 (defun system-packages-search (pack)
   "Search for system packages using the package manager named in
 system-packages-packagemanager."
-  (interactive "sSearch string?")
+  (interactive "sSearch string: ")
   (system-packages--run-command 'search pack))
 
 (defun system-packages-uninstall (pack)
   "Uninstalls installed system packages using the package manager named in
 system-packages-packagemanager."
-  (interactive "sWhat package to uninstall?")
+  (interactive "sWhat package to uninstall: ")
   (system-packages--run-command 'uninstall pack))
 
 



[elpa] externals/system-packages 749c053 009/117: Finishes list installed packages function

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 749c053b756d8f7a10d2ca7da669c8819010ae7e
Author: Alex Branham 
Commit: Alex Branham 

Finishes list installed packages function
---
 system-packages.el | 20 +++-
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 2e16ba3..797975c 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -120,14 +120,16 @@
 (async-shell-command (mapconcat 'identity (list "sudo" command) " "))
   (async-shell-command (mapconcat 'identity (list command) " ")
 
-;; (defun system-packages-list-installed-packages ()
-;;   "List explicitly installed packages. With the prefix argument,
-;; list all installed packages."
-;;   (interactive)
-;;   (let ((command
-;;  (if (equal system-packages-packagemanager "pacman") "pacman -"
-;;(if (equal system-packages-packagemanager "apt") "apt-cache 
search"
-;;  (if (equal system-packages-packagemanager "brew") "brew 
search")
-;; (async-shell-command (mapconcat 'identity (list command pack) " "
+(defun system-packages-list-installed-packages (arg)
+  "List explicitly installed packages. With \\[universal-argument],
+list all installed packages."
+  (interactive "P")
+  (if (equal system-packages-packagemanager "apt")
+  (error "Not supported on apt systems"))
+  (let ((command
+ (if (and arg (equal system-packages-packagemanager "pacman")) "pacman 
-Q"
+   (if (equal system-packages-packagemanager "pacman") "pacman -Qe"
+ (if (equal system-packages-packagemanager "brew") "brew list")
+ (async-shell-command command)))

 (provide 'system-packages)



[elpa] externals/system-packages 6d0ebd5 008/117: All working, working on listing installed packages

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 6d0ebd570f93d203980dc58eabf648f6079e952c
Author: Alex Branham 
Commit: Alex Branham 

All working, working on listing installed packages
---
 system-packages.el | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 3d2b1d6..2e16ba3 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -51,7 +51,10 @@
   "String containing the package manager to use. Currently
 system-packages supports pacman, apt, and home-brew.")
 
-(defvar system-packages-usesudo t
+(defvar system-packages-usesudo
+  (if (executable-find "pacman") t
+(if (executable-find "apt") t
+  (if (executable-find "brew") nil)))
   "If non-nil, system-packages will use sudo for appropriate
   commands")
 
@@ -116,5 +119,15 @@
 (if (equal system-packages-usesudo t)
 (async-shell-command (mapconcat 'identity (list "sudo" command) " "))
   (async-shell-command (mapconcat 'identity (list command) " ")
+
+;; (defun system-packages-list-installed-packages ()
+;;   "List explicitly installed packages. With the prefix argument,
+;; list all installed packages."
+;;   (interactive)
+;;   (let ((command
+;;  (if (equal system-packages-packagemanager "pacman") "pacman -"
+;;(if (equal system-packages-packagemanager "apt") "apt-cache 
search"
+;;  (if (equal system-packages-packagemanager "brew") "brew 
search")
+;; (async-shell-command (mapconcat 'identity (list command pack) " "

 (provide 'system-packages)



[elpa] externals/system-packages 2737c65 003/117: Modifications

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 2737c65ff608168c02a6e8f2bf71be594e9c04b5
Author: Alex Branham 
Commit: Alex Branham 

Modifications
---
 system-packages.el | 26 ++
 1 file changed, 22 insertions(+), 4 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index f78bceb..f6f392b 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -1,3 +1,13 @@
+;;; system-packages.el --- functions to manage system packages
+
+;; Copyright
+
+;; Author: J. Alexander Branham
+;; Version: 0.1
+
+(defvar system-packages-packagemanager nil
+  "String containing the package manager to use")
+
 (when (executable-find "pacman")
   (setq system-packages-packagemanager "pacman"))
 (when (executable-find "apt-get")
@@ -5,6 +15,15 @@
 (when (executable-find "brew")
   (setq system-packages-packagemanager "brew"))
 
+(defvar system-packages-installcommand nil
+  "Defines the command to use to install system packages ")
+(defvar system-packages-searchcommand nil
+  "Defines the command to use to search for system packages")
+(defvar system-packages-uninstallcommand nil
+  "Defines the command to use to uninstall system packages")
+(defvar system-packages-updatecommand nil
+  "Defines the command to use to update system packages")
+
 (when (equal system-packages-packagemanager "pacman")
   (setq system-packages-installcommand "pacman -S"
 system-packages-searchcommand "pacman -Ss"
@@ -23,16 +42,15 @@
 system-packages-uninstallcommand "brew uninstall"
 system-packages-updatecommand "brew update && brew upgrade"))
 
-(setq system-packages-usesudo t)
+(defvar system-packages-usesudo t
+  "If non-nil, system-packages will use sudo for appropriate commands")
 
 (defun system-packages-install ()
   (if (equal system-packages-usesudo t)
   (async-shell-command (concat "sudo " system-packages-installcommand)))
   (async-shell-command system-packages-installcommand))
 (defun system-packages-search ()
-  (if (equal system-packages-usesudo t)
-  (async-shell-command (concat "sudo " system-packages-searchcommand))
-(async-shell-command system-packages-searchcommand)))
+  (async-shell-command system-packages-searchcommand))
 (defun system-packages-uninstall ()
   (if (equal system-packages-usesudo t)
   (async-shell-command (concat "sudo " system-packages-uninstallcommand)))B



[elpa] externals/system-packages b394c04 034/117: Adds support for openSUSE zypper and Gentoo emerge

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit b394c048f8b65e796b375a7320727a2a4270bf3b
Author: Alex Branham 
Commit: Alex Branham 

Adds support for openSUSE zypper and Gentoo emerge
---
 system-packages.el | 36 
 1 file changed, 36 insertions(+)

diff --git a/system-packages.el b/system-packages.el
index 3af1dcd..3d7d787 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -137,6 +137,42 @@
   (list-installed-packages . nil)
   (list-installed-packages-all . nil)
   (list-dependencies-of . "apt-cache deps")))
+;; Gentoo
+(emerge .
+((default-sudo . t)
+ (install . "emerge")
+ (search . "emerge -S")
+ (uninstall . "emerge -C")
+ (update . "emerge -u world")
+ (clean-cache . "eclean distfiles")
+ (log . "cat /var/log/portage")
+ (get-info . "emerge -pv")
+ (get-info-remote . "emerge -S")
+ (list-files-provided-by . "equery files")
+ (verify-all-packages . "equery check")
+ (verify-all-dependencies . "emerge -uDN world")
+ (remove-orphaned . "emerge --depclean")
+ (list-installed-packages . nil)
+ (list-installed-packages-all . nil)
+ (list-dependencies-of . "emerge -ep")))
+;; openSUSE
+(zypper .
+((default-sudo . t)
+ (install . "zypper install")
+ (search . "zypper search")
+ (uninstall . "zypper remove")
+ (update . "zypper update")
+ (clean-cache . "zypper clean")
+ (log . "cat /var/log/zypp/history")
+ (get-info . "zypper info")
+ (get-info-remote . "zypper info")
+ (list-files-provided-by . "rpm -Ql")
+ (verify-all-packages . "rpm -Va")
+ (verify-all-dependencies . "zypper verify")
+ (remove-orphaned . "zypper rm -u")
+ (list-installed-packages . nil)
+ (list-installed-packages-all . nil)
+ (list-dependencies-of . "zypper info --requires")))
 ;; Fedora
 (dnf .
  ((default-sudo . t)



[elpa] externals/system-packages 874ab8f 046/117: Add directory local variables

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 874ab8fe866f2c1aaf859a4bb61f9a36c9eeded4
Author: Alex Branham 
Commit: Alex Branham 

Add directory local variables
---
 .dir-locals.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.dir-locals.el b/.dir-locals.el
new file mode 100644
index 000..a986abf
--- /dev/null
+++ b/.dir-locals.el
@@ -0,0 +1,3 @@
+((nil . ((fill-column . 70)
+ (sentence-end-double-space . t)
+ )))



[elpa] externals/system-packages bccbab3 002/117: Initial commit

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit bccbab36f9077b33368768f22445018101cd45b4
Author: Alex Branham 
Commit: Alex Branham 

Initial commit
---
 system-packages.el | 43 +++
 1 file changed, 43 insertions(+)

diff --git a/system-packages.el b/system-packages.el
new file mode 100644
index 000..f78bceb
--- /dev/null
+++ b/system-packages.el
@@ -0,0 +1,43 @@
+(when (executable-find "pacman")
+  (setq system-packages-packagemanager "pacman"))
+(when (executable-find "apt-get")
+  (setq system-packages-packagemanager "apt-get"))
+(when (executable-find "brew")
+  (setq system-packages-packagemanager "brew"))
+
+(when (equal system-packages-packagemanager "pacman")
+  (setq system-packages-installcommand "pacman -S"
+system-packages-searchcommand "pacman -Ss"
+system-packages-uninstallcommand "pacman -Rs"
+system-packages-updatecommand "pacman -Syu"))
+
+(when (equal system-packages-packagemanager "apt-get")
+  (setq system-packages-installcommand "apt-get install"
+system-packages-searchcommand "apt-cache search"
+system-packages-uninstallcommand "apt-get remove"
+system-packages-updatecommand "apt-get update && sudo apt-get 
upgrade"))
+
+(when (equal system-packages-packagemanager "brew")
+  (setq system-packages-installcommand "brew install"
+system-packages-searchcommand "brew search"
+system-packages-uninstallcommand "brew uninstall"
+system-packages-updatecommand "brew update && brew upgrade"))
+
+(setq system-packages-usesudo t)
+
+(defun system-packages-install ()
+  (if (equal system-packages-usesudo t)
+  (async-shell-command (concat "sudo " system-packages-installcommand)))
+  (async-shell-command system-packages-installcommand))
+(defun system-packages-search ()
+  (if (equal system-packages-usesudo t)
+  (async-shell-command (concat "sudo " system-packages-searchcommand))
+(async-shell-command system-packages-searchcommand)))
+(defun system-packages-uninstall ()
+  (if (equal system-packages-usesudo t)
+  (async-shell-command (concat "sudo " system-packages-uninstallcommand)))B
+  (async-shell-command system-packages-uninstallcommand))
+(defun system-packages-update ()
+  (if (equal system-packages-usesudo t)
+  (async-shell-command (concat "sudo " system-packages-updatecommand))
+(async-shell-command system-packages-updatecommand)))



[elpa] externals/system-packages ae993f9 040/117: Prefer apt to aptitude

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit ae993f994ed60a845c5752e90491cf127bb1c052
Author: Alex Branham 
Commit: Alex Branham 

Prefer apt to aptitude
---
 system-packages.el | 34 +-
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 7762de7..61fd923 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -103,6 +103,23 @@
  (list-installed-packages-all . "pacman -Q")
  (list-dependencies-of . "pacman -Qi")))
 ;; Debian (and Ubuntu) based systems
+(apt .
+ ((default-sudo . t)
+  (install . "apt install")
+  (search . "apt search")
+  (uninstall . "apt remove")
+  (update . ("apt update" "apt upgrade"))
+  (clean-cache . "apt-get clean")
+  (log . "cat /var/log/dpkg.log")
+  (get-info . "dpkg -s")
+  (get-info-remote . "apt show")
+  (list-files-provided-by . "dpkg -L")
+  (verify-all-packages . "debsums")
+  (verify-all-dependencies . "apt-get check")
+  (remove-orphaned . "apt autoremove")
+  (list-installed-packages . nil)
+  (list-installed-packages-all . nil)
+  (list-dependencies-of . "apt-cache deps")))
 (aptitude .
   ((default-sudo . t)
(install . "aptitude install")
@@ -120,23 +137,6 @@
(list-installed-packages . "aptitude search '~i!~M'")
(list-installed-packages-all . "aptitude search '~i!~M'")
(list-dependencies-of . "apt-cache deps")))
-(apt .
- ((default-sudo . t)
-  (install . "apt-get install")
-  (search . "apt-cache search")
-  (uninstall . "apt-get remove")
-  (update . ("apt-get update" "apt-get upgrade"))
-  (clean-cache . "apt-get clean")
-  (log . "cat /var/log/dpkg.log")
-  (get-info . "dpkg -s")
-  (get-info-remote . "apt-cache show")
-  (list-files-provided-by . "dpkg -L")
-  (verify-all-packages . "debsums")
-  (verify-all-dependencies . "apt-get check")
-  (remove-orphaned . "apt-get autoremove")
-  (list-installed-packages . nil)
-  (list-installed-packages-all . nil)
-  (list-dependencies-of . "apt-cache deps")))
 ;; Gentoo
 (emerge .
 ((default-sudo . t)



[elpa] externals/system-packages 1c1faa4 016/117: Merge pull request #1 from jiegec/master

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 1c1faa4a3aa2e2a70402760dbad3650f3e90d01d
Merge: 0534179 a6dcd04
Author: Alex Branham 
Commit: GitHub 

Merge pull request #1 from jiegec/master

Refactor the package manager specific commands into a defconst
---
 system-packages.el | 125 ++---
 1 file changed, 71 insertions(+), 54 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index dbcadad..20b1b15 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -38,29 +38,84 @@
 
 ;;; Code:
 
+(eval-when-compile
+  (require 'cl))
+
 (defgroup system-packages nil
   "Manages system packages"
   :tag "System Packages"
   :prefix "system-packages"
   :group 'packages)
 
+(defconst system-packages-supported-package-managers
+  '((pacaur .
+((default-sudo . nil)
+ (install . "pacaur -S")
+ (search . "pacaur -Ss")
+ (uninstall . "pacaur -Rs")
+ (update . "pacaur -Syu")
+ (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
+ (list-installed-packages . "pacman -Q")
+ (list-installed-packages-all . "pacman -Qe")))
+(pacman .
+((default-sudo . t)
+ (install . "pacman -S")
+ (search . "pacman -Ss")
+ (uninstall . "pacman -Rs")
+ (update . "pacman -Syu")
+ (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
+ (list-installed-packages . "pacman -Q")
+ (list-installed-packages-all . "pacman -Q")))
+(apt .
+ ((default-sudo . t)
+  (install . "apt-get install")
+  (search . "apt-cache search")
+  (uninstall . "apt-get remove")
+  (update . ("apt-get update" "apt-get upgrade"))
+  (remove-orphaned . "apt-get autoremove")
+  (list-installed-packages . nil)
+  (list-installed-packages-all . nil)))
+(brew .
+  ((default-sudo . nil)
+   (install . "brew install")
+   (search . "brew search")
+   (uninstall . "brew uninstall")
+   (update . ("brew update" "brew upgrade --all"))
+   (remove-orphaned . nil)
+   (list-installed-packages . "brew list")
+   (list-installed-packages-all . nil)
+
 (defvar system-packages-packagemanager
-  (if (executable-find "pacaur") "pacaur"
-(if (executable-find "pacman") "pacman"
-  (if (executable-find "apt") "apt"
-(if (executable-find "brew") "brew"
+  (cl-loop for (name . prop) in system-packages-supported-package-managers
+   for path = (executable-find (symbol-name name))
+   when path
+   return name)
   "String containing the package manager to use. Currently
 system-packages supports pacman, pacaur, apt, and
 homebrew. Tries to be smart about selecting the default.")
 
 (defvar system-packages-usesudo
-  (if (equal system-packages-packagemanager "pacman") t
-(if (equal system-packages-packagemanager "apt") t
-  (if (equal system-packages-packagemanager "brew") nil
-(if (equal system-packages-packagemanager "pacaur") nil
+  (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager
+
system-packages-supported-package-managers
   "If non-nil, system-packages will use sudo for appropriate
   commands. Tries to be smart for selecting the default.")
 
+(defun system-packages--run-command (action &optional pack)
+  "ACTION can be `default-sudo', `install', `search',
+`uninstall' etc. Run the command according to
+`system-packages-supported-package-managers' and ACTION."
+  (let ((command
+ (cdr (assoc action (cdr (assoc system-packages-packagemanager
+
system-packages-supported-package-managers))
+(unless command
+  (error (format "%S not supported in %S" action 
system-packages-packagemanager)))
+(unless (listp command)
+  (setq command (list command)))
+(when system-packages-usesudo
+  (setq command (mapcar (lambda (part) (concat "sudo " part)) command)))
+(setq command (mapconcat 'identity command " && "))
+(async-shell-command (mapconcat 'identity (list command pack) " "
+
 
 ;; functions on named packages
 
@@ -69,38 +124,19 @@
   "Installs system packages using the package manager named in
 system-packages-packagemanager."
   (interactive "sWhat package to install?")
-  (let ((command
- (if (equal system-packages-packagemanager "pacaur") "pacaur -S"
-   (if (equal system-packages-packagemanager "pacman") "pacman -S"
- (if (equal system-packages-packagemanager "apt") "apt-get install"
-   (if (equal system-packages-packagemanager "brew") "brew 
install"))
-(if (equal system-packages-usesudo t)
-(async-shell-command

[elpa] externals/system-packages 4efd204 042/117: Use dedicated buffer

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 4efd204a23be84fe1c125e26f07ef794f128fac4
Author: Alex Branham 
Commit: Alex Branham 

Use dedicated buffer
---
 system-packages.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 97b6ad3..6b6a5ed 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -244,7 +244,7 @@ default."
 (when system-packages-usesudo
   (setq command (mapcar (lambda (part) (concat "sudo " part)) command)))
 (setq command (mapconcat 'identity command " && "))
-(async-shell-command (mapconcat 'identity (list command pack) " "
+(async-shell-command (mapconcat 'identity (list command pack) " ") 
"*system-packages*")))
 
 
 ;; functions on named packages



[elpa] externals/system-packages 7553ef9 004/117: More work...

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 7553ef9b38dbc52fc3b88748e405ceb1e8aa51e4
Author: Alex Branham 
Commit: Alex Branham 

More work...
---
 system-packages.el | 105 -
 1 file changed, 56 insertions(+), 49 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index f6f392b..9855309 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -1,61 +1,68 @@
-;;; system-packages.el --- functions to manage system packages
+  ;;; system-packages.el --- functions to manage system packages
 
 ;; Copyright
 
 ;; Author: J. Alexander Branham
 ;; Version: 0.1
 
-(defvar system-packages-packagemanager nil
-  "String containing the package manager to use")
-
-(when (executable-find "pacman")
-  (setq system-packages-packagemanager "pacman"))
-(when (executable-find "apt-get")
-  (setq system-packages-packagemanager "apt-get"))
-(when (executable-find "brew")
-  (setq system-packages-packagemanager "brew"))
-
-(defvar system-packages-installcommand nil
-  "Defines the command to use to install system packages ")
-(defvar system-packages-searchcommand nil
-  "Defines the command to use to search for system packages")
-(defvar system-packages-uninstallcommand nil
-  "Defines the command to use to uninstall system packages")
-(defvar system-packages-updatecommand nil
-  "Defines the command to use to update system packages")
-
-(when (equal system-packages-packagemanager "pacman")
-  (setq system-packages-installcommand "pacman -S"
-system-packages-searchcommand "pacman -Ss"
-system-packages-uninstallcommand "pacman -Rs"
-system-packages-updatecommand "pacman -Syu"))
-
-(when (equal system-packages-packagemanager "apt-get")
-  (setq system-packages-installcommand "apt-get install"
-system-packages-searchcommand "apt-cache search"
-system-packages-uninstallcommand "apt-get remove"
-system-packages-updatecommand "apt-get update && sudo apt-get 
upgrade"))
-
-(when (equal system-packages-packagemanager "brew")
-  (setq system-packages-installcommand "brew install"
-system-packages-searchcommand "brew search"
-system-packages-uninstallcommand "brew uninstall"
-system-packages-updatecommand "brew update && brew upgrade"))
+(defvar system-packages-packagemanager
+  (if (executable-find "pacman") "pacman"
+(if (executable-find "apt") "apt"
+  (if (executable-find "brew") "brew")))
+  "String containing the package manager to use. Currently
+system-packages supports pacman, apt, and home-brew.")
 
 (defvar system-packages-usesudo t
-  "If non-nil, system-packages will use sudo for appropriate commands")
+  "If non-nil, system-packages will use sudo for appropriate
+  commands")
+
+
+(defun system-packages-install (pack)
+  "Installs system packages"
+  (interactive "sWhat package to install?")
+  (let ((command
+ (cond ((equal system-packages-packagemanager "pacman") "pacman -S")
+   ((equal system-packages-packagemanager "apt") "apt-get install")
+   ((equal system-packages-packagemanager "brew") "brew 
install"
+(if (equal system-packages-usesudo t)
+(async-shell-command
+ (mapconcat 'identity
+'("sudo" command pack)
+" "))
+  (async-shell-command
+   (mapconcat 'identity
+  '(command pack)
+  " ")
+
 
-(defun system-packages-install ()
-  (if (equal system-packages-usesudo t)
-  (async-shell-command (concat "sudo " system-packages-installcommand)))
-  (async-shell-command system-packages-installcommand))
 (defun system-packages-search ()
-  (async-shell-command system-packages-searchcommand))
+  "Search for system packages"
+  (interactive "sSearch string?")
+  (let ((command
+ (cond ((equal system-packages-packagemanager "pacman") "pacman -Ss")
+   ((equal system-packages-packagemanager "apt") "apt-cache 
search")
+   ((equal system-packages-packagemanager "brew") "brew search"
+  (async-shell-command command)))
+
 (defun system-packages-uninstall ()
-  (if (equal system-packages-usesudo t)
-  (async-shell-command (concat "sudo " system-packages-uninstallcommand)))B
-  (async-shell-command system-packages-uninstallcommand))
+  "Uninstalls installed system packages"
+  (interactive "sWhat package to uninstall?")
+  (let ((command
+ (cond ((equal system-packages-packagemanager "pacman") "pacman -Rs")
+   ((equal system-packages-packagemanager "apt") "apt-get remove")
+   ((equal system-packages-packagemanager "brew") "brew 
uninstall"
+(if (equal system-packages-usesudo t)
+(async-shell-command (concat "sudo " command))
+  (async-shell-command command
+
 (defun system-packages-update ()
-  (if (equal system-packages-usesudo t)
-  (async-shell-command (concat "sudo " system-packages-updatecommand))
-(async-shell-command sys

[elpa] externals/system-packages 19ab3e9 030/117: Adds autoload magic comments

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 19ab3e959c04dc084f0c679228ab675e5a559c30
Author: Alex Branham 
Commit: Alex Branham 

Adds autoload magic comments

Closes #11
---
 system-packages.el | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/system-packages.el b/system-packages.el
index 328229a..e06edc1 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -153,18 +153,21 @@
 ;; functions on named packages
 
 
+;;;###autoload
 (defun system-packages-install (pack)
   "Installs system packages using the package manager named in
 system-packages-packagemanager."
   (interactive "sWhat package to install: ")
   (system-packages--run-command 'install pack))
 
+;;;###autoload
 (defun system-packages-search (pack)
   "Search for system packages using the package manager named in
 system-packages-packagemanager."
   (interactive "sSearch string: ")
   (system-packages--run-command 'search pack))
 
+;;;###autoload
 (defun system-packages-uninstall (pack)
   "Uninstalls installed system packages using the package manager named in
 system-packages-packagemanager."
@@ -175,18 +178,21 @@ system-packages-packagemanager."
 ;; functions that don't take a named package
 
 
+;;;###autoload
 (defun system-packages-update ()
   "Updates installed system packages using the package manager named in
 system-packages-packagemanager."
   (interactive)
   (system-packages--run-command 'update))
 
+;;;###autoload
 (defun system-packages-remove-orphaned ()
   "This function removes orphaned packages (i.e. unused packages). using the 
package manager named in
 system-packages-packagemanager."
   (interactive)
   (system-packages--run-command 'remove-orphaned))
 
+;;;###autoload
 (defun system-packages-list-installed-packages (arg)
   "List explicitly installed packages using the package manager
 named in system-packages-packagemanager. With



[elpa] externals/system-packages b05fc13 024/117: Add package footer for packaging convention

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit b05fc13564e71c87615258f70dc2af8cde59ad22
Author: Syohei YOSHIDA 
Commit: Syohei YOSHIDA 

Add package footer for packaging convention
---
 system-packages.el | 1 +
 1 file changed, 1 insertion(+)

diff --git a/system-packages.el b/system-packages.el
index eb1c0aa..0b90523 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -196,3 +196,4 @@ named in system-packages-packagemanager. With
 (system-packages--run-command 'list-installed-packages)))

 (provide 'system-packages)
+;;; system-packages.el ends here



[elpa] externals/system-packages 170f07c 039/117: Update README

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 170f07c3cdf2859efaedc60c7013f6d72e009468
Author: Alex Branham 
Commit: Alex Branham 

Update README
---
 README.org | 13 +
 1 file changed, 13 insertions(+)

diff --git a/README.org b/README.org
index 94c7991..19891d7 100644
--- a/README.org
+++ b/README.org
@@ -27,6 +27,19 @@ packages more convenient through emacs.
   need sudo privileges. You may set this manually by configuring
   =system-packages-usesudo=
 
+* Supported package managers
+Currently, =system-packages= knows about the following package managers.
+You can see exactly what commands are associated with =system-packages= 
commands by checking =system-packages-supported-package-managers=.
+The default package manager that we use is the first one found from this list:
+- brew
+- pacaur
+- pacman
+- aptitude
+- apt
+- emerge
+- zypper
+- dnf
+
 * Usage
 
   The package doesn't presume to set keybindings for you, so you may



[elpa] externals/system-packages 5cc9ce7 072/117: Change brew upgrade --all to brew upgrade

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 5cc9ce7b5ffdb18fc18aedf1870b029fb1e95346
Author: Alex Branham 
Commit: Alex Branham 

Change brew upgrade --all to brew upgrade

See bug #19
---
 system-packages.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 0387e8b..d4af9d7 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -76,7 +76,7 @@
(install . "brew install")
(search . "brew search")
(uninstall . "brew uninstall")
-   (update . ("brew update" "brew upgrade --all"))
+   (update . ("brew update" "brew upgrade"))
(clean-cache . "brew cleanup")
(log . nil)
(get-info . nil)



[elpa] externals/system-packages 6997440 031/117: Adds list-dependencies-of command

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 6997440e59cdcfe74fa5e98d271363e58beed311
Author: Alex Branham 
Commit: Alex Branham 

Adds list-dependencies-of command

Also fixes several pacaur typos
---
 system-packages.el | 33 +++--
 1 file changed, 23 insertions(+), 10 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index e06edc1..7d15dae 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -1,6 +1,6 @@
 ;;; system-packages.el --- functions to manage system packages
 
-;; Copyright (C) 2016 J. Alexander Branham
+;; Copyright (C) 2016-2017 J. Alexander Branham
 
 ;; Author: J. Alexander Branham 
 ;; Maintainer: J. Alexander Branham 
@@ -58,7 +58,8 @@
(update . ("brew update" "brew upgrade --all"))
(remove-orphaned . nil)
(list-installed-packages . "brew list")
-   (list-installed-packages-all . nil)))
+   (list-installed-packages-all . nil)
+   (list-dependencies-of . "brew deps")))
 ;; Arch-based systems
 (pacaur .
 ((default-sudo . nil)
@@ -66,9 +67,10 @@
  (search . "pacaur -Ss")
  (uninstall . "pacaur -Rs")
  (update . "pacaur -Syu")
- (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
- (list-installed-packages . "pacman -Qe")
- (list-installed-packages-all . "pacman -Q")))
+ (remove-orphaned . "pacaur -Rns $(pacman -Qtdq)")
+ (list-installed-packages . "pacaur -Qe")
+ (list-installed-packages-all . "pacaur -Q")
+ (list-dependencies-of . "pacaur -Qi")))
 (pacman .
 ((default-sudo . t)
  (install . "pacman -S")
@@ -77,7 +79,8 @@
  (update . "pacman -Syu")
  (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
  (list-installed-packages . "pacman -Qe")
- (list-installed-packages-all . "pacman -Q")))
+ (list-installed-packages-all . "pacman -Q")
+ (list-dependencies-of . "pacman -Qi")))
 ;; Debian (and Ubuntu) based systems
 (aptitude .
   ((default-sudo . t)
@@ -87,7 +90,8 @@
(update . ("aptitude update"))
(remove-orphaned . nil) ; aptitude does this automatically
(list-installed-packages . "aptitude search '~i!~M'")
-   (list-installed-packages-all . nil)))
+   (list-installed-packages-all . nil)
+   (list-dependencies-of . "apt-cache deps")))
 (apt .
  ((default-sudo . t)
   (install . "apt-get install")
@@ -96,7 +100,8 @@
   (update . ("apt-get update" "apt-get upgrade"))
   (remove-orphaned . "apt-get autoremove")
   (list-installed-packages . nil)
-  (list-installed-packages-all . nil)))
+  (list-installed-packages-all . nil)
+  (list-dependencies-of . "apt-cache deps")))
 ;; Fedora
 (dnf .
  ((default-sudo . t)
@@ -106,7 +111,8 @@
   (update . ("dnf upgrade"))
   (remove-orphaned . "dnf autoremove")
   (list-installed-packages . "dnf list --installed")
-  (list-installed-packages-all . nil)))
+  (list-installed-packages-all . nil)
+  (list-dependencies-of . "rpm -qR")))
 (yum .
  ((default-sudo . t)
   (install . "yum install")
@@ -115,7 +121,8 @@
   (update . ("yum update"))
   (remove-orphaned . "yum autoremove")
   (list-installed-packages . "yum list")
-  (list-installed-packages-all . nil)
+  (list-installed-packages-all . nil)
+  (list-dependencies-of . "yum deplist")
 
 (defcustom system-packages-packagemanager
   (cl-loop for (name . prop) in system-packages-supported-package-managers
@@ -174,6 +181,12 @@ system-packages-packagemanager."
   (interactive "sWhat package to uninstall: ")
   (system-packages--run-command 'uninstall pack))
 
+;;;###autoload
+(defun system-packages-list-dependencies-of (pack)
+  "List all the dependencies of PACK."
+  (interactive "sWhat package to list dependencies of: ")
+  (system-packages--run-command 'list-dependencies-of))
+
 
 ;; functions that don't take a named package
 



[elpa] externals/system-packages 47e4119 035/117: Fix docstring

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 47e4119f7f8fcb26954dc5926469bda22ed03123
Author: Alex Branham 
Commit: Alex Branham 

Fix docstring
---
 system-packages.el | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 3d7d787..9e4cdd1 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -197,9 +197,11 @@
for path = (executable-find (symbol-name name))
when path
return name)
-  "String containing the package manager to use. Currently
-system-packages supports pacman, pacaur, apt, and
-homebrew. Tries to be smart about selecting the default."
+  "String containing the package manager to use.
+
+See `system-packages-supported-package-managers' for a list of
+supported software. Tries to be smart about selecting the
+default."
   :type 'symbol)
 
 (defvar system-packages-usesudo



[elpa] externals/system-packages a39b1f0 028/117: Moves brew further up in list

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit a39b1f0a57049ab899bcfa8f8502c161cdf3172f
Author: Alex Branham 
Commit: Alex Branham 

Moves brew further up in list

Fixes #10
---
 system-packages.el | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index f885495..328229a 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -49,6 +49,16 @@
 
 (defconst system-packages-supported-package-managers
   '(
+;; Mac
+(brew .
+  ((default-sudo . nil)
+   (install . "brew install")
+   (search . "brew search")
+   (uninstall . "brew uninstall")
+   (update . ("brew update" "brew upgrade --all"))
+   (remove-orphaned . nil)
+   (list-installed-packages . "brew list")
+   (list-installed-packages-all . nil)))
 ;; Arch-based systems
 (pacaur .
 ((default-sudo . nil)
@@ -105,17 +115,7 @@
   (update . ("yum update"))
   (remove-orphaned . "yum autoremove")
   (list-installed-packages . "yum list")
-  (list-installed-packages-all . nil)))
-;; Mac
-(brew .
-  ((default-sudo . nil)
-   (install . "brew install")
-   (search . "brew search")
-   (uninstall . "brew uninstall")
-   (update . ("brew update" "brew upgrade --all"))
-   (remove-orphaned . nil)
-   (list-installed-packages . "brew list")
-   (list-installed-packages-all . nil)
+  (list-installed-packages-all . nil)
 
 (defcustom system-packages-packagemanager
   (cl-loop for (name . prop) in system-packages-supported-package-managers



[elpa] externals/system-packages 9ef4751 067/117: Fix travis

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 9ef47512bdd22b3c9e80ff8e6456137e0b5aacce
Author: Alex Branham 
Commit: Alex Branham 

Fix travis
---
 .travis.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 66dea48..295b757 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,9 @@
 language: generic
 
-sudo: enabled
+sudo: required
 
 before_install:
-  - sudo add-apt-repository ppa:ubuntu-elisp/ppa
+  - sudo add-apt-repository ppa:ubuntu-elisp/ppa -y
   - sudo apt-get -qq update
   - sudo apt-get install emacs-snapshot
 



[elpa] externals/system-packages 71af8a5 013/117: Adds some documentation

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 71af8a56af5e3658bcb91124588d3a985e9b9b97
Author: Alex Branham 
Commit: Alex Branham 

Adds some documentation
---
 system-packages.el | 48 +++-
 1 file changed, 27 insertions(+), 21 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 9d9d1f8..dbcadad 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -51,7 +51,7 @@
 (if (executable-find "brew") "brew"
   "String containing the package manager to use. Currently
 system-packages supports pacman, pacaur, apt, and
-homebrew.")
+homebrew. Tries to be smart about selecting the default.")
 
 (defvar system-packages-usesudo
   (if (equal system-packages-packagemanager "pacman") t
@@ -59,42 +59,45 @@
   (if (equal system-packages-packagemanager "brew") nil
 (if (equal system-packages-packagemanager "pacaur") nil
   "If non-nil, system-packages will use sudo for appropriate
-  commands")
+  commands. Tries to be smart for selecting the default.")
 
 
 ;; functions on named packages
 
 
 (defun system-packages-install (pack)
-  "Installs system packages"
+  "Installs system packages using the package manager named in
+system-packages-packagemanager."
   (interactive "sWhat package to install?")
   (let ((command
  (if (equal system-packages-packagemanager "pacaur") "pacaur -S"
- (if (equal system-packages-packagemanager "pacman") "pacman -S"
-   (if (equal system-packages-packagemanager "apt") "apt-get install"
- (if (equal system-packages-packagemanager "brew") "brew 
install"))
+   (if (equal system-packages-packagemanager "pacman") "pacman -S"
+ (if (equal system-packages-packagemanager "apt") "apt-get install"
+   (if (equal system-packages-packagemanager "brew") "brew 
install"))
 (if (equal system-packages-usesudo t)
 (async-shell-command (mapconcat 'identity (list "sudo" command pack) " 
"))
   (async-shell-command (mapconcat 'identity (list command pack) " ")
 
 (defun system-packages-search (pack)
-  "Search for system packages"
+  "Search for system packages using the package manager named in
+system-packages-packagemanager."
   (interactive "sSearch string?")
   (let ((command
  (if (equal system-packages-packagemanager "pacaur") "pacaur -Ss"
- (if (equal system-packages-packagemanager "pacman") "pacman -Ss"
-   (if (equal system-packages-packagemanager "apt") "apt-cache search"
- (if (equal system-packages-packagemanager "brew") "brew 
search"))
+   (if (equal system-packages-packagemanager "pacman") "pacman -Ss"
+ (if (equal system-packages-packagemanager "apt") "apt-cache 
search"
+   (if (equal system-packages-packagemanager "brew") "brew 
search"))
 (async-shell-command (mapconcat 'identity (list command pack) " "
 
 (defun system-packages-uninstall (pack)
-  "Uninstalls installed system packages"
+  "Uninstalls installed system packages using the package manager named in
+system-packages-packagemanager."
   (interactive "sWhat package to uninstall?")
   (let ((command
  (if (equal system-packages-packagemanager "pacaur") "pacaur -Rs"
- (if (equal system-packages-packagemanager "pacman") "pacman -Rs"
-   (if (equal system-packages-packagemanager "apt") "apt-get remove"
- (if (equal system-packages-packagemanager "brew") "brew 
uninstall"))
+   (if (equal system-packages-packagemanager "pacman") "pacman -Rs"
+ (if (equal system-packages-packagemanager "apt") "apt-get remove"
+   (if (equal system-packages-packagemanager "brew") "brew 
uninstall"))
 (if (equal system-packages-usesudo t)
 (async-shell-command (mapconcat 'identity (list "sudo" command pack) " 
"))
   (async-shell-command (mapconcat 'identity (list command pack) " ")
@@ -104,19 +107,21 @@
 
 
 (defun system-packages-update ()
-  "Updates installed system packages"
+  "Updates installed system packages using the package manager named in
+system-packages-packagemanager."
   (interactive)
   (let ((command
  (if (equal system-packages-packagemanager "pacaur") "pacaur -Syu"
- (if (equal system-packages-packagemanager "pacman") "pacman -Syu"
-   (if (equal system-packages-packagemanager "apt") "apt-get update && 
sudo apt-get upgrade"
- (if (equal system-packages-packagemanager "brew") "brew update && 
brew upgrade"))
+   (if (equal system-packages-packagemanager "pacman") "pacman -Syu"
+ (if (equal system-packages-packagemanager "apt") "apt-get update 
&& sudo apt-get upgrade"
+   (if (equal system-packages-packagemanag

[elpa] externals/system-packages 942c9e7 029/117: On MELPA

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 942c9e7c4723151f67874237716f77ad64f7c267
Author: Alex Branham 
Commit: Alex Branham 

On MELPA
---
 README.org | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index 1e7169e..e442335 100644
--- a/README.org
+++ b/README.org
@@ -7,13 +7,12 @@ packages more convenient through emacs.
 
 * Installation
 
-  System packages is not available on MELPA, so the easiest way to use
-  it is to =git clone= it somewhere and add that to your load-path. If
-  you use [[https://github.com/jwiegley/use-package][use-package]], 
configuration may look something like this:
+  System packages is available on [[https://melpa.org/#/][MELPA]]. If you use 
[[https://github.com/jwiegley/use-package][use-package]] and
+  have MELPA set up correctly, all you'll need is something like the following:
 
   #+BEGIN_SRC emacs-lisp :eval never
 (use-package system-packages
-  :load-path "~/path/to/system-packages")
+  :ensure t)
   #+END_SRC
 
 * Configuration



[elpa] externals/system-packages 2046209 080/117: Make system-packages-supported-package-managers a defvar

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 2046209de1fbac1e02b48b9a8102643c0847feac
Author: Alex Branham 
Commit: Alex Branham 

Make system-packages-supported-package-managers a defvar

Since the README shows how to modify this, it shouldn't be a defconst
---
 system-packages.el | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index d2fb348..4bf9175 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -49,7 +49,7 @@
   :prefix "system-packages"
   :group 'packages)
 
-(defconst system-packages-supported-package-managers
+(defvar system-packages-supported-package-managers
   '(
 ;; guix
 (guix .
@@ -259,7 +259,10 @@
(list-installed-packages . "xbps-query -l ")
(list-installed-packages-all . "xbps-query -l ")
(list-dependencies-of . "xbps-query -x")
-   (noconfirm . nil)
+   (noconfirm . nil
+  "An alist of package manager commands.
+The key is the package manager and values (usually) commands.")
+(put 'system-packages-supported-package-managers 'risky-local-variable t)
 
 (defcustom system-packages-package-manager
   (cl-loop for (name . prop) in system-packages-supported-package-managers



[elpa] externals/system-packages 5010fb4 058/117: Fix spacing in some variable names

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 5010fb47064ada64c8e1e1af768fce39a93cf361
Author: Alex Branham 
Commit: Alex Branham 

Fix spacing in some variable names
---
 system-packages.el | 10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 83111d9..043a9f8 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -221,7 +221,7 @@
(list-dependencies-of . "xbps-query -x")
(noconfirm . nil)
 
-(defcustom system-packages-packagemanager
+(defcustom system-packages-package-manager
   (cl-loop for (name . prop) in system-packages-supported-package-managers
for path = (executable-find (symbol-name name))
when path
@@ -234,7 +234,10 @@ default."
   :group 'system-packages
   :type 'symbol)
 
-(defcustom system-packages-usesudo
+(define-obsolete-variable-alias 'system-packages-packagemanager
+  'system-packages-package-manager "2017-12-25")
+
+(defcustom system-packages-use-sudo
   (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager
 
system-packages-supported-package-managers
   "If non-nil, system-packages uses sudo for appropriate commands.
@@ -242,6 +245,9 @@ default."
 Tries to be smart for selecting the default."
   :group 'system-packages)
 
+(define-obsolete-variable-alias 'system-packages-usesudo
+  'system-packages-use-sudo "2017-12-25")
+
 (defcustom system-packages-noconfirm nil
   "If non-nil, bypass prompts asking the user to confirm package upgrades."
   :group 'system-packages



[elpa] externals/system-packages ed5d9cc 082/117: Improve system-packages-package-manager :type defcustom

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit ed5d9cc61aa3dee238ffbfe8b21598fd70517b5e
Author: Alex Branham 
Commit: Alex Branham 

Improve system-packages-package-manager :type defcustom
---
 system-packages.el | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 7748e81..62ce2fb 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -275,7 +275,18 @@ See `system-packages-supported-package-managers' for a 
list of
 supported software.  Tries to be smart about selecting the
 default."
   :group 'system-packages
-  :type 'symbol)
+  :type '(choice
+  (const guix)
+  (const nix-env)
+  (const brew)
+  (const port)
+  (const pacman)
+  (const apt)
+  (const aptitude)
+  (const emerge)
+  (const zypper)
+  (const dnf)
+  (const xbps-install)))
 
 (define-obsolete-variable-alias 'system-packages-packagemanager
   'system-packages-package-manager "2017-12-25")



[elpa] externals/system-packages 149c253 055/117: Fix typo

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 149c253583e8b4d56a851b1e91e456260749cdea
Author: Alex Branham 
Commit: Alex Branham 

Fix typo
---
 system-packages.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 45ccaf3..643cfeb 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -244,7 +244,7 @@
for path = (executable-find (symbol-name name))
when path
return name)
-  "String containing the package manager to use.
+  "Symbol containing the package manager to use.
 
 See `system-packages-supported-package-managers' for a list of
 supported software.  Tries to be smart about selecting the



[elpa] externals/system-packages 04e2f7f 087/117: Make travis run tests

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 04e2f7fa734dabf755bbede6d29207cc1e6aa2ac
Author: Alex Branham 
Commit: Alex Branham 

Make travis run tests
---
 .travis.yml  | 3 ++-
 Makefile | 7 ++-
 test/system-packages-test.el | 9 +
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e9e54a2..c7b860b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,5 +9,6 @@ before_install:
 
 script:
   - emacs-snapshot --version
-  - make
+  - make compile
+  - make test
 
diff --git a/Makefile b/Makefile
index 3e5a4a6..9365804 100644
--- a/Makefile
+++ b/Makefile
@@ -8,8 +8,13 @@ ELC := $(patsubst %.el,%.elc,$(EL))
 .PHONY: all
 all: compile
 
-.PHONY: compile
+.PHONY: compile test
 compile: $(ELC)
 
 %.elc: %.el
$(EMACS_BATCH) --eval "(progn (message (emacs-version)) (setq 
byte-compile-error-on-warn t) (batch-byte-compile))" $<
+
+test:
+   $(EMACS_BATCH) --eval "(progn\
+   (load-file \"test/system-packages-test.el\") \
+   (ert-run-tests-batch-and-exit))"
diff --git a/test/system-packages-test.el b/test/system-packages-test.el
index 26ac4dd..2e98dad 100644
--- a/test/system-packages-test.el
+++ b/test/system-packages-test.el
@@ -5,18 +5,19 @@
 ;; Author: J. Alexander Branham 
 
 (require 'ert)
+(require 'system-packages)
 
 (ert-deftest system-packages-get-install ()
   "Return correct installation command."
   (should (string=
(let ((system-packages-use-sudo nil)
  (system-packages-package-manager 'guix))
- (system-packages--get-command 'install))
+ (system-packages-get-command 'install))
"guix package -i "))
   (should (string=
(let ((system-packages-use-sudo t)
  (system-packages-package-manager 'pacman))
- (system-packages--get-command 'install))
+ (system-packages-get-command 'install))
"sudo pacman -S ")))
 
 (ert-deftest system-packages-get-install-noconfirm ()
@@ -25,11 +26,11 @@
(let ((system-packages-noconfirm t)
  (system-packages-use-sudo nil)
  (system-packages-package-manager 'guix))
- (system-packages--get-command 'install))
+ (system-packages-get-command 'install))
"guix package -i "))
   (should (string=
(let ((system-packages-noconfirm t)
  (system-packages-use-sudo t)
  (system-packages-package-manager 'pacman))
- (system-packages--get-command 'install))
+ (system-packages-get-command 'install))
"sudo pacman -S --noconfirm")))



[elpa] externals/system-packages 1acd87a 047/117: Add an optional ARGS for package manager options & cleanup file

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 1acd87a58c7c3565830a9856c25adfbeacd39a5c
Author: Alex Branham 
Commit: Alex Branham 

Add an optional ARGS for package manager options & cleanup file
---
 system-packages.el | 157 +
 1 file changed, 98 insertions(+), 59 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index d9fd261..c1af564 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -28,7 +28,7 @@
 
 ;;; Commentary:
 
-;; This is a package to manage installed system packages. Useful
+;; This is a package to manage installed system packages.  Useful
 ;; functions include installing packages, removing packages, listing
 ;; installed packages, and others.
 
@@ -237,20 +237,27 @@
   "String containing the package manager to use.
 
 See `system-packages-supported-package-managers' for a list of
-supported software. Tries to be smart about selecting the
+supported software.  Tries to be smart about selecting the
 default."
   :type 'symbol)
 
 (defcustom system-packages-usesudo
   (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager
 
system-packages-supported-package-managers
-  "If non-nil, system-packages will use sudo for appropriate
-  commands. Tries to be smart for selecting the default.")
+  "If non-nil, system-packages uses sudo for appropriate commands.
 
-(defun system-packages--run-command (action &optional pack)
-  "ACTION can be `default-sudo', `install', `search',
-`uninstall' etc. Run the command according to
-`system-packages-supported-package-managers' and ACTION."
+Tries to be smart for selecting the default.")
+
+(defun system-packages--run-command (action &optional pack args)
+  "Run a command that affects system packages.
+
+ACTION can be `default-sudo', `install', `search', `uninstall'
+etc.  Run the command according to
+`system-packages-supported-package-managers' and ACTION.  PACK is
+used to operation on specific packages.
+
+ARGS gets passed to the command and is useful for passing options
+to the package manager."
   (let ((command
  (cdr (assoc action (cdr (assoc system-packages-packagemanager
 
system-packages-supported-package-managers))
@@ -261,106 +268,138 @@ default."
 (when system-packages-usesudo
   (setq command (mapcar (lambda (part) (concat "sudo " part)) command)))
 (setq command (mapconcat 'identity command " && "))
-(async-shell-command (mapconcat 'identity (list command pack) " ") 
"*system-packages*")))
+(setq command (mapconcat 'identity (list command pack) " "))
+(when args
+  (setq command (concat command args)))
+(async-shell-command command "*system-packages*")))
 
 
 ;; functions on named packages
 
 
 ;;;###autoload
-(defun system-packages-install (pack)
-  "Installs system packages using the package manager named in
-system-packages-packagemanager."
-  (interactive "sWhat package to install: ")
-  (system-packages--run-command 'install pack))
+(defun system-packages-install (pack &optional args)
+  "Install system packages.
+
+Use the package manager from `system-packages-packagemanager' to
+install PACK.  You may use ARGS to pass options to the package
+manger."
+  (system-packages--run-command 'install pack args))
 
 ;;;###autoload
-(defun system-packages-search (pack)
-  "Search for system packages using the package manager named in
-system-packages-packagemanager."
+(defun system-packages-search (pack &optional args)
+  "Search for system packages.
+
+Use the package manager named in `system-packages-packagemanager'
+to search for PACK.  You may use ARGS to pass options to the
+package manager."
   (interactive "sSearch string: ")
-  (system-packages--run-command 'search pack))
+  (system-packages--run-command 'search pack args))
 
 ;;;###autoload
-(defun system-packages-uninstall (pack)
-  "Uninstalls installed system packages using the package manager named in
-system-packages-packagemanager."
+(defun system-packages-uninstall (pack &optional args)
+  "Uninstall system packages.
+
+Uses the package manager named in
+`system-packages-packagemanager' to uninstall PACK.  You may use
+ARGS to pass options to the package manager."
   (interactive "sWhat package to uninstall: ")
-  (system-packages--run-command 'uninstall pack))
+  (system-packages--run-command 'uninstall pack args))
 
 ;;;###autoload
-(defun system-packages-list-dependencies-of (pack)
-  "List all the dependencies of PACK."
+(defun system-packages-list-dependencies-of (pack &optional args)
+  "List the dependencies of PACK.
+
+You may use ARGS to pass options to the package manager."
   (interactive "sWhat package to list dependencies of: ")
-  (system-packages--run-command 'list-dependencies-of pack))
+  (system-packages--run-command 'list-dependencies-

[elpa] externals/system-packages bc30966 050/117: Update readme

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit bc3096697cbb56cddebc82bfec72f900b7caed72
Author: Alex Branham 
Commit: Alex Branham 

Update readme
---
 README.org | 45 ++---
 1 file changed, 26 insertions(+), 19 deletions(-)

diff --git a/README.org b/README.org
index 19891d7..21ceea6 100644
--- a/README.org
+++ b/README.org
@@ -7,8 +7,9 @@ packages more convenient through emacs.
 
 * Installation
 
-  System packages is available on [[https://melpa.org/#/][MELPA]]. If you use 
[[https://github.com/jwiegley/use-package][use-package]] and
-  have MELPA set up correctly, all you'll need is something like the following:
+  System packages is available on [[https://melpa.org/#/][MELPA]]. If you use 
[[https://github.com/jwiegley/use-package][use-package]] and have
+  MELPA set up correctly, all you'll need is something like the
+  following:
 
   #+BEGIN_SRC emacs-lisp :eval never
 (use-package system-packages
@@ -17,31 +18,37 @@ packages more convenient through emacs.
 
 * Configuration
   
-  The package attempts to guess which package manager you use. If it
+  The package attempts to guess which package manager you use.  If it
   guesses wrong (or you'd like to set it manually), you may modify the
-  variable =system-packages-packagemanager=. 
+  variable =system-packages-packagemanager=.
 
   We also attempt to guess whether or not to use sudo with appropriate
   commands (like installing and uninstalling packages). Some package
   managers (like homebrew) warn not to use sudo, others (like =apt=)
   need sudo privileges. You may set this manually by configuring
-  =system-packages-usesudo=
+  =system-packages-usesudo=.
+
+  Other package customization options can be accessed with M-x
+  =customize-group RET system-packages RET=.
 
 * Supported package managers
-Currently, =system-packages= knows about the following package managers.
-You can see exactly what commands are associated with =system-packages= 
commands by checking =system-packages-supported-package-managers=.
-The default package manager that we use is the first one found from this list:
-- brew
-- pacaur
-- pacman
-- aptitude
-- apt
-- emerge
-- zypper
-- dnf
+  Currently, =system-packages= knows about the following package managers.
+  You can see exactly what commands are associated with =system-packages=
+  commands by checking =system-packages-supported-package-managers=.  The
+  default package manager that we use is the first one found from this
+  list:
+
+  - brew
+  - pacaur
+  - pacman
+  - aptitude
+  - apt
+  - emerge
+  - zypper
+  - dnf
 
 * Usage
 
-  The package doesn't presume to set keybindings for you, so you may
-  set those up yourself or simply call functions with =M-x=. All
-  functions start with =system-packages=
+  The package doesn't presume to set keybindings for you, so you may set
+  those up yourself or simply call functions with =M-x=. All commands
+  start with =system-packages=



[elpa] externals/system-packages 5b3f7f5 036/117: Whether to use sudo or not should be defcustom not defvar

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 5b3f7f5ae08d306604423f48e9a2ab5daaf58584
Author: Alex Branham 
Commit: Alex Branham 

Whether to use sudo or not should be defcustom not defvar
---
 system-packages.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 9e4cdd1..664750d 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -204,7 +204,7 @@ supported software. Tries to be smart about selecting the
 default."
   :type 'symbol)
 
-(defvar system-packages-usesudo
+(defcustom system-packages-usesudo
   (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager
 
system-packages-supported-package-managers
   "If non-nil, system-packages will use sudo for appropriate



[elpa] externals/system-packages 41c294b 112/117: Fix tests

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 41c294bb1e333b8c1ff1b9a853e52521cc4e0c03
Author: Alex Branham 
Commit: Alex Branham 

Fix tests
---
 test/system-packages-test.el | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/test/system-packages-test.el b/test/system-packages-test.el
index a392d4f..f519406 100644
--- a/test/system-packages-test.el
+++ b/test/system-packages-test.el
@@ -45,7 +45,4 @@
   "Error when we don't know a command."
   (should-error
(let ((system-packages-package-manager 'pacaur))
- (system-packages-get-command 'install)))
-  (should-error
-   (let ((system-packages-package-manager 'guix))
- (system-packages-get-command 'clean-cache
+ (system-packages-get-command 'install



[elpa] externals/system-packages 15ba684 043/117: Add Macports

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 15ba68484c872b37b103aeabc9acec94b805754a
Author: Jimmy Yuen Ho Wong 
Commit: Jimmy Yuen Ho Wong 

Add Macports
---
 system-packages.el | 17 +
 1 file changed, 17 insertions(+)

diff --git a/system-packages.el b/system-packages.el
index 6b6a5ed..f723f33 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -67,6 +67,23 @@
(list-installed-packages . "brew list --installed")
(list-installed-packages-all . "brew list")
(list-dependencies-of . "brew deps")))
+(port .
+  ((default-sudo . t)
+   (install . "port install")
+   (search . "port search")
+   (uninstall . "port uninstall")
+   (update . ("port upgrade" "port upgrade outdated"))
+   (clean-cache . "port clean --all")
+   (log . "port log")
+   (get-info . "port info")
+   (get-info-remote . nil)
+   (list-files-provided-by . "port contents")
+   (verify-all-packages . nil)
+   (verify-all-dependencies . nil)
+   (remove-orphaned . "port uninstall leaves")
+   (list-installed-packages . "port list installed")
+   (list-installed-packages-all . "port list installed")
+   (list-dependencies-of . "port deps")))
 ;; Arch-based systems
 (pacaur .
 ((default-sudo . nil)



[elpa] externals/system-packages feaf28c 059/117: Remove unneeded version line

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit feaf28c2e6e29ad0c08e1075c64e9049359ac141
Author: Alex Branham 
Commit: Alex Branham 

Remove unneeded version line
---
 system-packages.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 043a9f8..9a2ba9b 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -5,7 +5,6 @@
 ;; Author: J. Alexander Branham 
 ;; Maintainer: J. Alexander Branham 
 ;; URL: https://github.com/jabranham/system-packages
-;; Version: 0.1
 ;; Package-Requires: ((cl-lib "0.5"))
 
 ;; This file is not part of GNU Emacs.



[elpa] externals/system-packages 5124f57 038/117: add lexical-binding t

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 5124f571663214a2e3aae06355f6648a439c2eb4
Author: Alex Branham 
Commit: Alex Branham 

add lexical-binding t
---
 system-packages.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 9773b23..7762de7 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -1,4 +1,4 @@
-;;; system-packages.el --- functions to manage system packages
+;;; system-packages.el --- functions to manage system packages -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2016-2017 J. Alexander Branham
 



[elpa] externals/system-packages 9e5532b 090/117: Require Emacs 24.3

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 9e5532bbed819e6736922d2da2615a2fa4433cea
Author: Alex Branham 
Commit: Alex Branham 

Require Emacs 24.3
---
 system-packages.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index ae9168b..8ef1828 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -5,7 +5,9 @@
 ;; Author: J. Alexander Branham 
 ;; Maintainer: J. Alexander Branham 
 ;; URL: https://github.com/jabranham/system-packages
-;; Package-Requires: ((cl-lib "0.5"))
+;; Package-Requires: ((emacs "24.3"))
+;; Version: 1.0.3.9000
+
 
 ;; This file is not part of GNU Emacs.
 



[elpa] externals/system-packages 1ec26d1 045/117: Add macports

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 1ec26d1d32a95de6f201571d85f4f12b9975c580
Merge: 4efd204 3f9b67b
Author: Alex Branham 
Commit: Alex Branham 

Add macports

PR issue #12
---
 system-packages.el | 17 +
 1 file changed, 17 insertions(+)

diff --git a/system-packages.el b/system-packages.el
index 6b6a5ed..d9fd261 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -67,6 +67,23 @@
(list-installed-packages . "brew list --installed")
(list-installed-packages-all . "brew list")
(list-dependencies-of . "brew deps")))
+(port .
+  ((default-sudo . t)
+   (install . "port install")
+   (search . "port search")
+   (uninstall . "port uninstall")
+   (update . ("port sync" "port upgrade outdated"))
+   (clean-cache . "port clean --all")
+   (log . "port log")
+   (get-info . "port info")
+   (get-info-remote . nil)
+   (list-files-provided-by . "port contents")
+   (verify-all-packages . nil)
+   (verify-all-dependencies . nil)
+   (remove-orphaned . "port uninstall leaves")
+   (list-installed-packages . "port installed")
+   (list-installed-packages-all . "port installed")
+   (list-dependencies-of . "port deps")))
 ;; Arch-based systems
 (pacaur .
 ((default-sudo . nil)



[elpa] externals/system-packages 07c4faa 026/117: Use defcustom for customizable variable

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 07c4faad97a1f22c08b88c67333712677d0255ad
Author: Syohei YOSHIDA 
Commit: Syohei YOSHIDA 

Use defcustom for customizable variable
---
 system-packages.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index 7fd8255..f885495 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -117,14 +117,15 @@
(list-installed-packages . "brew list")
(list-installed-packages-all . nil)
 
-(defvar system-packages-packagemanager
+(defcustom system-packages-packagemanager
   (cl-loop for (name . prop) in system-packages-supported-package-managers
for path = (executable-find (symbol-name name))
when path
return name)
   "String containing the package manager to use. Currently
 system-packages supports pacman, pacaur, apt, and
-homebrew. Tries to be smart about selecting the default.")
+homebrew. Tries to be smart about selecting the default."
+  :type 'symbol)
 
 (defvar system-packages-usesudo
   (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager



[elpa] externals/system-packages bace616 001/117: Initial commit

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit bace616707bdaf3a8512fe1ba54f7cb6b170b252
Author: Alex Branham 
Commit: Alex Branham 

Initial commit
---
 LICENSE | 674 
 1 file changed, 674 insertions(+)

diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..9cecc1d
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,674 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. 
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly o

[elpa] externals/system-packages ccc2a6b 041/117: Add support for xbps, used by void linux

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit ccc2a6b3794b6ada59905ee609fe9e1d973622aa
Author: Alex Branham 
Commit: Alex Branham 

Add support for xbps, used by void linux
---
 system-packages.el | 22 +-
 1 file changed, 21 insertions(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 61fd923..97b6ad3 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -190,7 +190,27 @@
   (remove-orphaned . "dnf autoremove")
   (list-installed-packages . "dnf list --installed")
   (list-installed-packages-all . nil)
-  (list-dependencies-of . "rpm -qR")
+  (list-dependencies-of . "rpm -qR")))
+;; Void
+;; xbps is the name of the package manager, but that doesn't appear as an
+;; executable, so let's just call it xbps-install:
+(xbps-install .
+  ((default-sudo . t)
+   (install . "xbps-install")
+   (search . "xbps-query -Rs")
+   (uninstall . "xbps-remove -R")
+   (update . ("xbps-install -Su"))
+   (clean-cache . "xbps-remove -O")
+   (log . nil)
+   (get-info . "xbps-query")
+   (get-info-remote . "xbps-query -R")
+   (list-files-provided-by . "xbps-query -f")
+   (verify-all-packages . nil)
+   (verify-all-dependencies . "xbps-pkgdb -a")
+   (remove-orphaned . "dnf autoremove")
+   (list-installed-packages . "xbps-query -l ")
+   (list-installed-packages-all . "xbps-query -l ")
+   (list-dependencies-of . "xbps-query -x")
 
 (defcustom system-packages-packagemanager
   (cl-loop for (name . prop) in system-packages-supported-package-managers



[elpa] externals/system-packages bd51c53 069/117: travis: spit out Emacs version

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit bd51c53d5e580a0024d53c230de4e0298f64c93d
Author: Alex Branham 
Commit: Alex Branham 

travis: spit out Emacs version
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index f4e31df..3e5a4a6 100644
--- a/Makefile
+++ b/Makefile
@@ -12,4 +12,4 @@ all: compile
 compile: $(ELC)
 
 %.elc: %.el
-   $(EMACS_BATCH) --eval "(progn (setq byte-compile-error-on-warn t) 
(batch-byte-compile))" $<
+   $(EMACS_BATCH) --eval "(progn (message (emacs-version)) (setq 
byte-compile-error-on-warn t) (batch-byte-compile))" $<



[elpa] externals/system-packages df01469 113/117: Ensure a space between command and args

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit df014690006be372fa3ef156a61d41ea4df9d8be
Author: Alex Branham 
Commit: Alex Branham 

Ensure a space between command and args
---
 system-packages.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 14bf173..28021de 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -347,7 +347,7 @@ of passing additional arguments to the package manager."
 (setq command (mapconcat 'identity (list command pack) " "))
 (when noconfirm
   (setq args (concat args (and pack " ") noconfirm)))
-(concat command args)))
+(concat command " " args)))
 
 (defun system-packages--run-command (action &optional pack args)
   "Run a command asynchronously using the system's package manager.



[elpa] externals/system-packages ba902ce 071/117: Mention helm-system-packages in commentary and README

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit ba902ce6602649aefda675e3c3cfcf20ac7995f2
Author: Alex Branham 
Commit: Alex Branham 

Mention helm-system-packages in commentary and README
---
 README.org | 2 ++
 system-packages.el | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/README.org b/README.org
index 336b604..400ad23 100644
--- a/README.org
+++ b/README.org
@@ -87,3 +87,5 @@ You may then need to adjust =system-packages-package-manager= 
and
   (setq system-packages-use-sudo t)
   (setq system-packages-package-manager "pacaur")
 #+END_SRC
+* See also
+Helm users might like 
[[https://github.com/emacs-helm/helm-system-packages][helm-system-packages]]
diff --git a/system-packages.el b/system-packages.el
index c21b81b..0387e8b 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -31,6 +31,9 @@
 ;; functions include installing packages, removing packages, listing
 ;; installed packages, and others.
 
+;; Helm users might also be interested in helm-system-packages.el
+;; 
+
 ;; Usage:
 
 ;; (require 'system-packages)



[elpa] externals/system-packages e821fa2 056/117: Drop support for pacaur

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit e821fa2ec72ffde6e12d2fded6ab4f40e6ae970f
Author: Alex Branham 
Commit: Alex Branham 

Drop support for pacaur

It's now unmaintained.  I'll add instructions to the README on how to
add it back.
---
 README.org |  1 -
 system-packages.el | 18 --
 2 files changed, 19 deletions(-)

diff --git a/README.org b/README.org
index df68f52..e2c5c63 100644
--- a/README.org
+++ b/README.org
@@ -40,7 +40,6 @@ packages more convenient through emacs.
 
   - brew
   - macports
-  - pacaur
   - pacman
   - apt
   - aptitude
diff --git a/system-packages.el b/system-packages.el
index 643cfeb..83111d9 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -87,24 +87,6 @@
(list-dependencies-of . "port deps")
(noconfirm . nil)))
 ;; Arch-based systems
-(pacaur .
-((default-sudo . nil)
- (install . "pacaur -S")
- (search . "pacaur -Ss")
- (uninstall . "pacaur -Rs")
- (update . "pacaur -Syu")
- (clean-cache . "pacaur -Sc")
- (log . "cat /var/log/pacman.log")
- (get-info . "pacaur -Qi")
- (get-info-remote . "pacaur -Si")
- (list-files-provided-by . "pacaur -Ql")
- (verify-all-packages . "pacaur -Qkk")
- (verify-all-dependencies . "pacaur -Dk")
- (remove-orphaned . "pacaur -Rns $(pacman -Qtdq)")
- (list-installed-packages . "pacaur -Qe")
- (list-installed-packages-all . "pacaur -Q")
- (list-dependencies-of . "pacaur -Qi")
- (noconfirm . "--noconfirm")))
 (pacman .
 ((default-sudo . t)
  (install . "pacman -S")



[elpa] externals/system-packages d89ee30 051/117: Mention macports in readme

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit d89ee30f69a2ef3485b16eda788eeb49db09c37a
Author: Alex Branham 
Commit: Alex Branham 

Mention macports in readme
---
 README.org | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README.org b/README.org
index 21ceea6..e4e1321 100644
--- a/README.org
+++ b/README.org
@@ -39,6 +39,7 @@ packages more convenient through emacs.
   list:
 
   - brew
+  - macports
   - pacaur
   - pacman
   - aptitude



[elpa] externals/system-packages da5835a 027/117: Merge pull request #9 from syohex/fix-package

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit da5835a1f767a2783185348683e35bb99ec53658
Merge: 47cef47 07c4faa
Author: Alex Branham 
Commit: GitHub 

Merge pull request #9 from syohex/fix-package

Fix package
---
 system-packages.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/system-packages.el b/system-packages.el
index eb1c0aa..f885495 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -6,6 +6,7 @@
 ;; Maintainer: J. Alexander Branham 
 ;; URL: https://github.com/jabranham/system-packages
 ;; Version: 0.1
+;; Package-Requires: ((cl-lib "0.5"))
 
 ;; This file is not part of GNU Emacs.
 
@@ -38,8 +39,7 @@
 
 ;;; Code:
 
-(eval-when-compile
-  (require 'cl))
+(require 'cl-lib)
 
 (defgroup system-packages nil
   "Manages system packages"
@@ -117,14 +117,15 @@
(list-installed-packages . "brew list")
(list-installed-packages-all . nil)
 
-(defvar system-packages-packagemanager
+(defcustom system-packages-packagemanager
   (cl-loop for (name . prop) in system-packages-supported-package-managers
for path = (executable-find (symbol-name name))
when path
return name)
   "String containing the package manager to use. Currently
 system-packages supports pacman, pacaur, apt, and
-homebrew. Tries to be smart about selecting the default.")
+homebrew. Tries to be smart about selecting the default."
+  :type 'symbol)
 
 (defvar system-packages-usesudo
   (cdr (assoc 'default-sudo (cdr (assoc system-packages-packagemanager
@@ -196,3 +197,4 @@ named in system-packages-packagemanager. With
 (system-packages--run-command 'list-installed-packages)))

 (provide 'system-packages)
+;;; system-packages.el ends here



[elpa] externals/system-packages 360c427 020/117: Adds comments to separate package managers

2018-12-14 Thread Stefan Monnier
branch: externals/system-packages
commit 360c427a1596efd6687eb6726a948b042e1c667c
Author: Alex Branham 
Commit: Alex Branham 

Adds comments to separate package managers
---
 system-packages.el | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/system-packages.el b/system-packages.el
index 977618b..c10bba6 100644
--- a/system-packages.el
+++ b/system-packages.el
@@ -48,7 +48,9 @@
   :group 'packages)
 
 (defconst system-packages-supported-package-managers
-  '((pacaur .
+  '(
+;; Arch-based systems
+(pacaur .
 ((default-sudo . nil)
  (install . "pacaur -S")
  (search . "pacaur -Ss")
@@ -66,6 +68,7 @@
  (remove-orphaned . "pacman -Rns $(pacman -Qtdq)")
  (list-installed-packages . "pacman -Qe")
  (list-installed-packages-all . "pacman -Q")))
+;; Debian (and Ubuntu) based systems
 (apt .
  ((default-sudo . t)
   (install . "apt-get install")
@@ -75,6 +78,8 @@
   (remove-orphaned . "apt-get autoremove")
   (list-installed-packages . nil)
   (list-installed-packages-all . nil)))
+  (list-installed-packages-all . nil)))
+;; Mac
 (brew .
   ((default-sudo . nil)
(install . "brew install")



  1   2   >