[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 1b40c4e 14/53: hib-social.el: When a git-refe
From: |
Robert Weiner |
Subject: |
[elpa] externals/hyperbole 1b40c4e 14/53: hib-social.el: When a git-reference is activated, trigger an error if `locate' command is not found. |
Date: |
Wed, 15 Nov 2017 22:47:00 -0500 (EST) |
branch: externals/hyperbole
commit 1b40c4eace8c33b180742124e9cd8a8e1a5f58de
Author: Bob Weiner <address@hidden>
Commit: Bob Weiner <address@hidden>
hib-social.el: When a git-reference is activated, trigger an error if
`locate' command is not found.
---
.hypb | Bin 2681 -> 2645 bytes
Changes | 8 ++++++--
hib-social.el | 18 ++++++++++--------
3 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/.hypb b/.hypb
index d5ddee3..38dedb9 100644
Binary files a/.hypb and b/.hypb differ
diff --git a/Changes b/Changes
index 1e3796d..3a1f450 100644
--- a/Changes
+++ b/Changes
@@ -1,10 +1,14 @@
+2017-09-24 Bob Weiner <address@hidden>
+
+* hib-social.el (hibtypes-git-get-locate-command): Added this function to
trigger an
+ error if locate command is not available when a git-reference is
activated. So
+ user knows what happened.
+
2017-09-23 Bob Weiner <address@hidden>
* hib-debbugs.el (debbugs-version-sufficient-p): Added to eliminate use of
version testing
function from package.el which some people prefer not to load.
-----
-
2017-09-22 Bob Weiner <address@hidden>
* hib-social.el (hibtypes-git-add-project-to-repos-cache)
diff --git a/hib-social.el b/hib-social.el
index 1255818..fa9f4e4 100644
--- a/hib-social.el
+++ b/hib-social.el
@@ -345,6 +345,13 @@ PROJECT value is provided, it defaults to the value of
(expand-file-name "Local-Git-Repos" hbmap:dir-user)
"Filename of cache of local git repository directories found by
`locate-command'.")
+(defun hibtypes-git-get-locate-command ()
+ (require 'locate)
+ (let ((cmd (if (string-match "locate" locate-command) locate-command
"locate")))
+ (if (executable-find cmd)
+ cmd
+ (error "(git-reference): \"locate\" command required but not found; see
its man page for setup instructions"))))
+
(defun hibtypes-git-build-repos-cache (&optional prompt-flag)
"Store cache of local git repo directories in `hibtypes-git-repos-cache'.
With optional prompt-flag non-nil, prompt user whether to build the cache
before building.
@@ -353,9 +360,7 @@ Return t if built, nil otherwise."
(y-or-n-p "Find all local git repositories (will take some time)?"))
(message "Please wait while all local git repositories are found...")
(unless (zerop (shell-command (format "%s -r \.git$ | sed -e 's+/.git$++'
> %s"
- (if (and (boundp 'locate-command)
(string-match "locate" locate-command))
- locate-command
- "locate")
+ (hibtypes-git-get-locate-command)
hibtypes-git-repos-cache)))
(error "(hibtypes-git-build-repos-cache): Cache build failed;
`locate-command' must accept `-r' argument for regexp matching"))
(message "Please wait while all local git repositories are found...Done")
@@ -367,11 +372,8 @@ Return the project directory found or nil if none."
(message "Please wait while %s's local git repository is found..." project)
(let ((project-dir (shell-command-to-string
(format "%s -l1 /%s/.git | sed -e 's+/.git++' | tr -d
'\n'"
- (if (and (boundp 'locate-command) (string-match
"locate" locate-command))
- locate-command
- "locate")
- project
- hibtypes-git-repos-cache))))
+ (hibtypes-git-get-locate-command)
+ project))))
(message "")
(when (and (> (length project-dir) 0) (= ?/ (aref project-dir 0)))
;; project-dir a directory, prepend it to the cache file...
- [elpa] externals/hyperbole updated (0539520 -> 9b2d75a), Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 4fdcb7d 02/53: 2016-08-17 Bob Weiner <address@hidden>, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 3aea4ee 07/53: Changes to hui-window.el had not been saved in prior commit., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole a2e2dc3 08/53: Made smart-helm ignore helm candidate separator lines., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole a6acb39 04/53: 2016-09-08 Bob Weiner <address@hidden>, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 488bb31 13/53: hib-debbugs.el: Removed dependency on package.el which some people don't want/need loaded., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 992870d 12/53: Speeded up search for and addition of a single git project to the dir cache., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 1b40c4e 14/53: hib-social.el: When a git-reference is activated, trigger an error if `locate' command is not found.,
Robert Weiner <=
- [elpa] externals/hyperbole ddd114d 01/53: 2016-08-12 Bob Weiner <address@hidden>, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 4ace769 17/53: Added brief pulsing/flashing from source line to line in destination buffer., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 632789b 18/53: Made Action Key display selected buffer menu item in the same window as the buffer menu., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole fed1547 09/53: * hib-social.el (hibtypes-social-default-service): Changed to use a radio, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole a933051 19/53: Supported Emacs button mouse action; improved Lisp outlining support; improved load library links, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 06d6cf1 16/53: V6.0.2a; Action Key drag from buffer, file and helm buffer item menus to another window to display., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 9457b27 03/53: * hmouse-drv.el (hkey-help-show): Modified to invoke help-mode only if buffer name includes 'Help' to, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 2b9d47e 33/53: Merge branch 'master' of git.sv.gnu.org:/srv/git/hyperbole with Mats assist-flag fix., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 943dba1 28/53: Added 'topwin' Python script to determine topmost app window at a screen position under macOS., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 2e55c34 31/53: Add defvar for assist-flag, Robert Weiner, 2017/11/15