[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 58feed0c04 54/67: style: lint with flymake
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 58feed0c04 54/67: style: lint with flymake |
Date: |
Sat, 22 Jul 2023 06:59:04 -0400 (EDT) |
branch: externals/org-remark
commit 58feed0c04557512cacd2466361a0a971d240d48
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
style: lint with flymake
---
org-remark-nov.el | 13 ++++++++++---
org-remark.el | 29 ++++++++++++++++++++---------
2 files changed, 30 insertions(+), 12 deletions(-)
diff --git a/org-remark-nov.el b/org-remark-nov.el
index 075e45621c..ec2f7072e6 100644
--- a/org-remark-nov.el
+++ b/org-remark-nov.el
@@ -2,7 +2,7 @@
;; URL: https://github.com/nobiot/org-remark
;; Created: 9 January 2023
-;; Last modified: 12 July 2023
+;; Last modified: 14 July 2023
;;; Commentary:
@@ -11,6 +11,11 @@
(if (locate-library "nov") (require 'nov)
(error "Org-remark: package `nov' is missing"))
(require 'org-remark)
+;; To silence flymake
+(defvar nov-file-name)
+(defvar nov-documents)
+(defvar nov-documents-index)
+(defvar nov-metadata)
;;;###autoload
(define-minor-mode org-remark-nov-mode
@@ -90,8 +95,10 @@ buffer."
(org-store-link nil)))
(cl-defmethod org-remark-highlight-get-constructors (&context (major-mode
nov-mode))
- "Dev needs to define a mode-specific headline constructors.
-`(SOURCE-FILENAME-FN TITLE-FN PROP-TO-FIND)`'"
+ "Construct lists for creating MAJOR-MODE specific hierarchy.
+Return the value in a alist like this:
+
+ (SOURCE-FILENAME-FN TITLE-FN PROP-TO-FIND)"
(let* ((headline-1 (list
;; SOURCE-FILENAME-FN
(lambda () nov-file-name)
diff --git a/org-remark.el b/org-remark.el
index bf37cfae31..7aa0692829 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -128,7 +128,7 @@ The current buffer is the note buffer."
:type 'hook)
(defcustom org-remark-icon-notes "(*)"
- "String to be displayed when notes exist for a given highlight
+ "String to be displayed when notes exist for a given highlight.
Nil means no icon is to be displayed."
:type 'string)
@@ -141,7 +141,7 @@ Nil means no icon is to be displayed."
"Abnormal hook run after `org-remark-highlights-load'.
It is run with OVERLAYS and NOTES-BUF as arguments. OVERLAYS are
highlights. It is run with the source buffer as current buffer."
- :type hook)
+ :type 'hook)
;;;; Variables
@@ -846,8 +846,11 @@ This function assumes the current buffer is the source
buffer."
(make-obsolete #'org-remark-highlight-save #'org-remark-highlight-add "1.2.0")
(cl-defgeneric org-remark-highlight-get-constructors ()
- "Dev needs to define a mode-specific headline constructors.
-`(level source-filename-fn title-fn prop-to-find)`'"
+ "Construct lists for creating MAJOR-MODE specific hierarchy.
+
+This is the default one. Return the value in a alist like this:
+
+ (SOURCE-FILENAME-FN TITLE-FN PROP-TO-FIND)"
(let* ((headline-1 (list
;; SOURCE-FILENAME-FN
(lambda ()
@@ -1383,7 +1386,7 @@ process."
(push (org-remark-highlight-load highlight) overlays))
(unless update (org-remark-notes-setup notes-buf source-buf))
(if overlays
- (progn (run-functions-with-args
'org-remark-highlights-after-load-functions
+ (progn (run-hook-with-args
'org-remark-highlights-after-load-functions
overlays notes-buf)
;; Return t
t)
@@ -1516,13 +1519,20 @@ Case 2. The overlay points to no buffer
t)
(defun org-remark-highlights-adjust-positions (overlays _notes-buf)
- "
-Meant to be set to `org-remark-highlights-after-load-functions' by
-mode-specific extensions."
+ "Run dolist and delgate the actual adjustment to another function.
+
+OVERLAYS are highlights.
+
+Check the original text property exits and not the same as the
+current highlighted text.
+
+Meant to be set to `org-remark-highlights-after-load-functions' by
mode-specific
+extensions."
(dolist (ov overlays)
(let ((highlight-text (overlay-get ov '*org-remark-original-text)))
;; original text exists AND
;; it is different to the current
+ ;; TODO fix the highlight comparision logic
(when (and highlight-text
(not (string= highlight-text
(buffer-substring-no-properties
@@ -1531,7 +1541,8 @@ mode-specific extensions."
ov highlight-text)))))
(defun org-remark-highlights-add-icons (overlays _notes-buf)
- "Add icons to highlights."
+ "Add icons to OVERLAYS.
+Each overlay is a highlight."
(dolist (ov overlays)
(let ((propertized-string nil)
(note-body (overlay-get ov '*org-remark-note-body))
- [elpa] externals/org-remark e8e0693268 07/67: fix(save): source-setup-done needs to be done in source, (continued)
- [elpa] externals/org-remark e8e0693268 07/67: fix(save): source-setup-done needs to be done in source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark b35fcfdbe4 16/67: feat: adjust positions after load via new hook, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 32860de66b 24/67: fix: typo in the previous refactor, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark f2a1e9f339 32/67: fix(eww) adjust the arg of fn link-to-source, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark fa81cc764a 36/67: feat(adjust-positions): Add an icon indicating the position adjusted, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5a0299bdf7 39/67: refactor: (WIP) highlight-new-headline-maybe, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark eb9741e51f 44/67: refactor: highlights-add-icons, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark ae220ad29b 50/67: refactor(icon): change default to ascii characters only, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 112bbfa9ba 53/67: docs: Update user manual with new features, etc., ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark d133a32786 58/67: docs: Minor style updates to user manual, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 58feed0c04 54/67: style: lint with flymake,
ELPA Syncer <=
- [elpa] externals/org-remark e4c42d7fd4 56/67: docs: Fix footnote (remove), ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 536c2cca1e 63/67: fix: add-headline. Location of new highlight notes was wrong, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 883f948bbf 66/67: style: make org-remark-highlight-save obsolete and add alias, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 3216d951fc 09/67: feat: nov.el title and nov-file-name in H1 of the notes, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 81bc062482 10/67: refactor(nov): highlight-save-book-entry, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark eed28d7b8d 26/67: Merge branch 'main' into dev/nov.el, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark e5de684b67 33/67: fix: adjust location of highlight, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 5b76fa930a 49/67: refactor(load): make load process robust., ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark b50d0f7688 52/67: refactor: rename highlights-after-load-hook to -functions, ELPA Syncer, 2023/07/22
- [elpa] externals/org-remark 07f5838c40 61/67: fix: Add headlines in the correct order and in the correct headline, ELPA Syncer, 2023/07/22