alphapapa / alphapapa/org-recent-headings

Making sorting optional

Đang mở
#16 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement help wanted
Ngôn ngữ chính
Shell
Star
61
Fork
4
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

At present, `helm-org-recent-headings-source` is defined as follows in `helm-org-recent-headings.el`:

```emacs-lisp
(defvar helm-org-recent-headings-source
(helm-build-sync-source " Recent Org headings"
:candidates (lambda ()
(org-recent-headings--prepare-list)
org-recent-headings-list)
:candidate-number-limit 'org-recent-headings-candidate-number-limit
:candidate-transformer 'helm-org-recent-headings--truncate-candidates
;; FIXME: If `helm-org-recent-headings-map' is changed after this `defvar' is
;; evaluated, the keymap used in the source is not changed, which is very confusing
;; for users (including myself). Maybe we should build the source at runtime.
:keymap helm-org-recent-headings-map
:action (helm-make-actions
"Show entry (default function)" 'org-recent-headings--show-entry-default
"Show entry in real buffer" 'org-recent-headings--show-entry-direct
"Show entry in indirect buffer" 'org-recent-headings--show-entry-indirect
"Remove entry" 'helm-org-recent-headings-remove-entries
"Bookmark heading" 'org-recent-headings--bookmark-entry))
"Helm source for `org-recent-headings'.")
```

`org-recent-headings--prepare-list` sorts the history by frecency. I personally don't like this behavior, and I'd prefer history ordered by recency, without duplicates.

I also want to add some custom actions to this Helm source.

For now, I will copy this source code and define my own Helm source for recent headings to suit my own needs. It might be better to allow the user to define his/her own sorting mechanism, e.g. using `prescient`. In the end, I may end up with your implementation, but I don't know if frecency is a good idea here.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.