[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 620685a 11/53: Add git and github reference s
From: |
Robert Weiner |
Subject: |
[elpa] externals/hyperbole 620685a 11/53: Add git and github reference support for branches, issues, pull requests and tags. |
Date: |
Wed, 15 Nov 2017 22:47:00 -0500 (EST) |
branch: externals/hyperbole
commit 620685a8748476fff4df1749efd817ce2efeb08f
Author: Bob Weiner <address@hidden>
Commit: Bob Weiner <address@hidden>
Add git and github reference support for branches, issues, pull requests
and tags.
2017-09-22 Bob Weiner <address@hidden>
* hact.el (actype:act): Expand arguments as pathnames only in functions
defined with defact (actions may be regular defuns as well).
* hib-social.el (github-reference): Added support for listing all active or
showing
individual branches, issues, pull requests and commit tags. See the
doc string for this function and the examples in the file commentary.
(git-reference): Added support for listing all active or
showing
individual branches and commit tags. See the doc string for this
function and
the examples in the file commentary.
(defact*): Changed all these to regular functions to
prevent Hyperbole from trying to expand their arguments as pathnames.
2017-09-21 Bob Weiner <address@hidden>
* hui-mouse.el (smart-helm): Added: On a source section header, moves to
the next source
section or first if on last. But this doesn't yet work properly (helm
is scrolling
the buffer and not leaving point in the proper location).
* hui-mini.el (hyperbole): Removed interactive use of prefix argument to
set doc-flag and
help-string-flag parameters since this didn't interactively display
doc. Instead,
this change lets the prefix arg flow through to any menu commands that
can use it.
* hib-social.el: Added full Commentary with implicit link examples.
---
Changes | 28 +++++++
hact.el | 11 ++-
hib-social.el | 261 ++++++++++++++++++++++++++++++++++++++++++++++++----------
hui-mini.el | 2 +-
hui-mouse.el | 7 +-
5 files changed, 260 insertions(+), 49 deletions(-)
diff --git a/Changes b/Changes
index 3996e62..f960dd4 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,31 @@
+2017-09-22 Bob Weiner <address@hidden>
+
+* hact.el (actype:act): Expand arguments as pathnames only in functions
+ defined with defact (actions may be regular defuns as well).
+
+* hib-social.el (github-reference): Added support for listing all active or
showing
+ individual branches, issues, pull requests and commit tags. See the
+ doc string for this function and the examples in the file commentary.
+ (git-reference): Added support for listing all active or
showing
+ individual branches and commit tags. See the doc string for this function
and
+ the examples in the file commentary.
+ (defact*): Changed all these to regular functions to
+ prevent Hyperbole from trying to expand their arguments as pathnames.
+
+2017-09-21 Bob Weiner <address@hidden>
+
+* hui-mouse.el (smart-helm): Added: On a source section header, moves to the
next source
+ section or first if on last. But this doesn't yet work properly (helm is
scrolling
+ the buffer and not leaving point in the proper location).
+
+* hui-mini.el (hyperbole): Removed interactive use of prefix argument to set
doc-flag and
+ help-string-flag parameters since this didn't interactively display doc.
Instead,
+ this change lets the prefix arg flow through to any menu commands that can
use it.
+
+* hib-social.el: Added full Commentary with implicit link examples.
+
+----
+
2017-09-20 Bob Weiner <address@hidden>
* DEMO (Git References): Added.
diff --git a/hact.el b/hact.el
index d19119f..9b94e50 100644
--- a/hact.el
+++ b/hact.el
@@ -222,13 +222,18 @@ If value is nil, however, t is returned instead, to
ensure that implicit button
types register the performance of the action. ACTYPE may be a symbol or symbol
name for either an action type or a function. Runs `action-act-hook' before
performing ACTION."
- ;; Needed so relative paths are expanded properly.
- (setq args (action:path-args-abs args))
(let ((prefix-arg current-prefix-arg)
(action (actype:action actype))
(act '(apply action args)))
(if (null action)
(error "(actype:act): Null action for: `%s'" actype)
+ ;; Next 2 lines are needed so that relative paths are expanded
+ ;; properly but in rare cases, it can improperly expand simple
+ ;; string arguments like, "tags", as a pathname when it is not
+ ;; being used as a path. So do this only if actype is a defact
+ ;; and not a defun to limit any potential impact. RSW - 9/22/2017
+ (if (symbolp action) (string-match "\\'actypes::" (symbol-name action))
+ (setq args (action:path-args-abs args)))
(let ((hist-elt (hhist:element)))
(run-hooks 'action-act-hook)
(prog1 (or (cond ((or (symbolp action) (listp action)
@@ -252,7 +257,7 @@ ACTYPE may be a Hyperbole actype or Emacs Lisp function."
(setq actname actype
actype (intern actype))
(setq actname (symbol-name actype)))
- (cond ((htype:body (if (string-match "^actypes::" actname)
+ (cond ((htype:body (if (string-match "\\'actypes::" actname)
actype
(intern-soft (concat "actypes::" actname)))))
((fboundp actype) actype)
diff --git a/hib-social.el b/hib-social.el
index e004d92..ee095bf 100644
--- a/hib-social.el
+++ b/hib-social.el
@@ -12,15 +12,102 @@
;;; Commentary:
;;
;; This defines an implicit button type, social-reference, that displays
-;; the web page associated with the given hashtag or username.
+;; information (often a web page) associated with the given hashtag or
username.
+;; When the referent is a web page, this calls the function given by
+;; `hibtypes-social-display-function' to display it, initially set to
`browse-url'.
;;
-;; A hashtag reference is either:
[facebook|git|github|instagram|twitter]?#<hashtag>
-;; or [fb|gh|gt|in|tw]?#<hashtag>.
+;; A hashtag reference is either:
[facebook|github|git|instagram|twitter]?#<hashtag>
+;; or using 2-letter service abbreviations: [fb|gh|gt|in|tw]?#<hashtag>.
;;
;; A username reference is either:
[facebook|github|instagram|twitter]?@<username>
;; or [fb|gh|in|tw]?@<username>.
;;
-;; If the social media service is not given, it defaults to \"twitter\".
+;; If the social media service is not given, it defaults to the value of
+;; `hibtypes-social-default-service', initially set to \"twitter\".
+;;
+;; Below are a list of examples; simply press the Action Key on each one
+;; to test it; use the Assist Key to see what it will do. The git
+;; examples require that you have a local git clone of the Hyperbole
+;; repository.
+
+;; address@hidden Display user's home page
+;; address@hidden
+;; address@hidden
+;; address@hidden
+
+;; fb#technology Display page of hashtag
matches
+;; in#art
+;; tw#travel
+
+;; Git (local) reference links
+;;
+;; git#branches List branches in current
repo/project
+;; git#commits List commits in current
project
+;; git#tags List tags in current project
+;;
+;; git#/hyperbole From any buffer, dired on the
top
+;; directory of the local
hyperbole
+;; project
+;;
+;; git#/hyperbole/55a1f0 or From any buffer, display
hyperbole
+;; git#hyperbole/55a1f0 local git commit diff
+;;
+;; git#55a1f0 Based on current
default-directory,
+;; display current repo's local
git
+;; commit diff; works when
default-directory
+;; is inside a git project with
commit
+;; hashtag 55a1f0
+;;
+;; (setq hibtypes-git-default-project "hyperbole")
+;; git#55a1f0 From any buffer, once the
above default
+;; is set, display current
project's local
+;; git commit diff
+;; git#master Shows latest commit diff for
branch
+;; git#hyperbole-6.0.2 From any buffer, show the
commit diff
+;; for tag `hyperbole-6.0.2'
+;;
+;; When you want to be more explicit, use:
+;;
+;; git#commit/55a1f0
+;; git#branch/master
+;; git#tag/hyperbole-6.0.2
+
+;; Github (remote) reference links
+;;
+;; address@hidden Display user's home page
& projects
+;;
+;; github#rswgnu/hyperbole Display user's project
+;; gh#rswgnu/helm/global_mouse Display user project's branch
+;; gh#rswgnu/hyperbole/55a1f0 Display user project's commit
diff
+;;
+;; (setq hibtypes-github-default-user "rswgnu")
+;; github#/hyperbole Display default user's project
+;;
+;;
+;; Once you set the default user and project variables, you can leave
+;; them off any reference links:
+;;
+;; (setq hibtypes-github-default-user "emacs-helm")
+;; (setq hibtypes-github-default-project "helm")
+;;
+;; like so:
+;;
+;; gh#issues List emacs-helm/helm's open
issues
+;; gh#1878 Display a specific project
issue
+;;
+;; gh#pulls List project's open pull
requests
+;; gh#pull/1871 Display a specific project
pull request
+;;
+;; gh#branches List project's branches
+;; gh#branch/global_mouse List files in a specific
branch
+;; gh#global_mouse You can even leave off the
`branch' keyword
+;;
+;; gh#tags List project's tagged
commits, typically releases
+;; gh#tag/v2.8.4 or gh#v2.8.4 List files in a specific
tagged commit
+;;
+;; gh#commits List project's commits
+;; gh#898e55c Display default user and
default
+;; project commit diff
;;; Code:
;;; ************************************************************************
@@ -70,8 +157,8 @@
(defconst hibtypes-social-hashtag-alist
'(("\\`\\(fb\\|facebook\\)\\'" . "https://www.facebook.com/hashtag/%s")
- ("\\`\\(gh\\|github\\)\\'" . "https://github.com/%s/%s/commit/%s")
- ("\\`\\(gt\\|git\\)\\'" . "(cd %s; git show %s)")
+ ("\\`\\(gh\\|github\\)\\'" . "https://github.com/%s/%s/%s%s")
+ ("\\`\\(gt\\|git\\)\\'" . "(cd %s; git %s %s)")
("\\`\\(in\\|instagram\\)\\'" .
"https://www.instagram.com/explore/tags/%s/")
("\\`\\(tw\\|twitter\\)\\'" .
"https://twitter.com/search?q=%%23%s&src=hashtag")
)
@@ -127,8 +214,8 @@ listed in `hibtypes-social-inhibit-modes'."
(let ((ref (match-string-no-properties 1)))
(delq nil (mapcar (lambda (regexp) (string-match regexp
ref))
(mapcar #'car
hibtypes-social-hashtag-alist)))))
+ ;; Heuristic to ensure this is not an email address
(save-match-data
- ;; Heuristic to ensure this is not an email address
(not (and (looking-at mail-address-regexp)
(let ((case-fold-search t))
(string-match mail-address-tld-regexp
@@ -138,70 +225,113 @@ listed in `hibtypes-social-inhibit-modes'."
(ibut:label-set (match-string-no-properties 0) (match-beginning 0)
(match-end 0)))
(let ((ref (match-string-no-properties 0))
(service (match-string-no-properties 1))
- (ref-type-str (match-string-no-properties 2))
+ (ref-kind-str (match-string-no-properties 2))
(after-hash-str (match-string-no-properties 3)))
(cond ((string-match "\\`\\(gt\\|git\\)#" ref)
(hact 'git-reference after-hash-str))
((string-match "\\`\\(gh\\|github\\)#" ref)
(hact 'github-reference after-hash-str))
- (t (hact 'social-reference service ref-type-str after-hash-str))))))
+ (t (hact 'social-reference service ref-kind-str after-hash-str))))))
-(defact social-reference (service ref-type-str hashtag-or-username)
- "Display the web page at social media SERVICE for REF-TYPE-STR and
HASHTAG-OR-USERNAME.
-REF-TYPE-STR is either \"#\" for a hashtag reference or \"@\" for a username
reference."
+;; Don't make this a defact or its arguments may be improperly expanded as
pathnames.
+(defun social-reference (service ref-kind-str hashtag-or-username)
+ "Display the web page at social media SERVICE for REF-KIND-STR and
HASHTAG-OR-USERNAME.
+REF-KIND-STR is either \"#\" for a hashtag reference or \"@\" for a username
reference."
(if (or (null service) (equal service "")) (setq service
hibtypes-social-default-service))
(let ((case-fold-search t)
expr-to-format)
- (when (or (and (equal ref-type-str "#")
+ (when (or (and (equal ref-kind-str "#")
(setq expr-to-format
(assoc-default service hibtypes-social-hashtag-alist
#'string-match)))
- (and (equal ref-type-str "@")
+ (and (equal ref-kind-str "@")
(setq expr-to-format
(assoc-default service hibtypes-social-username-alist
#'string-match))))
(if expr-to-format
(funcall hibtypes-social-display-function (format expr-to-format
hashtag-or-username))
(error "(social-reference): Service `%s' does not support reference
format, `%s%s'"
- service ref-type-str hashtag-or-username)))))
+ service ref-kind-str hashtag-or-username)))))
;;; Remote Github commit references
-(defact github-reference (reference &optional user project)
- "Display the Github entity associated with REFERENCE and optional USER and
PROJECT.
-REFERENCE is of the form:
- <commit-hashtag>
- <user>/<project>/<commit-hashtag>
- <project>/<commit-hashtag>
+;; Don't make this a defact or its arguments may be improperly expanded as
pathnames.
+(defun github-reference (reference &optional user project)
+ "Display the Github entity associated with REFERENCE and optional USER and
PROJECT.
+REFERENCE is a string of the form:
+ <ref-item>
+ <user>/<project>/<ref-item>
+ <project>/<ref-item>
or /<project>.
+
+<ref-item> is one of these:
+ one of the words: branches, commits, issues, pulls, or tags; the associated
items are listed;
+
+ one of the words: branch, commit, issue, pull or tag followed by a '/' and
+ item id; the item is shown;
+
+ an issue reference given by a positive integer, e.g. 92 or prefaced with
GH-, e.g. GH-92;
+ the issue is displayed;
+
+ a commit reference given by a hex number, 55a1f0; the commit diff is
displayed;
+
+ a branch or tag reference given by an alphanumeric name, e.g. hyper20; the
+ files in the branch are listed.
+
USER defaults to the value of `hibtypes-github-default-user'.
If given, PROJECT overrides any project value in REFERENCE. If no
PROJECT value is provided, it defaults to the value of
`hibtypes-github-default-project'."
(if (or (null reference) (equal reference ""))
- (error "(github-reference): Github commit hashtag must not be empty")
+ (error "(github-reference): Github reference must not be empty")
(let ((case-fold-search t)
- (url-to-format (assoc-default "github" hibtypes-social-hashtag-alist
#'string-match)))
+ (url-to-format (assoc-default "github" hibtypes-social-hashtag-alist
#'string-match))
+ (ref-type))
(when url-to-format
- (cond ((string-match
"\\`/?\\(\\([^/address@hidden)/\\)?\\([^/address@hidden)/\\([0-9a-fA-F]+\\)\\'"
reference)
- ;; /?[user/]project/hashcode
- (setq user (or user (match-string-no-properties 2 reference))
- project (or project (match-string-no-properties 3
reference))
- reference (match-string-no-properties 4 reference)))
+ (cond ((string-match "\\`\\(branch\\|commit\\|issue\\|pull\\|tag\\)/"
reference)
+ ;; [branch | commit | issue | pull | tag]/ref-item
+ nil)
((string-match
"\\`/?\\(\\([^/address@hidden)/\\)\\([^/address@hidden)\\'" reference)
;; /?user/project
(setq user (or user (match-string-no-properties 2 reference))
project (or project (match-string-no-properties 3
reference))
reference nil))
+ ((string-match
"\\`/?\\(\\([^/address@hidden)/\\)?\\([^/address@hidden)/\\(address@hidden)\\'"
reference)
+ ;; /?[user/]project/ref-item
+ (setq user (or user (match-string-no-properties 2 reference))
+ project (or project (match-string-no-properties 3
reference))
+ reference (match-string-no-properties 4 reference)))
((string-match "\\`/\\([^/address@hidden)\\'" reference)
;; /project
(setq project (or project (match-string-no-properties 1
reference))
reference nil)))
(unless (stringp user) (setq user hibtypes-github-default-user))
(unless (stringp project) (setq project
hibtypes-github-default-project))
- (if (and (stringp user) (stringp project))
+ (when reference
+ (cond ((member reference '("branches" "commits" "issues" "pulls"
"tags"))
+ ;; All branches, commits, open issues, pull requests or commit
tags reference
+ (setq ref-type reference
+ reference ""))
+ ((and (< (length reference) 7) (string-match
"\\`\\([gG][hH]-\\)?[0-9]+\\'" reference))
+ ;; Specific issue reference
+ (setq ref-type "issues/"))
+ ((string-match "\\`\\(commit\\|issue\\|pull\\)/" reference)
+ ;; Specific reference preceded by keyword branch, commit,
+ ;; issue, or pull
+ (setq ref-type (substring reference 0 (match-end 0))
+ reference (substring reference (match-end 0))))
+ ((string-match "\\`[0-9a-f]+\\'" reference)
+ ;; Commit reference
+ (setq ref-type "commit/"))
+ (t
+ ;; Specific branch or commit tag reference
+ (setq ref-type "tree/")
+ (when (string-match "\\`\\(branch\\|tag\\)/" reference)
+ ;; If preceded by optional keyword, remove that from the
reference.
+ (setq reference (substring reference (match-end 0)))))))
+ (if (and (stringp user) (stringp project))
(funcall hibtypes-social-display-function
(if reference
- (format url-to-format user project reference)
- (format "https://github.com/%s/%s" user project)))
+ (format url-to-format user project ref-type reference)
+ (format url-to-format user project "" "")))
(cond ((and (null user) (null project))
(error "(github-reference): Set `hibtypes-github-default-user'
and `hibtypes-github-default-project'"))
((null user)
@@ -224,21 +354,21 @@ Return t if built, nil otherwise."
(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))
- locat-command
+ locate-command
"locate")
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")
t))
-(defun hibtypes-git-project-directory (project-name)
- "Given git PROJECT-NAME, return local git repository directory or nil if
none found."
+(defun hibtypes-git-project-directory (project)
+ "Given git PROJECT name, return local git repository directory or nil if
none found."
(if (or (and (file-readable-p hibtypes-git-repos-cache)
;; Non-zero file size
(not (zerop (nth 7 (file-attributes hibtypes-git-repos-cache)))))
(hibtypes-git-build-repos-cache t))
;; echo -n deletes trailing newline
- (shell-command-to-string (format "echo -n `grep -m1 '/%s$' %s`"
project-name hibtypes-git-repos-cache))
+ (shell-command-to-string (format "echo -n `grep -m1 '/%s$' %s`" project
hibtypes-git-repos-cache))
(message "")
nil))
@@ -246,14 +376,27 @@ Return t if built, nil otherwise."
;; 1. If within a git repo directory, use that repo unless specified in path
;; 2. If project name is given or is default, see if assocated repo dir is in
cache and use it.
;; 3. Prompt to rebuild locate db and then goto 2 if yes else quit
-;; 4. Run: (cd <dir-found>; git show <commit-hashcode>)
+;; 4. Run: (cd <dir-found>; git <cmd> <item>)
;; 5. Otherwise, do nothing.
-(defact git-reference (reference &optional project)
+;;
+;; Don't make this a defact or its arguments may be improperly expanded as
pathnames.
+(defun git-reference (reference &optional project)
"Display the git entity associated with REFERENCE and optional PROJECT.
REFERENCE is of the form:
- <commit-hashtag>
- /?<project>/<commit-hashtag>
+ <ref-item>
+ /?<project>/<ref-item>
or /<project>.
+
+<ref-item> is one of these:
+ one of the words: branches, commits, or tags; the associated items are
listed;
+
+ one of the words: branch, commit, or tag followed by a '/' and item id; the
item is shown;
+
+ a commit reference given by a hex number, 55a1f0; the commit diff is
displayed;
+
+ a branch or tag reference given by an alphanumeric name, e.g. hyper20; the
+ files in the branch are listed.
+
If given, PROJECT overrides any project value in REFERENCE. If no
PROJECT value is provided, it defaults to the value of
`hibtypes-git-default-project'."
@@ -262,7 +405,10 @@ PROJECT value is provided, it defaults to the value of
(let ((case-fold-search t)
(shell-cmd-to-format (assoc-default "git"
hibtypes-social-hashtag-alist #'string-match)))
(when shell-cmd-to-format
- (cond ((string-match "\\`/?\\([^/address@hidden)/\\([0-9a-fA-F]+\\)\\'"
reference)
+ (cond ((string-match "\\`\\(branch\\|commit\\|tag\\)/" reference)
+ ;; [branch | commit | tag]/ref-item
+ nil)
+ ((string-match "\\`/?\\([^/address@hidden)/\\([0-9a-f]+\\)\\'"
reference)
;; /?project/hashtag
(setq project (or project (match-string-no-properties 1
reference))
reference (match-string-no-properties 2 reference)))
@@ -274,6 +420,7 @@ PROJECT value is provided, it defaults to the value of
;; Invalid user/project/hashtag
(error "(git-reference): Username or path not allowed, only
<project>/<commit hashtag>")))
(let ((cmd)
+ (ref-type)
;; `project' now may be a project directory or a project name.
;; If a project name:
;; If reference is within a git project, use its project
directory.
@@ -286,7 +433,26 @@ PROJECT value is provided, it defaults to the value of
((stringp hibtypes-git-default-project)
hibtypes-git-default-project)))
(error "(git-reference): Set `hibtypes-git-default-project' to a
default project name")))
- (unless project-dir (setq project-dir (and project
(hibtypes-git-project-directory project))))
+ (unless project-dir
+ (setq project-dir (and project (hibtypes-git-project-directory
project))))
+ (when reference
+ (cond ((member reference '("branches" "commits" "tags"))
+ ;; All branches, commits or commit tags reference
+ (setq ref-type reference
+ reference ""))
+ ((string-match "\\`\\(commit\\)/" reference)
+ ;; Specific reference preceded by keyword commit.
+ (setq ref-type (substring reference 1 (match-end 1))
+ reference (substring reference (match-end 0))))
+ ((string-match "\\`[0-9a-f]+\\'" reference)
+ ;; Commit reference
+ (setq ref-type "commit"))
+ (t
+ ;; Specific branch or commit tag reference
+ (setq ref-type "tree/")
+ (when (string-match "\\`\\(branch\\|tag\\)/" reference)
+ ;; If preceded by optional keyword, remove that from the
reference.
+ (setq reference (substring reference (match-end 0)))))))
(if (or (null project-dir) (equal project-dir ""))
(if (and project
;; Maybe the Hyperbole git project cache is
@@ -302,12 +468,19 @@ PROJECT value is provided, it defaults to the value of
;; Ensure these do not invoke with-output-to-temp-buffer a
second time.
(let ((temp-buffer-show-hook)
(temp-buffer-show-function))
- (setq cmd (format shell-cmd-to-format project-dir
reference))
- (with-help-window (format "*git %s commit %s*" project
reference)
+ (setq cmd
+ (pcase ref-type
+ ("branches" (format shell-cmd-to-format
project-dir "branch -la" ""))
+ ("commits" (format shell-cmd-to-format
project-dir "log --abbrev-commit --pretty=oneline" ""))
+ ("tags" (format shell-cmd-to-format
project-dir "tag -l" ""))
+ (t (format shell-cmd-to-format
project-dir "show" reference))))
+ (with-help-window (format "*git %s %s%s%s*" project
ref-type
+ (if (not (equal reference ""))
" " "")
+ reference)
(princ (format "Command: %s\n\n" cmd))
(princ (shell-command-to-string cmd))))
;; Project-only reference, run dired on the project home
directory
- (hpath:display-buffer (dired-internal-noselect
+ (hpath:display-buffer (dired-noselect
(file-name-as-directory
project-dir)))))
(t (if project-dir
(error "(git-reference): git project `%s' directory is
unreadable or invalid: \"%s\""
diff --git a/hui-mini.el b/hui-mini.el
index 07678db..782ef51 100644
--- a/hui-mini.el
+++ b/hui-mini.el
@@ -64,7 +64,7 @@ non-nil means show documentation for any item that is
selected by the
user. HELP-STRING-FLAG non-nil means show only the first line of the
documentation, not the full text."
- (interactive (list nil nil (if current-prefix-arg t) (if current-prefix-arg
t)))
+ (interactive (list nil nil nil nil))
(if (and hui:menu-p (> (minibuffer-depth) 0))
(progn (beep) nil)
(unwind-protect
diff --git a/hui-mouse.el b/hui-mouse.el
index d2db531..6e8a3bf 100644
--- a/hui-mouse.el
+++ b/hui-mouse.el
@@ -816,9 +816,10 @@ Assumes Hyperbole has already checked that point is in a
helm buffer."
(defun smart-helm()
"Executes helm actions based on Action Key click locations:
On a candidate line, performs the candidate's first action and remains in
the minibuffer;
- On the first header line, displays a list of actions available for the
selected candidate;
+ On the top, fixed header line, displays a list of actions available for the
selected candidate;
On an action list line, performs the action after exiting the minibuffer;
At the end of the buffer, quits from helm and exits the minibuffer.
+ On a source section header, moves to the next source section or first if on
last.
On a candidate separator line, does nothing.
In the minibuffer window, ends the helm session and performs the selected
item's action."
(let ((non-text-area-p (and (eventp action-key-depress-args)
@@ -830,6 +831,10 @@ Assumes Hyperbole has already checked that point is in a
helm buffer."
(select-window (minibuffer-window)))
(when (and (smart-helm-alive-p) (not separator))
(let* ((key (kbd (cond
+ ;; Move to next source section or first
+ ;; if on last.
+ ((helm-pos-header-line-p) "C-o")
+ ;; Exit
(eob "C-g")
;; If line of the key press is the first /
;; header line in the window or outside the
- [elpa] externals/hyperbole ddd114d 01/53: 2016-08-12 Bob Weiner <address@hidden>, (continued)
- [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
- [elpa] externals/hyperbole 620685a 11/53: Add git and github reference support for branches, issues, pull requests and tags.,
Robert Weiner <=
- [elpa] externals/hyperbole 6b68100 40/53: Fixed predicate test in kbd-key:key-and-arguments., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole bf0e9fb 24/53: Added new git-find-file command and associated git#=file implicit button type., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 1a85b83 10/53: * DEMO (Git References): Added., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 67c00f5 42/53: Added additional Hyperbole Manual section changes., Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole ff17563 44/53: Use replace-regexp-in-string instead of replace-in-string, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole e2f6fbd 21/53: V6.0.2b; Fixed ebut creation argument prompting; Normal key seqs and ESC for meta allowed in HyControl, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 70b6a79 29/53: Added modeline drag to window to replace dest. buffer with source buffer; showed Hyperbole key bindings in menu, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 8f70846 45/53: Correct spelling, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole d1fb45a 15/53: File/Dir linking fix; Smart Key reloading; helm mouse control improvements; Hyperbole menu use doc strings, Robert Weiner, 2017/11/15
- [elpa] externals/hyperbole 2161b1c 22/53: Added hmouse-pulse-flag and more pulsing; fixed many small internal Hyperbole button handling functions., Robert Weiner, 2017/11/15