[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-remark 048c0e806e 044/173: intrnl: Update most func
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-remark 048c0e806e 044/173: intrnl: Update most functions to return t/nil |
Date: |
Fri, 28 Jan 2022 16:57:57 -0500 (EST) |
branch: externals/org-remark
commit 048c0e806e988d631cbaccca1d88ae2a7fd4287a
Author: Noboru Ota <me@nobiot.com>
Commit: Noboru Ota <me@nobiot.com>
intrnl: Update most functions to return t/nil
Striving to be more functional. Some functions do not return a value/list.
In
this case, functions should return t if an expected operation for the args
occured in addtion to enact the (intended) side effect (e.g. change a
variable).
I don't think I am strict about it -- e.g. I left the `sort-highlights`
function mostly non-fp style -- it assumes a buffer-local variable is used,
instead of importing it as an arg, and sets the variable after sorting
distructively. It was not worth updating it -- it returns t when the side
effect is enacted (sorting distructively).
---
.gitignore | 6 ++++++
README.org | 12 ++++++------
org-marginalia.el | 3 ++-
3 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000000..47f208c0b0
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*/#marginalia.org#
+*.bak
+*.log
+
+/demo/2020-12-24_10-00-13.png
+/demo/Copy of 2020-12-24_10-00-13.png
diff --git a/README.org b/README.org
index f8f763de9d..9c089d5cbc 100644
--- a/README.org
+++ b/README.org
@@ -166,11 +166,11 @@ This work is licensed under a GPLv3 license. For a full
copy of the licese, refe
:END:
This section is used as a demonstration and a collection of my ideas for this
package.
-** defun om/next
+**
:PROPERTIES:
:marginalia-id: 33710cc4
-:marginalia-source-beg: 15735
-:marginalia-source-end: 15748
+:marginalia-source-beg: 21414
+:marginalia-source-end: 21414
:END:
[[file:~/local-repos/org-marginalia/org-marginalia.el][org-marginalia]]
I need to think it through.
@@ -191,11 +191,11 @@ At the moment, ~om/list-highlights-positions~ has been
changed to return beginni
:marginalia-source-end: 6640
:END:
[[file:~/local-repos/org-marginalia/org-marginalia.el][org-marginalia]]
-** interactive
+**
:PROPERTIES:
:marginalia-id: 9f60c405
-:marginalia-source-beg: 15926
-:marginalia-source-end: 15937
+:marginalia-source-beg: 21414
+:marginalia-source-end: 21414
:END:
[[file:~/local-repos/org-marginalia/org-marginalia.el][org-marginalia]]
** defun om/mark
diff --git a/org-marginalia.el b/org-marginalia.el
index 18ba9155e0..7c871da207 100644
--- a/org-marginalia.el
+++ b/org-marginalia.el
@@ -504,7 +504,8 @@ If none, return nil."
(defun om/sort-highlights-list ()
"Utility function to sort `om/sort-highlights'."
(when om/highlights
- (setq om/highlights (seq-sort-by (lambda (s) (car (cdr s))) #'<
om/highlights))))
+ (setq om/highlights (seq-sort-by (lambda (s) (car (cdr s))) #'<
om/highlights))
+ t))
(defun om/find-next-highlight ()
"Return the beg point of the next highlight.
- [elpa] externals/org-remark 3cc500cb4a 018/173: internal: private fn first to avoid macro error, (continued)
- [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
- [elpa] externals/org-remark 3a5076b8ef 019/173: internal: Update program header, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark c8bbe51411 021/173: doc: Fix some documentation errors, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 2687b8eabf 031/173: admin: merging two machines on my end, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 922d78fbd3 032/173: fix: out of bound for invisible regions, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 022f067983 035/173: doc: Change modified date to be manual, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 447edb9d6d 037/173: intrnl: Add file var to make README as marginalia, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 840381a503 040/173: doc: Correct some program comments, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark a2fa4f9955 043/173: fix: om/list-highlights-positions, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 048c0e806e 044/173: intrnl: Update most functions to return t/nil,
ELPA Syncer <=
- [elpa] externals/org-remark 22eed1f5c2 042/173: fix: om/list-highlights-positions, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark ce1fd7bb23 048/173: doc: Update for transient navigation (next/prev), ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark e2524f1663 056/173: Remove default keybindings; add examples in readme, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 045b7593f5 059/173: doc: Update README according to the fix and some, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 6f1a13dbf1 062/173: doc: om-remove, C-u option, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark a759dfc437 064/173: chg: from text-prop to overlay, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 1dd28ecd4c 081/173: lint, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 029efeb2a0 084/173: doc: README, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark 4e28dd1923 092/173: add: load works with a different pen, ELPA Syncer, 2022/01/28
- [elpa] externals/org-remark f9e432b486 103/173: docs: org-remark documentation, ELPA Syncer, 2022/01/28