[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 46db1b9 107/184: counsel.el (counsel-mark-ring): Add custo
From: |
Oleh Krehel |
Subject: |
[elpa] master 46db1b9 107/184: counsel.el (counsel-mark-ring): Add customize variable to sort or not |
Date: |
Wed, 16 Oct 2019 13:15:01 -0400 (EDT) |
branch: master
commit 46db1b987feb0b15f0a070a0d37f93247881a571
Author: SAITOU Keita <address@hidden>
Commit: SAITOU Keita <address@hidden>
counsel.el (counsel-mark-ring): Add customize variable to sort or not
---
counsel.el | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/counsel.el b/counsel.el
index d2aa51f..ca13fb3 100644
--- a/counsel.el
+++ b/counsel.el
@@ -3717,6 +3717,10 @@ This variable has no effect unless
;;* Misc. Emacs
;;** `counsel-mark-ring'
+(defcustom counsel-mark-ring-sort-selections t
+ "If non-nil, sort `mark-ring' list by line number."
+ :type 'boolean)
+
(defface counsel--mark-ring-highlight
'((t (:inherit highlight)))
"Face for current `counsel-mark-ring' line."
@@ -3769,12 +3773,12 @@ Obeys `widen-automatically', which see."
(line-beginning-position) (line-end-position))))
(cons (format fmt linum line) (point)))))
(marks (copy-sequence mark-ring))
+ (marks (delete-dups marks))
(marks
;; mark-marker is empty?
(if (equal (mark-marker) (make-marker))
marks
(cons (copy-marker (mark-marker)) marks)))
- (marks (sort (delete-dups marks) #'<))
(cands
;; Widen, both to save `line-number-at-pos' the trouble
;; and for `buffer-substring' to work.
@@ -3786,6 +3790,7 @@ Obeys `widen-automatically', which see."
(ivy-read "Mark: " cands
:require-match t
:update-fn #'counsel--mark-ring-update-fn
+ :sort counsel-mark-ring-sort-selections
:action (lambda (cand)
(let ((pos (cdr-safe cand)))
(when pos
- [elpa] master 1332ab0 068/184: counsel.el (counsel-compile-env-pattern): Fix regex typo, (continued)
- [elpa] master 1332ab0 068/184: counsel.el (counsel-compile-env-pattern): Fix regex typo, Oleh Krehel, 2019/10/16
- [elpa] master beb3aee 080/184: ivy.el (ivy--directory-done): Handle "/ C-j" on remote, Oleh Krehel, 2019/10/16
- [elpa] master e62e7de 090/184: ivy-test.el (ivy-test-run-tests): Fix, Oleh Krehel, 2019/10/16
- [elpa] master 73d9f4a 083/184: Place cursor at the begging of matches (for grep), Oleh Krehel, 2019/10/16
- [elpa] master 361cf87 070/184: ivy-test.el (counsel-find-file-with-dollars): Remove, Oleh Krehel, 2019/10/16
- [elpa] master 7cca04a 088/184: doc/ivy.org: Document the marking feature, Oleh Krehel, 2019/10/16
- [elpa] master 3be5e78 084/184: counsel.el (counsel-git-grep-action): Check re-search-forward, Oleh Krehel, 2019/10/16
- [elpa] master 4c1f6cd 094/184: ivy-test.el: Update, Oleh Krehel, 2019/10/16
- [elpa] master 47f6427 105/184: counsel.el (counsel-compile): favour project root over default-directory, Oleh Krehel, 2019/10/16
- [elpa] master 09507fc 109/184: counsel.el (counsel-mark-ring): Fix highlight line of selected candidate, Oleh Krehel, 2019/10/16
- [elpa] master 46db1b9 107/184: counsel.el (counsel-mark-ring): Add customize variable to sort or not,
Oleh Krehel <=
- [elpa] master c0aa563 112/184: ivy.el (ivy-occur): Set up next-error-function, Oleh Krehel, 2019/10/16
- [elpa] master 1a74a21 110/184: ivy-occur: setup for next-error., Oleh Krehel, 2019/10/16
- [elpa] master 30adc93 115/184: Add actions to counsel-switch-buffer, Oleh Krehel, 2019/10/16
- [elpa] master 892e44a 079/184: doc: Add full text of licences, Oleh Krehel, 2019/10/16
- [elpa] master 4645e89 121/184: swiper.el (swiper-action-copy): Add and bind to "M-o w", Oleh Krehel, 2019/10/16
- [elpa] master 77997ea 120/184: counsel.el (counsel-M-x-transformer): Handle read-only strings, Oleh Krehel, 2019/10/16
- [elpa] master 1984068 122/184: doc/ivy.org: Update GFDL license to no Invariant Sections, Oleh Krehel, 2019/10/16
- [elpa] master 881cbc5 130/184: counsel.el (counsel-google-function): Use request in async mode, Oleh Krehel, 2019/10/16
- [elpa] master b39f383 125/184: counsel.el (counsel-git-grep-occur): Re-use counsel-grep-like-occur, Oleh Krehel, 2019/10/16
- [elpa] master c9f1889 136/184: swiper.el (swiper--query-replace-setup): Fix "^$" issue, Oleh Krehel, 2019/10/16