[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 0028c8c 106/348: counsel.el (counsel-outline): New command
From: |
Oleh Krehel |
Subject: |
[elpa] master 0028c8c 106/348: counsel.el (counsel-outline): New command |
Date: |
Sat, 8 Apr 2017 11:03:37 -0400 (EDT) |
branch: master
commit 0028c8c9d47a35b9146c5b2dd6a72bfcdbac0a3d
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
counsel.el (counsel-outline): New command
---
counsel.el | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/counsel.el b/counsel.el
index 7782d4c..f4fb7a8 100644
--- a/counsel.el
+++ b/counsel.el
@@ -2159,6 +2159,29 @@ And insert it into the minibuffer. Useful during
(ivy-read "tag: " tags
:action 'counsel-semantic-action)))
+;;** `counsel-outline'
+(defun counsel-outline-candidates ()
+ (let (cands)
+ (save-excursion
+ (goto-char (point-min))
+ (while (re-search-forward outline-regexp nil t)
+ (skip-chars-forward " ")
+ (push (cons (buffer-substring-no-properties
+ (point) (line-end-position))
+ (line-beginning-position))
+ cands))
+ (nreverse cands))))
+
+(defun counsel-outline-action (x)
+ (with-ivy-window
+ (goto-char (cdr x))))
+
+(defun counsel-outline ()
+ "Jump to outline with completion."
+ (interactive)
+ (ivy-read "outline: " (counsel-outline-candidates)
+ :action #'counsel-outline-action))
+
;;* Misc OS
;;** `counsel-rhythmbox'
(declare-function dbus-call-method "dbus")
- [elpa] master 65948fc 053/348: colir.el (colir-parse-color): Fix color parsing in terminal, (continued)
- [elpa] master 65948fc 053/348: colir.el (colir-parse-color): Fix color parsing in terminal, Oleh Krehel, 2017/04/08
- [elpa] master e987cef 061/348: counsel.el (counsel-read-setq-expression): Fix Eldoc nag, Oleh Krehel, 2017/04/08
- [elpa] master 0091c8a 058/348: ivy.el (ivy-set-prompt-text-properties-function): New devar, Oleh Krehel, 2017/04/08
- [elpa] master 473c595 064/348: Facilitate the sorting of cons cell input to ivy-read, Oleh Krehel, 2017/04/08
- [elpa] master 23bd7a4 075/348: counsel.el (counsel-git): Add :caller, Oleh Krehel, 2017/04/08
- [elpa] master 74358c2 070/348: Purge all dependency on helm-rhythmbox, Oleh Krehel, 2017/04/08
- [elpa] master 56aa605 076/348: ivy.el (ivy-add-prompt-count): Refactor from ivy--reset-state, Oleh Krehel, 2017/04/08
- [elpa] master 9c01abf 003/348: doc/Changelog.org: Add hlines, Oleh Krehel, 2017/04/08
- [elpa] master e53f256 087/348: ivy.el (ivy-minibuffer-map): Move ivy-toggle-regexp-quote from "M-q" to "M-r", Oleh Krehel, 2017/04/08
- [elpa] master af5f097 108/348: counsel.el (counsel-locate-action-extern): Make interactive, Oleh Krehel, 2017/04/08
- [elpa] master 0028c8c 106/348: counsel.el (counsel-outline): New command,
Oleh Krehel <=
- [elpa] master 1d8b4f8 110/348: ivy.el (ivy-sort-matches-functions-alist): New sorting for ivy-switch-buffer, Oleh Krehel, 2017/04/08
- [elpa] master 027fbac 114/348: swiper.el (swiper-multi-action-2): Fix swiper-all, Oleh Krehel, 2017/04/08
- [elpa] master d6cf677 077/348: ivy.el (ivy-prompt): Add warning, Oleh Krehel, 2017/04/08
- [elpa] master 9bd79da 074/348: ivy.el (ivy-set-prompt): New API, Oleh Krehel, 2017/04/08
- [elpa] master 72dcca5 082/348: ivy.el (ivy-push-view): Work properly for dired-mode, Oleh Krehel, 2017/04/08
- [elpa] master 3d7e1ef 083/348: ivy.el (ivy--switch-buffer-action): Improve, Oleh Krehel, 2017/04/08
- [elpa] master 055e7b8 102/348: counsel.el (counsel-git-grep-cmd-history): Update default, Oleh Krehel, 2017/04/08
- [elpa] master 7e188d5 100/348: counsel.el (counsel-git-grep): Customize re-builder, Oleh Krehel, 2017/04/08
- [elpa] master 1da8b6c 086/348: Fix foo!bar syntax for swiper, Oleh Krehel, 2017/04/08
- [elpa] master 57c0f5e 095/348: ivy.el (ivy-set-view-recur): Account for mulitple same kind splits, Oleh Krehel, 2017/04/08