[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark ca86e1156c 041/173: fix: om/list-highlights-
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark ca86e1156c 041/173: fix: om/list-highlights-positions |
Date: |
Fri, 28 Jan 2022 16:57:57 -0500 (EST) |
branch: externals/org-remark
commit ca86e1156cf357efba0121ecd0385cd7493a93f5
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
fix: om/list-highlights-positions
It was not checking the visibility correctly.
---
org-marginalia.el | 37 ++++++++++++++++++++++++-------------
1 file changed, 24 insertions(+), 13 deletions(-)
diff --git a/org-marginalia.el b/org-marginalia.el
index adfae9242e..94e192d139 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -382,20 +382,23 @@ marginalia, but will keep the headline and notes."
If there is none below the point, but there is a highlight in the
buffer, go back to the first one."
(interactive)
- (if (not om/highlights) (message "No highlights present in this buffer.")
+ (if (not om/highlights)
+ (progn (message "No highlights present in this buffer.") nil)
(if (om/find-next-highlight)
- (goto-char (om/find-next-highlight))
- (message "Nothing done. No more visible highlights exist"))))
+ (progn (goto-char (om/find-next-highlight)) t)
+ (message "Nothing done. No more visible highlights exist") nil)))
(defun om/prev ()
"Look at the current point, and move to the previous highlight, if any.
If there is none above the point, but there is a highlight in the
buffer, go back to the last one."
(interactive)
- (if (not om/highlights) (message "No highlights present in this buffer.")
+ (if (not om/highlights)
+ (progn (message "No highlights present in this buffer.")
+ nil)
(if (om/find-prev-highlight)
- (goto-char (om/find-prev-highlight))
- (message "Nothing done. No more visible highlights exist"))))
+ (progn (goto-char (om/find-prev-highlight)) t)
+ (message "Nothing done. No more visible highlights exist") nil)))
(defun om/toggle ()
"Toggle showing/hiding of highlighters in current buffer.
@@ -481,13 +484,21 @@ visible ones.
If none, return nil."
(when om/highlights
- (when om/highlights
- (let ((list (mapcar (lambda (h)
- (marker-position (car (cdr h))))
- om/highlights)))
- (remove nil list)
- (when list
- (if reverse (reverse list) list))))))
+ (let ((list om/highlights))
+ (setq list (mapcar
+ (lambda (h)
+ (let ((p (marker-position (car (cdr h)))))
+ ;; Checking if the p is visible or not
+ (if (or
+ (> p (point-max))
+ ;; When the highlight is wihtin a visible folded
+ ;; area, this function returns 'outline
+ (org-invisible-p p))
+ nil p)))
+ list))
+ (setq list (remove nil list))
+ (when list
+ (if reverse (reverse list) list)))))
(defun om/sort-highlights-list ()
"Utility function to sort `om/sort-highlights'."
- [elpa] externals/org-remark e96941d8c2 002/173: doc: minor spelling correction, (continued)
- [elpa] externals/org-remark e96941d8c2 002/173: doc: minor spelling correction, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark d58e8f256c 012/173: break: Change om/save-all to om/save, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 3d6207ae20 011/173: doc: Update doc, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 22d7d373bc 003/173: doc: Replace wrong images; minior spelling fix, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 8762fdad61 024/173: fix: defface for highlighter, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 5511d32062 026/173: doc: Add title image, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 13f36d7241 020/173: internal: Fix the macro expansion, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 66da9a3fb9 028/173: doc: Update title image; add its source files, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark de889ea114 030/173: doc: marginalia.org for the program, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6aa087a6d0 034/173: doc: Add a limitatino of moving files, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ca86e1156c 041/173: fix: om/list-highlights-positions,
ELPA Syncer <=
- [elpa] externals/org-remark 460eab8db0 046/173: doc: Update README (marginalia), ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark caf73e6f86 052/173: doc: Update docstrings for om/- next/prev, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 78a218c505 051/173: doc: Update docstrings for om/-next/prev, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark b60992beb5 053/173: doc: Update comments and readme, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 7534424f4d 055/173: break: Replace prefix "om/" with "org-marginalia";, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark c7a5ba5e3b 057/173: Merge branch 'main' of https://github.com/nobiot/org-marginalia, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 020c862da7 007/173: doc: Fix the badge display, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 04124b352e 015/173: doc: Minor update readme, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 3cc500cb4a 018/173: internal: private fn first to avoid macro error, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 46d3722ea1 017/173: feat: Add om/next and /prev, ELPA Syncer, 2022/01/28