[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole 21b2b1c 20/25: Use magit if available for git
From: |
Stefan Monnier |
Subject: |
[elpa] externals/hyperbole 21b2b1c 20/25: Use magit if available for git social button (#32) |
Date: |
Tue, 22 Sep 2020 10:29:29 -0400 (EDT) |
branch: externals/hyperbole
commit 21b2b1c456bc40596a2cf8ec231d24ff6d5911d2
Author: Mats Lidell <mats.lidell@lidells.se>
Commit: GitHub <noreply@github.com>
Use magit if available for git social button (#32)
* Use magit if available for git social button
* Use featurep and hpath:display-buffer
* Make git buttons magit behaviour configurable and default to off
---
hib-social.el | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/hib-social.el b/hib-social.el
index 92e1b5f..6760b1e 100644
--- a/hib-social.el
+++ b/hib-social.el
@@ -4,7 +4,7 @@
;;
;; Orig-Date: 20-Jul-16 at 22:41:34
;;
-;; Copyright (C) 2016-2017 Free Software Foundation, Inc.
+;; Copyright (C) 2016-2020 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
;;
;; This file is part of GNU Hyperbole.
@@ -198,6 +198,11 @@
:type 'string
:group 'hyperbole-button)
+(defcustom hibtypes-git-use-magit-status nil
+ "If magit is available then use git social button to display magit status
buffer."
+ :type 'boolean
+ :group 'hyperbole-button)
+
(defcustom hibtypes-github-default-project nil
"Default project name to associate with any Github commit link."
:type 'string
@@ -803,8 +808,12 @@ PROJECT value is provided, it defaults to the value of
(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-noselect
- (file-name-as-directory
project-dir)))))
+ (if (and hibtypes-git-use-magit-status (featurep
'magit))
+ (hpath:display-buffer (save-window-excursion
+ (magit-status-setup-buffer
+ (file-name-as-directory
project-dir))))
+ (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\""
project project-dir)
- [elpa] externals/hyperbole 8ef773d 18/25: Add Action/Assist key support for magit modes, (continued)
- [elpa] externals/hyperbole 8ef773d 18/25: Add Action/Assist key support for magit modes, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 520ecae 19/25: Fix improper registering of a drag outside of Emacs when none, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 008182b 22/25: Fixes, Helm and Magit Smart Key support doc in prep. for 7.1.3, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 6f36320 08/25: Merge branch 'master' of github.com:rswgnu/hyperbole, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 97a4d80 10/25: Raise org-mode ibtype priority to near top; fix markdown # link activation, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 734c6a8 11/25: Merge branch 'master' of github.com:rswgnu/hyperbole, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 335441d 15/25: Fix that Action Key did not expand collapsed Koutline trees, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 845119a 24/25: hib-social.el - Rename to hibtypes-git-use-magit-flag; make first ebut in file work without saving, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole d65920b 25/25: V7.1.3 - Improve key series, mouse handling and, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 3c0df00 12/25: Add support for dired-sidebar (#33), Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 21b2b1c 20/25: Use magit if available for git social button (#32),
Stefan Monnier <=
- [elpa] externals/hyperbole b8fd1e8 23/25: Merge branch 'master' of github.com:rswgnu/hyperbole, Stefan Monnier, 2020/09/22
- [elpa] externals/hyperbole 55a73f9 21/25: Add TALK subdirectory for upcoming talk on Hyperbole, Stefan Monnier, 2020/09/22