[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/orgit a2d3937040 49/76: Adapt to changes in Magit
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/orgit a2d3937040 49/76: Adapt to changes in Magit |
Date: |
Thu, 13 Jan 2022 13:58:46 -0500 (EST) |
branch: elpa/orgit
commit a2d39370409b70dfe543329befbc876dd24832bd
Author: Jonas Bernoulli <jonas@bernoul.li>
Commit: Jonas Bernoulli <jonas@bernoul.li>
Adapt to changes in Magit
See https://github.com/magit/magit/pull/3836.
---
orgit.el | 53 +++++++++++++++++++++++++----------------------------
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/orgit.el b/orgit.el
index dc1b408388..1caab71d56 100644
--- a/orgit.el
+++ b/orgit.el
@@ -257,7 +257,7 @@ In that case `orgit-rev-store' stores one or more links
instead."
;;;###autoload
(defun orgit-status-open (repo)
- (magit-status-internal (orgit--repository-directory repo)))
+ (magit-status-setup-buffer (orgit--repository-directory repo)))
;;;###autoload
(defun orgit-status-export (path desc format)
@@ -284,35 +284,32 @@ When the region selects one or more commits, then do
nothing.
In that case `orgit-rev-store' stores one or more links instead."
(when (and (eq major-mode 'magit-log-mode)
(not (magit-region-sections 'commit)))
- (let ((repo (orgit--current-repository)))
- (if orgit-log-save-arguments
- (let ((args (if (car (last magit-refresh-args))
- magit-refresh-args
- (butlast magit-refresh-args))))
- (org-store-link-props
- :type "orgit-log"
- :link (format "orgit-log:%s::%S" repo args)
- :description (format "%s %S" repo (cons 'magit-log args))))
- (let ((args (car magit-refresh-args)))
- (org-store-link-props
- :type "orgit-log"
- :link (concat (format "orgit-log:%s::" repo)
- (if (cdr args)
- (prin1-to-string args)
- (car args)))
- :description (format "%s %S" repo (list 'magit-log args))))))))
+ (let ((repo (orgit--current-repository))
+ (args (if orgit-log-save-arguments
+ (if magit-buffer-log-files
+ (list magit-buffer-revisions
+ magit-buffer-log-args
+ magit-buffer-log-files)
+ (list magit-buffer-revisions
+ magit-buffer-log-args))
+ magit-buffer-revisions)))
+ (org-store-link-props
+ :type "orgit-log"
+ :link (format "orgit-log:%s::%S" repo args)
+ :description (format "%s %S" repo (cons 'magit-log args))))))
;;;###autoload
(defun orgit-log-open (path)
(pcase-let* ((`(,repo ,args) (split-string path "::"))
+ (`(,revs ,args ,files)
+ (cond ((string-prefix-p "((" args)
+ (read args))
+ ((string-prefix-p "(" args)
+ (list (read args) (car (magit-log-arguments))))
+ (t
+ (list (list args) (car (magit-log-arguments))))))
(default-directory (orgit--repository-directory repo)))
- (apply #'magit-log-other
- (cond ((string-prefix-p "((" args)
- (read args))
- ((string-prefix-p "(" args)
- (cons (read args) (magit-log-arguments)))
- (t
- (cons (list args) (magit-log-arguments)))))))
+ (magit-log-setup-buffer revs args files)))
;;;###autoload
(defun orgit-log-export (path desc format)
@@ -347,7 +344,7 @@ prefix argument is reversed.
When the region selects one or more commits, e.g. in a log, then
store links to the Magit-Revision mode buffers for these commits."
(cond ((eq major-mode 'magit-revision-mode)
- (orgit-rev-store-1 (car magit-refresh-args)))
+ (orgit-rev-store-1 magit-buffer-revision))
((derived-mode-p 'magit-mode)
(when-let ((revs (magit-region-values 'commit)))
(mapc 'orgit-rev-store-1 revs)
@@ -372,8 +369,8 @@ store links to the Magit-Revision mode buffers for these
commits."
(defun orgit-rev-open (path)
(pcase-let* ((`(,repo ,rev) (split-string path "::"))
(default-directory (orgit--repository-directory repo)))
- (apply #'magit-show-commit
- (cons rev (magit-diff-arguments)))))
+ (magit-revision-setup-buffer
+ rev (car (magit-diff-arguments 'magit-revision-mode)) nil)))
;;;###autoload
(defun orgit-rev-export (path desc format)
- [nongnu] elpa/orgit a9d0c74659 14/76: bump dependencies, (continued)
- [nongnu] elpa/orgit a9d0c74659 14/76: bump dependencies, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit aa193c045b 21/76: orgit-export: use -let*, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ca93e9ec56 25/76: orgit-export: ensure default-directory ends with a slash, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit cbce5871fe 29/76: Store all revisions and optionally all arguments in log links, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 976f3c7d25 32/76: Support storing link(s) to selected commit(s), ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 692256bac9 33/76: Add Makefile, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit d909f92d3b 35/76: Bump copyright years, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ea79e0567a 39/76: orgit-export-alist: Update kernel.org entry, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit ddb830c38c 43/76: make: Add new indirect dependencies, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 8a65bd2750 42/76: Favor pcase and subr-x over dash, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit a2d3937040 49/76: Adapt to changes in Magit,
ELPA Syncer <=
- [nongnu] elpa/orgit e23c7a6776 46/76: orgit--repository-directory: Error on non-existent directory, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 9598d71682 55/76: Revert "Add .github/FUNDING.yml", ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit c110371202 57/76: orgit--repository-directory: Support relative paths again, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit e147f05577 61/76: eval-after-load: replace string feature w/ symbol, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 229a2ae37a 65/76: orgit-export-alist: Add git.sr.ht entry, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 6a22c2e459 06/76: orgit-log-store: use branch name, not HEAD, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit efde657483 10/76: magit-log-export: use correct variable, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 455dac3422 15/76: orgit-export-alist: add gitlab and remove gitorious, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 2330a8cdb5 20/76: orgit-log-store: remove old kludges and todos, ELPA Syncer, 2022/01/13
- [nongnu] elpa/orgit 718343d40d 22/76: orgit-{log, rev}-open: use -let, ELPA Syncer, 2022/01/13