[elpa] externals/consult 65dcacd705: Preview large files partially

2023-10-06 Thread ELPA Syncer
branch: externals/consult
commit 65dcacd70523f2ae78bc70197555cce1f3b93ef0
Author: Daniel Mendler 
Commit: Daniel Mendler 

Preview large files partially

Port partial preview from dired-preview. This feature has been added 
recently to
dired-preview by @karthink. Ideally we can create a shared filepreview.el
library at some point which provides a bunch of file type specific handlers.

Something along these lines:

(defgroup filepreview nil
  "Preview files."
  :group 'files
  :prefix "filepreview-")

(defcustom filepreview-exclude-extensions
  '("bin" "elc" "eln" "exe" "gpg" "iso")
  "List of file extensions excluded from preview."
  :type '(repeat string))

(defcustom filepreview-handler
  (list #'filepreview-handle-open
#'filepreview-handle-media
#'filepreview-handle-binary
#'filepreview-handle-large
#'filepreview-handle-text)
  "List of preview handler functions."
  :type 'hook)

;; Internal session object
(cl-defstruct (filepreview--session
   (:constructor filepreview--session-make)
   (:copier nil))
  ...)

(defun filepreview-start ()
  "Start file preview and return previewer object."
  ...)

(defun filepreview-end (session)
  "End file preview for SESSION.
The preview buffers associated with SESSION are killed.  All
windows which display previewed files are restored to their
original state."
  ...)

(defun filepreview-upgrade (buffer)
  "Upgrade preview BUFFER.
The previewed file is reopened for editing in Emacs and any
displayed preview buffer is replaced by the upgraded buffer.
Nothing happens if BUFFER is not a preview buffer or if upgrading
is not supported for the previewed file type."
  ...)

(defun filepreview-preview (session file &optional callback)
  "Preview FILE in SESSION.
The function either returns a buffer or an error string.  If
CALLBACK is non-nil, preview is performed asynchronously and
cancelable.  The buffer or error string is passed to the callback
function.  The return value of an asynchronous call can be passed
to `filepreview-cancel' in order to cancel a running preview
computation."
  ...)

(defun filepreview-cancel (preview)
  "Cancel asynchronous PREVIEW."
  ...)
---
 CHANGELOG.org |  4 +++
 README.org| 93 +--
 consult.el| 51 ++--
 3 files changed, 80 insertions(+), 68 deletions(-)

diff --git a/CHANGELOG.org b/CHANGELOG.org
index dfd4f61303..eb60bbd026 100644
--- a/CHANGELOG.org
+++ b/CHANGELOG.org
@@ -5,6 +5,10 @@
 * Development
 
 - Bugfixes.
+- Preview large files partially. Add new customization variables
+  =consult-preview-partial-chunk= and =consult-preview-partial-limit=. This new
+  feature is experimental. Please report any issues you observe.
+- Obsoleted =consult-preview-max-size= and =consult-preview-raw-size=.
 - =consult-fd=: New command based on the fast =fd/fdfind= search utility.
 - =consult-outline=: New prefix argument to specify initial narrowing level.
 - =consult-org-heading=: Specify category =org-heading= such that Embark 
provides
diff --git a/README.org b/README.org
index 42148bab6b..ab81771bc7 100644
--- a/README.org
+++ b/README.org
@@ -484,10 +484,9 @@ for [[https://github.com/minad/org-modern][org-modern]] 
and [[https://github.com
 (add-to-list 'consult-preview-allowed-hooks 'global-hl-todo-mode-check-buffers)
 #+end_src
 
-Files larger than =consult-preview-raw-size= are previewed literally without
-syntax highlighting and without changing the major mode. Delaying the preview 
is
-also useful for =consult-theme=, since the theme preview is slow. The delay
-results in a smoother UI experience.
+Files larger than =consult-preview-partial-size= are previewed partially. 
Delaying
+the preview is also useful for =consult-theme=, since the theme preview is 
slow.
+The delay results in a smoother UI experience.
 
 #+begin_src emacs-lisp
 ;; Preview on any key press, but delay 0.5s
@@ -915,49 +914,49 @@ configuration examples.
 values and abbreviated description. Alternatively, type =C-h a ^consult= to get
 an overview of all Consult variables and functions with their descriptions.
 
-| Variable | Description   
|
-|--+---|
-| consult-after-jump-hook  | Functions to call after jumping to a 
location |
-| consult-async-input-debounce | Input debounce for asynchronous commands  
|
-| consult-async-input-throttle | Input throttle for asynchronous commands  
|
-| consult-async-min-input  | Minimum numbers of letters needed for 
async process   |
-| 

[elpa] externals/ef-themes 09e3968357: ef-melissa-light: tweak yellow-faint

2023-10-06 Thread ELPA Syncer
branch: externals/ef-themes
commit 09e396835743d0062616072a1fbc0b01884696b6
Author: Protesilaos Stavrou 
Commit: Protesilaos Stavrou 

ef-melissa-light: tweak yellow-faint
---
 contrast-ratios.org   | 2 +-
 ef-melissa-light-theme.el | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/contrast-ratios.org b/contrast-ratios.org
index abbe0a507a..f9075a709e 100644
--- a/contrast-ratios.org
+++ b/contrast-ratios.org
@@ -1249,7 +1249,7 @@ work with the overall design of the project.
 | yellow | #a46110 |4.52 |4.05 |3.48 |4.27 |
 | yellow-warmer  | #ba5205 |4.52 |4.05 |3.48 |4.26 |
 | yellow-cooler  | #946830 |4.54 |4.06 |3.49 |4.28 |
-| yellow-faint   | #9a616a |4.53 |4.05 |3.48 |4.27 |
+| yellow-faint   | #92616a |4.69 |4.20 |3.61 |4.43 |
 | blue   | #375cc6 |5.54 |4.96 |4.26 |5.22 |
 | blue-warmer| #5f5fdf |4.64 |4.15 |3.56 |4.37 |
 | blue-cooler| #265fbf |5.60 |5.01 |4.30 |5.28 |
diff --git a/ef-melissa-light-theme.el b/ef-melissa-light-theme.el
index 926e421c8f..31826e2590 100644
--- a/ef-melissa-light-theme.el
+++ b/ef-melissa-light-theme.el
@@ -71,7 +71,7 @@
   (yellow  "#a46110")
   (yellow-warmer   "#ba5205")
   (yellow-cooler   "#946830")
-  (yellow-faint"#9a616a")
+  (yellow-faint"#92616a")
   (blue"#375cc6")
   (blue-warmer "#5f5fdf")
   (blue-cooler "#265fbf")



[nongnu] elpa/cider 5edfbc0bed: Prevent double spaces in `current-time-string`

2023-10-06 Thread ELPA Syncer
branch: elpa/cider
commit 5edfbc0bedef4c751f2e753477eb3ca4986bf0f0
Author: vemv 
Commit: vemv 

Prevent double spaces in `current-time-string`
---
 nrepl-client.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/nrepl-client.el b/nrepl-client.el
index 1649da6f68..43b9759232 100644
--- a/nrepl-client.el
+++ b/nrepl-client.el
@@ -500,7 +500,9 @@ and kill the process buffer."
 (goto-char (point-max))
 (insert-before-markers
  (propertize
-  (format "\n*** Closed on %s ***\n" (current-time-string))
+  (format "\n*** Closed on %s ***\n" (replace-regexp-in-string "  +"
+   " "
+   
(current-time-string)))
   'face 'cider-repl-stderr-face))
 (run-hooks 'nrepl-disconnected-hook)
 (let ((server-buffer nrepl-server-buffer))



[nongnu] elpa/helm d1393e23aa 1/2: Fix duplicated tag in defcustom

2023-10-06 Thread ELPA Syncer
branch: elpa/helm
commit d1393e23aa133a87826c1390c6fc9654fba6bbdd
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Fix duplicated tag in defcustom
---
 helm-files.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/helm-files.el b/helm-files.el
index d8e7bc47e1..01efa9457d 100644
--- a/helm-files.el
+++ b/helm-files.el
@@ -634,7 +634,7 @@ This affects 
`[helm-ff-run-switch-to-shell]' keybinding
   :type '(choice
   (const :tag "Use Eshell" eshell-mode)
   (const :tag "Use Shell" shell-mode)
-  (const :tag "Use Shell" term-mode)))
+  (const :tag "Use Term" term-mode)))
 
 (defcustom helm-rsync-no-mode-line-update nil
   "When non nil don't update mode-line when rsync is running.



[nongnu] elpa/helm updated (202928b70e -> d6806ad233)

2023-10-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm.

  from  202928b70e Default to zero and not len in helm-make-separator
   new  d1393e23aa Fix duplicated tag in defcustom
   new  d6806ad233 Fix (#2621) and extend helm-basename to match and exit 
with any ext


Summary of changes:
 helm-files.el |  2 +-
 helm-lib.el   | 23 +--
 2 files changed, 18 insertions(+), 7 deletions(-)



[nongnu] elpa/helm-core updated (202928b70e -> d6806ad233)

2023-10-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/helm-core.

  from  202928b70e Default to zero and not len in helm-make-separator
  adds  d1393e23aa Fix duplicated tag in defcustom
  adds  d6806ad233 Fix (#2621) and extend helm-basename to match and exit 
with any ext

No new revisions were added by this update.

Summary of changes:
 helm-files.el |  2 +-
 helm-lib.el   | 23 +--
 2 files changed, 18 insertions(+), 7 deletions(-)



[nongnu] elpa/helm d6806ad233 2/2: Fix (#2621) and extend helm-basename to match and exit with any ext

2023-10-06 Thread ELPA Syncer
branch: elpa/helm
commit d6806ad23304277b19b0646ce5b19e1a6509ea06
Author: Thierry Volpiatto 
Commit: Thierry Volpiatto 

Fix (#2621) and extend helm-basename to match and exit with any ext

when ext is specified as a number+ext.
---
 helm-lib.el | 23 +--
 1 file changed, 17 insertions(+), 6 deletions(-)

diff --git a/helm-lib.el b/helm-lib.el
index a85ba017f6..c7c293e356 100644
--- a/helm-lib.el
+++ b/helm-lib.el
@@ -1544,16 +1544,27 @@ e.g. (helm-basename \"tutorial.el.gz\" \".el.gz\") => 
tutorial.
 When `t' no checking of `file-name-extension' is done and the first
 extension is removed unconditionally with `file-name-sans-extension'.
 e.g. (helm-basename \"tutorial.el.gz\" t) => tutorial.el.
-When a number, remove that many times extensions from FNAME.
-e.g. (helm-basename \"tutorial.el.gz\" 2) => tutorial."
+When a number, remove that many times extensions from FNAME until FNAME ends
+with its real extension which is by default \".el\".
+e.g. (helm-basename \"tutorial.el.gz\" 2) => tutorial
+To specify the extension where to stop use a cons cell where the cdr is a 
regexp
+matching extension e.g. (2 . .py$).
+e.g. (helm-basename \"~/ucs-utils-6.0-delta.py.gz\" \\='(2 . 
\".py\\='\"))
+=>ucs-utils-6.0-delta."
   (let ((non-essential t)
+(ext-regexp (cond ((consp ext) (cdr ext))
+  ((numberp ext) "\\.el\\'")
+  (t ext)))
 result)
 (cond ((or (null ext) (file-directory-p fname))
(file-name-nondirectory (directory-file-name fname)))
-  ((numberp ext)
-   (cl-dotimes (_ ext)
- (setq result (file-name-sans-extension
-   (file-name-nondirectory (or result fname)
+  ((or (numberp ext) (consp ext))
+   (cl-dotimes (_ (if (consp ext) (car ext) ext))
+ (let ((bn (file-name-nondirectory (or result fname
+   (helm-aif (file-name-sans-extension bn)
+   (if (string-match-p ext-regexp bn)
+   (cl-return (setq result (file-name-sans-extension bn)))
+ (setq result (file-name-sans-extension bn))
result)
   ((eq t ext)
(file-name-sans-extension (file-name-nondirectory fname)))



[nongnu] elpa/hyperdrive d346006743 1/3: Change/Fix: (-menu) Keep transient open when going up to parent

2023-10-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit d34600674337ae4ba8bd3162742fffd8c121190a
Author: Joseph Turner 
Commit: Joseph Turner 

Change/Fix: (-menu) Keep transient open when going up to parent
---
 hyperdrive-menu.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index ac4cf54e43..a4a8ce1db6 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -128,7 +128,8 @@
   :then (lambda ()
   (call-interactively 
#'hyperdrive-menu
   :inapt-if-not (lambda ()
-  (hyperdrive-parent (oref transient--prefix scope
+  (hyperdrive-parent (oref transient--prefix scope)))
+  :transient t)
  ("o" "Sort" hyperdrive-dir-sort
   :if (lambda ()
 (eq major-mode 'hyperdrive-dir-mode))



[nongnu] elpa/hyperdrive 87f37a1d72 2/3: Fix: (hyperdrive-menu) Don't offer to delete current directory

2023-10-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 87f37a1d7211326e16520e694ac2206822fbe034
Author: Joseph Turner 
Commit: Joseph Turner 

Fix: (hyperdrive-menu) Don't offer to delete current directory
---
 hyperdrive-menu.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index a4a8ce1db6..2b80674b7a 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -153,7 +153,9 @@
  ("w" "Copy URL" hyperdrive-copy-url
   :if (lambda ()
 (not (eq major-mode 'hyperdrive-dir-mode
- ("D" "Delete" hyperdrive-delete)
+ ("D" "Delete" hyperdrive-delete
+  :if (lambda ()
+(not (eq major-mode 'hyperdrive-dir-mode
  ("d" "Download" hyperdrive-download
   :if (lambda ()
 (not (eq major-mode 'hyperdrive-dir-mode]



[nongnu] elpa/hyperdrive 2d3f038790 3/3: Change: (hyperdrive-delete) Move into hyperdrive.el and autoload

2023-10-06 Thread ELPA Syncer
branch: elpa/hyperdrive
commit 2d3f038790afc86f7c0daa9d4dbaaeba6addd914
Author: Joseph Turner 
Commit: Joseph Turner 

Change: (hyperdrive-delete) Move into hyperdrive.el and autoload
---
 hyperdrive-dir.el  |  1 +
 hyperdrive-lib.el  | 40 
 hyperdrive-menu.el |  1 +
 hyperdrive.el  | 41 +
 4 files changed, 43 insertions(+), 40 deletions(-)

diff --git a/hyperdrive-dir.el b/hyperdrive-dir.el
index 018a0da7a6..ff0c3963ed 100644
--- a/hyperdrive-dir.el
+++ b/hyperdrive-dir.el
@@ -233,6 +233,7 @@ With point on header, returns directory entry."
 
 (declare-function hyperdrive-find-file "hyperdrive")
 (declare-function hyperdrive-up "hyperdrive")
+(declare-function hyperdrive-delete "hyperdrive")
 (declare-function hyperdrive-download "hyperdrive")
 (declare-function hyperdrive-describe-hyperdrive "hyperdrive-describe")
 ;; `hyperdrive-menu' is defined with `transient-define-prefix', which
diff --git a/hyperdrive-lib.el b/hyperdrive-lib.el
index f7cca8064b..09e3f1de94 100644
--- a/hyperdrive-lib.el
+++ b/hyperdrive-lib.el
@@ -877,46 +877,6 @@ HYPERDRIVE's public metadata file."
 (hyperdrive-persist hyperdrive)
 hyperdrive))
 
-(cl-defun hyperdrive-delete (entry &key (then #'ignore) (else #'ignore))
-  "Delete ENTRY, then call THEN with response.
-Call ELSE with `plz-error' struct if request fails.
-Interactively, read ENTRY with `hyperdrive-read-entry'."
-  (declare (indent defun))
-  (interactive
-   (let* ((entry (hyperdrive--context-entry))
-  (description (hyperdrive-entry-description entry))
-  (buffer (current-buffer)))
- (when (and (hyperdrive--entry-directory-p entry)
-(or (eq entry hyperdrive-current-entry)
-(string= ".." (alist-get 'display-name 
(hyperdrive-entry-etc entry)
-   (hyperdrive-user-error "Won't delete from within"))
- (when (and (yes-or-no-p (format "Delete «%s»? " description))
-(or (not (hyperdrive--entry-directory-p entry))
-(yes-or-no-p (format "Recursively delete «%s»? " 
description
-   (list entry
- :then (lambda (_)
- (when (and (buffer-live-p buffer)
-(eq 'hyperdrive-dir-mode (buffer-local-value 
'major-mode buffer)))
-   (with-current-buffer buffer
- (revert-buffer)))
- (hyperdrive-message "Deleted: «%s» (Deleted files can be 
accessed from prior versions of the hyperdrive.)" description))
- :else (lambda (plz-error)
- (hyperdrive-message "Unable to delete «%s»: %S" 
description plz-error))
-  (hyperdrive-api 'delete (hyperdrive-entry-url entry)
-:as 'response
-:then (lambda (response)
-(pcase-let* (((cl-struct plz-response headers) response)
- ((map etag) headers)
- (nonexistent-entry (hyperdrive-copy-tree entry t)))
-  (unless (hyperdrive--entry-directory-p entry)
-;; FIXME: hypercore-fetch bug doesn't update version
-;; number when deleting a directory.
-(setf (hyperdrive-entry-version nonexistent-entry) 
(string-to-number etag))
-(hyperdrive--fill-latest-version (hyperdrive-entry-hyperdrive 
entry) headers)
-(hyperdrive-update-nonexistent-version-range 
nonexistent-entry))
-  (funcall then response)))
-:else else))
-
 (cl-defun hyperdrive-purge-no-prompt (hyperdrive &key then else)
   "Purge all data corresponding to HYPERDRIVE, then call THEN with response.
 
diff --git a/hyperdrive-menu.el b/hyperdrive-menu.el
index 2b80674b7a..8a87f7ba72 100644
--- a/hyperdrive-menu.el
+++ b/hyperdrive-menu.el
@@ -38,6 +38,7 @@
  Declarations
 
 (declare-function hyperdrive-dir--entry-at-point "hyperdrive-dir")
+(declare-function hyperdrive-delete "hyperdrive")
 (declare-function hyperdrive-set-nickname "hyperdrive")
 (declare-function hyperdrive-set-petname "hyperdrive")
 
diff --git a/hyperdrive.el b/hyperdrive.el
index fed152a496..360f18d54f 100644
--- a/hyperdrive.el
+++ b/hyperdrive.el
@@ -362,6 +362,47 @@ for more information.  See `hyperdrive-read-entry' and
   (interactive (list (hyperdrive-read-url :prompt "Open hyperdrive URL")))
   (hyperdrive-open (hyperdrive-url-entry url)))
 
+;;;###autoload
+(cl-defun hyperdrive-delete (entry &key (then #'ignore) (else #'ignore))
+  "Delete ENTRY, then call THEN with response.
+Call ELSE with `plz-error' struct if request fails.
+Interactively, read ENTRY with `hyperdrive-read-entry'."
+  (declare (indent defun))
+  (interactive
+   (let* ((entry (hyperdrive--context-entry))
+  (description (hyperdrive-entry-description entry))
+  (buffer (current-buffer)))
+ (when (and (hyperdrive--entry-directory-p entry)
+(or (eq entry hyperdrive-current-entry)
+  

[nongnu] elpa/moe-theme 137ce9dbde 2/3: Use yellow on magit-diff-revision-summary, magit-diff-revision-summary-highlight

2023-10-06 Thread ELPA Syncer
branch: elpa/moe-theme
commit 137ce9dbde3af127fec8cced5c6e8ad74db9d46f
Author: ono ono 
Commit: ono ono 

Use yellow on magit-diff-revision-summary, 
magit-diff-revision-summary-highlight
---
 moe-dark-theme.el  | 4 ++--
 moe-light-theme.el | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/moe-dark-theme.el b/moe-dark-theme.el
index 166816d773..b561209c5a 100644
--- a/moe-dark-theme.el
+++ b/moe-dark-theme.el
@@ -481,8 +481,8 @@ Moe, moe, kyun!")
`(magit-diff-our-highlight ((,class (:foreground ,magenta-3 :background 
,magenta-00
`(magit-diff-removed ((,class (:foreground ,red-0 :background unspecified 
:bold t
`(magit-diff-removed-highlight ((,class (:foreground ,red-0 :bold t 
:inherit (magit-section-highlight)
-   `(magit-diff-revision-summary ((,class (:foreground ,white-0 :bold t
-   `(magit-diff-revision-summary-highlight ((,class (:foreground ,white-0 
:background ,blue-3 :bold t
+   `(magit-diff-revision-summary ((,class (:foreground ,yellow-00 :bold t
+   `(magit-diff-revision-summary-highlight ((,class (:foreground ,yellow-00 
:background ,yellow-4 :bold t
`(magit-diff-their ((,class (:foreground ,cyan-4 ;
`(magit-diff-their-highlight ((,class (:foreground ,cyan-6 :background 
,cyan-1
`(magit-diff-whitespace-warning ((,class (:foreground ,red-3 :background 
,red-3
diff --git a/moe-light-theme.el b/moe-light-theme.el
index e9171c65e6..443eb52e48 100644
--- a/moe-light-theme.el
+++ b/moe-light-theme.el
@@ -480,7 +480,7 @@ Moe, moe, kyun!")
`(magit-diff-our-highlight ((,class (:foreground ,magenta-3 :background 
,magenta-00
`(magit-diff-removed ((,class (:foreground ,red-2 :background unspecified 
:bold t
`(magit-diff-removed-highlight ((,class (:foreground ,red-2 :bold t 
:inherit (magit-section-highlight)
-   `(magit-diff-revision-summary ((,class (:foreground ,black-4 :bold t
+   `(magit-diff-revision-summary ((,class (:foreground ,yellow-4 :bold t
`(magit-diff-revision-summary-highlight ((,class (:foreground ,yellow-4 
:background ,yellow-1 :bold t
`(magit-diff-their ((,class (:foreground ,cyan-4 ;
`(magit-diff-their-highlight ((,class (:foreground ,cyan-6 :background 
,cyan-1



[nongnu] elpa/hyperdrive updated (b5dc019164 -> 2d3f038790)

2023-10-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/hyperdrive.

  from  b5dc019164 Merge: Add Transient menu interface
   new  d346006743 Change/Fix: (-menu) Keep transient open when going up to 
parent
   new  87f37a1d72 Fix: (hyperdrive-menu) Don't offer to delete current 
directory
   new  2d3f038790 Change: (hyperdrive-delete) Move into hyperdrive.el and 
autoload


Summary of changes:
 hyperdrive-dir.el  |  1 +
 hyperdrive-lib.el  | 40 
 hyperdrive-menu.el |  8 ++--
 hyperdrive.el  | 41 +
 4 files changed, 48 insertions(+), 42 deletions(-)



[nongnu] elpa/moe-theme updated (51795cd85e -> 1872aebc01)

2023-10-06 Thread ELPA Syncer
elpasync pushed a change to branch elpa/moe-theme.

  from  51795cd85e fix: more idomatic way to get second element of list
   new  c7af33b89c Add magit-diff-revision-summary, 
magit-diff-revision-summary-highlight
   new  137ce9dbde Use yellow on magit-diff-revision-summary, 
magit-diff-revision-summary-highlight
   new  1872aebc01 magit transient argument


Summary of changes:
 moe-dark-theme.el  | 8 +++-
 moe-light-theme.el | 6 ++
 2 files changed, 13 insertions(+), 1 deletion(-)



[nongnu] elpa/moe-theme c7af33b89c 1/3: Add magit-diff-revision-summary, magit-diff-revision-summary-highlight

2023-10-06 Thread ELPA Syncer
branch: elpa/moe-theme
commit c7af33b89c2ffac65c1d381da8e0b41f78b0d3d7
Author: ono ono 
Commit: ono ono 

Add magit-diff-revision-summary, magit-diff-revision-summary-highlight
---
 moe-dark-theme.el  | 2 ++
 moe-light-theme.el | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/moe-dark-theme.el b/moe-dark-theme.el
index 64ff0e6972..166816d773 100644
--- a/moe-dark-theme.el
+++ b/moe-dark-theme.el
@@ -481,6 +481,8 @@ Moe, moe, kyun!")
`(magit-diff-our-highlight ((,class (:foreground ,magenta-3 :background 
,magenta-00
`(magit-diff-removed ((,class (:foreground ,red-0 :background unspecified 
:bold t
`(magit-diff-removed-highlight ((,class (:foreground ,red-0 :bold t 
:inherit (magit-section-highlight)
+   `(magit-diff-revision-summary ((,class (:foreground ,white-0 :bold t
+   `(magit-diff-revision-summary-highlight ((,class (:foreground ,white-0 
:background ,blue-3 :bold t
`(magit-diff-their ((,class (:foreground ,cyan-4 ;
`(magit-diff-their-highlight ((,class (:foreground ,cyan-6 :background 
,cyan-1
`(magit-diff-whitespace-warning ((,class (:foreground ,red-3 :background 
,red-3
diff --git a/moe-light-theme.el b/moe-light-theme.el
index 7be9e60342..e9171c65e6 100644
--- a/moe-light-theme.el
+++ b/moe-light-theme.el
@@ -480,6 +480,8 @@ Moe, moe, kyun!")
`(magit-diff-our-highlight ((,class (:foreground ,magenta-3 :background 
,magenta-00
`(magit-diff-removed ((,class (:foreground ,red-2 :background unspecified 
:bold t
`(magit-diff-removed-highlight ((,class (:foreground ,red-2 :bold t 
:inherit (magit-section-highlight)
+   `(magit-diff-revision-summary ((,class (:foreground ,black-4 :bold t
+   `(magit-diff-revision-summary-highlight ((,class (:foreground ,yellow-4 
:background ,yellow-1 :bold t
`(magit-diff-their ((,class (:foreground ,cyan-4 ;
`(magit-diff-their-highlight ((,class (:foreground ,cyan-6 :background 
,cyan-1
`(magit-diff-whitespace-warning ((,class (:foreground ,red-3 :background 
,red-3



[nongnu] elpa/moe-theme 1872aebc01 3/3: magit transient argument

2023-10-06 Thread ELPA Syncer
branch: elpa/moe-theme
commit 1872aebc016e1c1a8d4e2a4037cd54b618de5453
Author: ono ono 
Commit: ono ono 

magit transient argument
---
 moe-dark-theme.el  | 6 +-
 moe-light-theme.el | 4 
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/moe-dark-theme.el b/moe-dark-theme.el
index b561209c5a..21a9e7a292 100644
--- a/moe-dark-theme.el
+++ b/moe-dark-theme.el
@@ -438,7 +438,7 @@ Moe, moe, kyun!")
`(diredp-ignored-file-name ((,class (:foreground ,black-2
`(diredp-link-priv ((,class (:foreground ,magenta-3
`(diredp-mode-line-flagged ((,class (:foreground ,black-5 :background 
,green-2
-   `(diredp-mode-line-marked ((,class (:foreground ,white-1 :background 
,magenta-3 bold t
+   `(diredp-mode-line-marked ((,class (:foreground ,white-1 :background 
,magenta-3 :bold t
`(diredp-no-priv ((,class (:foreground ,white-1 :background ,black-4
`(diredp-number ((,class (:foreground ,yellow-1
`(diredp-other-priv ((,class (:foreground ,white-1 :background ,blue-3
@@ -448,6 +448,10 @@ Moe, moe, kyun!")
`(diredp-write-priv ((,class (:foreground ,blue-5 :background ,blue-0
`(diredp-exec-priv ((,class (:foreground ,red-3 :background ,orange-0
 
+   ;; Transient (Mainly used in Magit)
+   `(transient-argument ((,class (:foreground ,orange-2 :background ,black-3 
:bold t
+   `(transient-heading ((,class (:foreground ,green-1 :background unspecified 
:underline t
+
;; Magit >= 2.1.0
`(magit-bisect-bad ((,class (:foreground ,red-3 :background ,red-00
`(magit-bisect-good ((,class (:foreground ,green-4 :background ,green-0
diff --git a/moe-light-theme.el b/moe-light-theme.el
index 443eb52e48..09c98b1f97 100644
--- a/moe-light-theme.el
+++ b/moe-light-theme.el
@@ -447,6 +447,10 @@ Moe, moe, kyun!")
`(diredp-write-priv ((,class (:foreground ,blue-5 :background ,blue-0
`(diredp-exec-priv ((,class (:foreground ,red-3 :background ,orange-0
 
+   ;; Transient (Mainly used in Magit)
+   `(transient-argument ((,class (:foreground ,orange-3 :background 
,orange-000 :bold t
+   `(transient-heading ((,class (:foreground ,green-3 :background unspecified 
:underline t
+
;; Magit >= 2.1.0
`(magit-bisect-bad ((,class (:foreground ,red-3 :background ,red-00
`(magit-bisect-good ((,class (:foreground ,green-4 :background ,green-0



[nongnu] elpa/eat aef8dae61b: Enable shell command completion by default

2023-10-06 Thread ELPA Syncer
branch: elpa/eat
commit aef8dae61b11e723668a19c7679486006c60629f
Author: Akib Azmain Turja 
Commit: Akib Azmain Turja 

Enable shell command completion by default

* eat.el (eat-mode): Use shell mode's completion facilities.
---
 eat.el | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/eat.el b/eat.el
index 57aaedc0f5..08127d2211 100644
--- a/eat.el
+++ b/eat.el
@@ -6612,6 +6612,8 @@ mouse-3: Switch to char mode"
   ;; Make sure glyphless character don't display a huge box glyph,
   ;; that would break the display.
   (eat--setup-glyphless-chars)
+  ;; Setup completion for line mode.
+  (shell-completion-vars)
   (when eat-enable-blinking-text
 (eat-blink-mode +1))
   (when eat-enable-shell-prompt-annotation



[elpa] externals/company 3ab242fcc7: (company-post-command): Catch 'quit' from 'doc-buffer'

2023-10-06 Thread ELPA Syncer
branch: externals/company
commit 3ab242fcc756a6c55e3a1609f840210cacdc86c7
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

(company-post-command): Catch 'quit' from 'doc-buffer'

Fixes #1408
---
 NEWS.md| 5 +
 company.el | 3 ++-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/NEWS.md b/NEWS.md
index a70a6a6cfb..2a16f0a0b7 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,10 @@
 # History of user-visible changes
 
+## Next
+
+* Better handling of `C-g` performed inside a `doc-buffer` handler
+  ([#1408](https://github.com/company-mode/company-mode/issues/1408)).
+
 ## 2023-10-06 (0.10.1)
 
 * Fix upgrading from 0.9.13 when the package is already loaded
diff --git a/company.el b/company.el
index a650cbcc52..5d732e214c 100644
--- a/company.el
+++ b/company.el
@@ -2232,7 +2232,8 @@ For more details see `company-insertion-on-trigger' and
 (when company-auto-update-doc
   (condition-case nil
   (company-show-doc-buffer)
-(user-error nil
+(user-error nil)
+(quit nil
 (let ((delay (company--idle-delay)))
  (and (numberp delay)
   (not defining-kbd-macro)



[elpa] externals/consult 41c18d4087: Refactor file preview

2023-10-06 Thread ELPA Syncer
branch: externals/consult
commit 41c18d408716222558e02e19a7db7a1afb40dace
Author: Daniel Mendler 
Commit: Daniel Mendler 

Refactor file preview
---
 consult.el | 57 ++---
 1 file changed, 30 insertions(+), 27 deletions(-)

diff --git a/consult.el b/consult.el
index acd449a1c8..3b36ab6ac2 100644
--- a/consult.el
+++ b/consult.el
@@ -1274,22 +1274,23 @@ ORIG is the original function, HOOKS the arguments."
   (with-silent-modifications
 (insert-file-contents name nil 0 consult-preview-partial-chunk))
   (goto-char (point-min))
-  (cond
-   ((save-excursion (search-forward "\0" nil 'noerror))
+  (when (save-excursion (search-forward "\0" nil 'noerror))
 (kill-buffer)
-(format "Binary file `%s' not previewed partially" name))
-   (t
-;; TODO: Check if most major modes work properly. Some may fail on
-;; partial files.
-(set-auto-mode)
-(font-lock-mode 1)
-(current-buffer
+(error "Binary file `%s' not previewed" name))
+  ;; TODO: Check if most major modes work properly. Some may fail on
+  ;; partial files.
+  (set-auto-mode)
+  (font-lock-mode 1)
+  (current-buffer))
   (with-current-buffer (find-file-noselect name 'nowarn)
-(cond
- ((bound-and-true-p so-long-detected-p)
+(when (bound-and-true-p so-long-detected-p)
+  (kill-buffer)
+  (error "File `%s' with long lines not previewed" name))
+(when (and (member major-mode '(fundamental-mode hexl-mode))
+   (save-excursion (search-forward "\0" nil 'noerror)))
   (kill-buffer)
-  (format "File `%s' with long lines not previewed" name))
- (t (current-buffer)))
+  (error "Binary file `%s' not previewed" name))
+(current-buffer)
 
 (defun consult--find-file-temporarily (name)
   "Open file NAME temporarily for preview."
@@ -1300,20 +1301,22 @@ ORIG is the original function, HOOKS the arguments."
(list k v (default-value k) (symbol-value k))
  (message "consult-preview-variables: The variable 
`%s' is not bound" k)
  nil))
- consult-preview-variables)))
-buf)
-(unwind-protect
-(progn
-  (advice-add #'run-hooks :around #'consult--filter-find-file-hook)
-  (pcase-dolist (`(,k ,v . ,_) vars)
-(set-default k v)
-(set k v))
-  (setq buf (consult--find-file-temporarily-1 name)))
-  (advice-remove #'run-hooks #'consult--filter-find-file-hook)
-  (pcase-dolist (`(,k ,_ ,d ,v) vars)
-(set-default k d)
-(set k v)))
-(if (stringp buf) (progn (message "%s" buf) nil) buf)))
+ consult-preview-variables
+(condition-case err
+(unwind-protect
+(progn
+  (advice-add #'run-hooks :around #'consult--filter-find-file-hook)
+  (pcase-dolist (`(,k ,v . ,_) vars)
+(set-default k v)
+(set k v))
+  (consult--find-file-temporarily-1 name))
+  (advice-remove #'run-hooks #'consult--filter-find-file-hook)
+  (pcase-dolist (`(,k ,_ ,d ,v) vars)
+(set-default k d)
+(set k v)))
+  (error
+   (message "%s" (cdr err))
+   nil
 
 (defun consult--temporary-files ()
   "Return a function to open files temporarily for preview."



[elpa] externals/org 4edfb69f86: * lisp/org-element.el (org-element--cache-for-removal): Add more logging

2023-10-06 Thread ELPA Syncer
branch: externals/org
commit 4edfb69f86857bd6712d7375eb00b160d7f2324d
Author: Ihor Radchenko 
Commit: Ihor Radchenko 

* lisp/org-element.el (org-element--cache-for-removal): Add more logging

Log cache warning value when updating robust cached elements.
---
 lisp/org-element.el | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index 7ea73637c4..476413c405 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -7043,7 +7043,8 @@ known element in cache (it may start after END)."
  '(:contents-end :end :robust-end)
'(:contents-end :end)))
 (org-element--cache-log-message
- "Shifting end positions of robust parent: %S"
+ "Shifting end positions of robust parent (warning %S): %S"
+ org-element--cache-change-warning
  (org-element--format-element up)))
 (unless (or
  ;; UP is non-robust.  Yet, if UP is headline, flagging
@@ -7065,7 +7066,8 @@ known element in cache (it may start after END)."
   (org-element-headline-parser 
nil 'fast))
 (when (org-element-type-p current 'headline)
   (org-element--cache-log-message
-   "Found non-robust headline that can be updated 
individually: %S"
+   "Found non-robust headline that can be updated 
individually (warning %S): %S"
+   org-element--cache-change-warning
(org-element--format-element current))
   (org-element-set up current 
org-element--cache-element-properties)
   t)))



[elpa] externals/exwm 86f43494eb: Bump version to 0.28

2023-10-06 Thread Adrián Medraño Calvo
branch: externals/exwm
commit 86f43494ebd056cd732fb1d10d440e0eba547228
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Bump version to 0.28
---
 exwm.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exwm.el b/exwm.el
index 4d6b451155..5745533720 100644
--- a/exwm.el
+++ b/exwm.el
@@ -4,7 +4,7 @@
 
 ;; Author: Chris Feng 
 ;; Maintainer: Adrián Medraño Calvo 
-;; Version: 0.27
+;; Version: 0.28
 ;; Package-Requires: ((xelb "0.18"))
 ;; Keywords: unix
 ;; URL: https://github.com/ch11ng/exwm



[elpa] externals/company cc52e4b919 1/2: Fix scrolling of doc buffer when company-auto-update-doc is used

2023-10-06 Thread ELPA Syncer
branch: externals/company
commit cc52e4b919154ae7876afd5f02f46101c0b9c9d3
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Fix scrolling of doc buffer when company-auto-update-doc is used

Fixes #1409
---
 company.el | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/company.el b/company.el
index 5d732e214c..fe5ead 100644
--- a/company.el
+++ b/company.el
@@ -2231,7 +2231,8 @@ For more details see `company-insertion-on-trigger' and
 (company-call-frontends 'post-command)
 (when company-auto-update-doc
   (condition-case nil
-  (company-show-doc-buffer)
+  (unless (company--electric-command-p)
+(company-show-doc-buffer))
 (user-error nil)
 (quit nil
 (let ((delay (company--idle-delay)))
@@ -2836,10 +2837,13 @@ from the candidates list.")
   '(scroll-other-window scroll-other-window-down mwheel-scroll)
   "List of Commands that won't break out of electric commands.")
 
+(defun company--electric-command-p ()
+  (memq this-command company--electric-commands))
+
 (defun company--electric-restore-window-configuration ()
   "Restore window configuration (after electric commands)."
   (when (and company--electric-saved-window-configuration
- (not (memq this-command company--electric-commands)))
+ (not (company--electric-command-p)))
 (set-window-configuration company--electric-saved-window-configuration)
 (setq company--electric-saved-window-configuration nil)))
 



[elpa] externals/company 22466f37e4 2/2: Don't make company-show-doc-buffer imply explicit-action-p

2023-10-06 Thread ELPA Syncer
branch: externals/company
commit 22466f37e4dd3817f87b0aeec8b5d9a9ce538b98
Author: Dmitry Gutov 
Commit: Dmitry Gutov 

Don't make company-show-doc-buffer imply explicit-action-p
---
 NEWS.md| 1 +
 company.el | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/NEWS.md b/NEWS.md
index 2a16f0a0b7..8498d26143 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -2,6 +2,7 @@
 
 ## Next
 
+* More `company-auto-update-doc`-related fixes.
 * Better handling of `C-g` performed inside a `doc-buffer` handler
   ([#1408](https://github.com/company-mode/company-mode/issues/1408)).
 
diff --git a/company.el b/company.el
index fe5ead..9c632e9666 100644
--- a/company.el
+++ b/company.el
@@ -2849,7 +2849,7 @@ from the candidates list.")
 
 (defmacro company--electric-do (&rest body)
   (declare (indent 0) (debug t))
-  `(when (company-manual-begin)
+  `(when company-candidates
  (cl-assert (null company--electric-saved-window-configuration))
  (setq company--electric-saved-window-configuration 
(current-window-configuration))
  (let ((height (window-height))



[elpa] externals/consult e5406f282f: Use memq

2023-10-06 Thread ELPA Syncer
branch: externals/consult
commit e5406f282f76076d10440037ecd3460fb280706c
Author: Daniel Mendler 
Commit: Daniel Mendler 

Use memq
---
 consult.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/consult.el b/consult.el
index 3b36ab6ac2..801f358f42 100644
--- a/consult.el
+++ b/consult.el
@@ -1286,7 +1286,7 @@ ORIG is the original function, HOOKS the arguments."
 (when (bound-and-true-p so-long-detected-p)
   (kill-buffer)
   (error "File `%s' with long lines not previewed" name))
-(when (and (member major-mode '(fundamental-mode hexl-mode))
+(when (and (memq major-mode '(fundamental-mode hexl-mode))
(save-excursion (search-forward "\0" nil 'noerror)))
   (kill-buffer)
   (error "Binary file `%s' not previewed" name))



[elpa] externals/company updated (3ab242fcc7 -> 22466f37e4)

2023-10-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/company.

  from  3ab242fcc7 (company-post-command): Catch 'quit' from 'doc-buffer'
   new  cc52e4b919 Fix scrolling of doc buffer when company-auto-update-doc 
is used
   new  22466f37e4 Don't make company-show-doc-buffer imply 
explicit-action-p


Summary of changes:
 NEWS.md|  1 +
 company.el | 10 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)



[elpa] externals/exwm 56db521a3e 2/2: Merge branch 'arnebab.github.com/master' into externals/exwm

2023-10-06 Thread ELPA Syncer
branch: externals/exwm
commit 56db521a3ed6a2ccc1193110a56545a1992e9654
Merge: 86f43494eb 31f0f0a9c7
Author: Adrián Medraño Calvo 
Commit: Adrián Medraño Calvo 

Merge branch 'arnebab.github.com/master' into externals/exwm
---
 exwm-input.el | 22 --
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/exwm-input.el b/exwm-input.el
index be3e8f465f..05b021093c 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -668,8 +668,26 @@ Current buffer must be an `exwm-mode' buffer."
 (defun exwm-input--fake-last-command ()
   "Fool some packages into thinking there is a change in the buffer."
   (setq last-command #'exwm-input--noop)
-  (run-hooks 'pre-command-hook)
-  (run-hooks 'post-command-hook))
+  ;; The Emacs manual says:
+  ;; > Quitting is suppressed while running pre-command-hook and
+  ;; > post-command-hook. If an error happens while executing one of these
+  ;; > hooks, it does not terminate execution of the hook; instead the error is
+  ;; > silenced and the function in which the error occurred is removed from 
the
+  ;; > hook.
+  ;; We supress errors but neither continue execution nor we remove from the
+  ;; hook.
+  (condition-case err
+  (run-hooks 'pre-command-hook)
+((error)
+ (exwm--log "Error occurred while running pre-command-hook: %s"
+(error-message-string err))
+ (xcb-debug:backtrace)))
+  (condition-case err
+  (run-hooks 'post-command-hook)
+((error)
+ (exwm--log "Error occurred while running post-command-hook: %s"
+(error-message-string err))
+ (xcb-debug:backtrace
 
 (defun exwm-input--on-KeyPress-line-mode (key-press raw-data)
   "Parse X KeyPress event to Emacs key event and then feed the command loop."



[elpa] externals/exwm 31f0f0a9c7 1/2: Catch and report all errors raised when invoking command hooks

2023-10-06 Thread ELPA Syncer
branch: externals/exwm
commit 31f0f0a9c7b8e1b7edf0309fc523d67ec90874f2
Author: David Wilson 
Commit: Adrián Medraño Calvo 

Catch and report all errors raised when invoking command hooks

* exwm-input.el (exwm-input--fake-last-command): Catch and report
all errors raised when invoking `pre-command-hook' and
`post-command-hook'.

Copyright-paperwork-exempt: yes
---
 exwm-input.el | 22 --
 1 file changed, 20 insertions(+), 2 deletions(-)

diff --git a/exwm-input.el b/exwm-input.el
index be3e8f465f..05b021093c 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -668,8 +668,26 @@ Current buffer must be an `exwm-mode' buffer."
 (defun exwm-input--fake-last-command ()
   "Fool some packages into thinking there is a change in the buffer."
   (setq last-command #'exwm-input--noop)
-  (run-hooks 'pre-command-hook)
-  (run-hooks 'post-command-hook))
+  ;; The Emacs manual says:
+  ;; > Quitting is suppressed while running pre-command-hook and
+  ;; > post-command-hook. If an error happens while executing one of these
+  ;; > hooks, it does not terminate execution of the hook; instead the error is
+  ;; > silenced and the function in which the error occurred is removed from 
the
+  ;; > hook.
+  ;; We supress errors but neither continue execution nor we remove from the
+  ;; hook.
+  (condition-case err
+  (run-hooks 'pre-command-hook)
+((error)
+ (exwm--log "Error occurred while running pre-command-hook: %s"
+(error-message-string err))
+ (xcb-debug:backtrace)))
+  (condition-case err
+  (run-hooks 'post-command-hook)
+((error)
+ (exwm--log "Error occurred while running post-command-hook: %s"
+(error-message-string err))
+ (xcb-debug:backtrace
 
 (defun exwm-input--on-KeyPress-line-mode (key-press raw-data)
   "Parse X KeyPress event to Emacs key event and then feed the command loop."



[elpa] externals/org-remark 6b4c196f86 12/75: feat: icon for line highlight

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 6b4c196f862e5dbc82aaeb4fe4af3dcd7a5f14a4
Author: Noboru Ota 
Commit: Noboru Ota 

feat: icon for line  highlight
---
 org-remark-icon.el |  4 ++--
 org-remark-line.el | 11 ++-
 2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 7b68bce085..4e50911ffe 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 03 August 2023
+;; Last modified: 05 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -152,7 +152,7 @@ Each overlay is a highlight."
   (ignore))
 
 (cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type 
(eql nil)))
-   (overlay-put ov 'after-string icon-string))
+  (overlay-put ov 'after-string icon-string))
 
 (defun org-remark-icon-propertize (icon-name highlight default-face)
   "Return a propertized string.
diff --git a/org-remark-line.el b/org-remark-line.el
index c436738321..1b4fdcebc0 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 04 August 2023
+;; Last modified: 05 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -157,6 +157,15 @@ end of overlay being identical."
 (unless (= ov-start ov-line-bol)
   (move-overlay ov ov-line-bol ov-line-bol
 
+(cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type 
(eql 'line)))
+  ;; If the icon-string has a display properties, assume it is an icon image
+  (let ((display-prop (get-text-property 0 'display icon-string)))
+(when display-prop
+  (let* ((display-prop (list '(margin left-margin) display-prop))
+ (icon-string (propertize "* " 'display display-prop))
+ (icon-string (propertize icon-string face 
'org-remark-line-highligther)))
+(overlay-put ov 'before-string icon-string)
+
 ;; (defun org-remark-line-inspect-overlay ()
 ;;   (interactive)
 ;;   (car (overlays-in (point) (point



[elpa] externals/org-remark a2311005ff 08/75: fix(line): Ensure line hl ovs are always at bol

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit a2311005ffc9edaf415bdf18996f5fb3824123a3
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): Ensure line hl ovs are always at bol
---
 org-remark-icon.el | 30 --
 org-remark-line.el | 39 ---
 org-remark.el  | 93 --
 3 files changed, 117 insertions(+), 45 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index bf324f9f30..7b68bce085 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 01 August 2023
+;; Last modified: 03 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -133,16 +133,26 @@ DEFAULT FACE must be a named face. It is optinal and can 
be nil.")
   "Add icons to OVERLAYS.
 Each overlay is a highlight."
   (dolist (ov overlays)
-(unless (string= "line" (overlay-get ov 'org-remark-type))
   ;; icons added to line highlighters differently from normal ones.
-  (cl-flet ((add-icon-maybe (icon)
-  (cl-destructuring-bind
-  (icon-name pred default-face) icon
-(when (funcall pred ov)
-  (org-remark-icon-propertize icon-name ov 
default-face)
-(let ((icon-string
-   (mapconcat #'add-icon-maybe org-remark-icons)))
-  (when icon-string (overlay-put ov 'after-string icon-string)))
+(cl-flet ((add-icon-maybe (icon)
+(cl-destructuring-bind
+(icon-name pred default-face) icon
+  (when (funcall pred ov)
+(org-remark-icon-propertize icon-name ov default-face)
+  (let ((icon-string
+ (mapconcat #'add-icon-maybe org-remark-icons)))
+(when icon-string (org-remark-icon-overlay-put
+   ov icon-string
+   (overlay-get ov 'org-remark-type)))
+
+(cl-defgeneric org-remark-icon-overlay-put (ov icon-string _org-remark-type)
+  "Default method to deal with icon.
+ This is used when a method specific \\='org-remark-type\\=' not
+ implemented."
+  (ignore))
+
+(cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type 
(eql nil)))
+   (overlay-put ov 'after-string icon-string))
 
 (defun org-remark-icon-propertize (icon-name highlight default-face)
   "Return a propertized string.
diff --git a/org-remark-line.el b/org-remark-line.el
index 1512021c35..a306946c8d 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 02 August 2023
+;; Last modified: 03 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -41,6 +41,8 @@
 
 (defvar org-remark-line-icon "*")
 
+(defvar org-remark-line-heading-title-max-length 40)
+
 (defvar org-remark-line-ellipsis "…")
 
 (defun org-remark-line-pos-bol (pos)
@@ -52,7 +54,7 @@
 (defun org-remark-line-highlight-p (highlight)
   "Return t if HIGHLIGHT is one for the line.
 HIGHLIGHT is an overlay."
-  (string= "line" (overlay-get highlight 'org-remark-type)))
+  (eql 'line (overlay-get highlight 'org-remark-type)))
 
 (defun org-remark-line-find (&optional point)
   "Return the line-highight (overlay) of the current line.
@@ -123,8 +125,37 @@ If the line is shorter than x, then up to the newline 
char."
 (string= line-text ""))
 "Empty line highlight"
   (setq line-text (string-trim-left line-text))
-  (if (length<  line-text 40) line-text
-(concat (substring line-text 0 39) org-remark-line-ellipsis)
+  (if (length<  line-text
+(1+ org-remark-line-heading-title-max-length))
+  line-text
+(concat (substring line-text 0 
org-remark-line-heading-title-max-length)
+org-remark-line-ellipsis)
+
+(cl-defmethod org-remark-highlights-adjust-positions-p ((org-remark-type (eql 
'line)))
+  nil)
+
+(cl-defmethod org-remark-highlights-housekeep-delete-p (_ov
+(org-remark-type (eql 
'line)))
+  "Always return nil when ORG-REMARK-TYPE is \\='line\\='.
+Line-highlights are designed to be zero length with the start and
+end of overlay being identical."
+  nil)
+
+(cl-defmethod org-remark-highlights-housekeep-remark-type (ov
+   (org-remark-type 
(eql 'line)))
+  "Ensure line-highlight OV is always at the beginning of line."
+  ;; if `pos-bol' is used to move, you can actually get the highlight to
+  ;; always follow the point, keeping the original place unless you
+  ;; directly change the notes. That's not really an intutive behaviou

[elpa] externals/org-remark 199702118a 30/75: fix(line): Disable line-mode should disable the margins

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 199702118ac0bf6a9bac168cda22e3d7b34060d6
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): Disable line-mode should disable the margins

Window margins are not set until there is a line-highlights Limitations:
when line-highlights exist, disabling `org-remark-line-mode` does not
remove the overlays and next/prev can still find them; however,
remove/delete no longer work on them.
---
 org-remark-line.el | 49 -
 org-remark.el  |  4 ++--
 2 files changed, 34 insertions(+), 19 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 25abebd909..6d56587031 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 15 August 2023
+;; Last modified: 18 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -50,12 +50,21 @@
 (defvar org-remark-line-margin-padding 1
   "Padding between the main text area the icon on the margin")
 
-(defvar-local org-remark-line-delayed-put-overlay-functions '()
-  "List of lambda functions that add a highlight.
-We need to delay adding highlight overlays until window is
-available for the current buffer. When the buffer visits a
-filefor the first time, the window has not been created before
-`org-remark-highlight-mark-overlay' is called.")
+(defvar-local org-remark-line-margins-original '()
+  "Original window margin width values.
+It is the original margins returned by function `window-margins'
+in cons cell (or nil) before function
+`org-remark-line-set-window-margins' set margins.")
+
+(defvar-local org-remark-line-margins-set-p nil
+  "State if margins are set by `org-remark-line' for current buffer.")
+
+;; (defvar-local org-remark-line-delayed-put-overlay-functions '()
+;;   "List of lambda functions that add a highlight.
+;; We need to delay adding highlight overlays until window is
+;; available for the current buffer. When the buffer visits a
+;; filefor the first time, the window has not been created before
+;; `org-remark-highlight-mark-overlay' is called.")
 
 ;;;###autoload
 (define-minor-mode org-remark-line-mode
@@ -79,7 +88,13 @@ filefor the first time, the window has not been created 
before
 )
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
- #'org-remark-line-set-window-margins :local)))
+ #'org-remark-line-set-window-margins :local)
+(when org-remark-line-margins-set-p
+  (setq left-margin-width (car org-remark-line-margins-original))
+  (setq right-marign-width (cdr org-remark-line-margins-original))
+  (set-window-margins nil left-margin-width right-margin-width)
+  (set-window-buffer (get-buffer-window) (current-buffer) nil)
+  (setq org-remark-line-margins-set-p nil
 
 ;; (defun org-remark-line-set-buffer-windows ()
 ;;   "
@@ -91,13 +106,11 @@ filefor the first time, the window has not been created 
before
 Return a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). If a
 marginal area does not exist, its width will be returned as nil."
   (when (and (windowp window) org-remark-line-mode)
-;;(message "size change used with a window argument")
-;; (when org-remark-line-delayed-put-overlay-functions
-;;   (dolist (fn (reverse org-remark-line-delayed-put-overlay-functions))
-;; (funcall fn))
-;;   (setq org-remark-line-delayed-put-overlay-functions nil))
 (cl-destructuring-bind (left-width . right-width) (window-margins)
   ;; TODO make this part compatible with right margin
+  (unless org-remark-line-margins-set-p
+(setq org-remark-line-margins-original (window-margins))
+(setq org-remark-line-margins-set-p t))
   (if (or (eq left-width nil) (< left-width
  org-remark-line-minimum-margin-width))
   (progn
@@ -105,8 +118,8 @@ marginal area does not exist, its width will be returned as 
nil."
 (setq right-margin-width org-remark-line-minimum-margin-width))
 (setq left-margin-width left-width)
 (setq right-margin-width right-width))
-  (set-window-buffer (get-buffer-window) (current-buffer) 'keep-margins)
   (set-window-margins nil left-margin-width right-margin-width)
+  (set-window-buffer window (current-buffer) 'keep-margins)
   (org-remark-highlights-load)
   (window-margins
 
@@ -144,9 +157,11 @@ by `overlays-in'."
 This is a method for highlights of ORG-REMARK-TYPE \\='line\\='.
 Return OV"
   (if (get-buffer-window)
-  ;; When revert-buffer is called, the window is already available
-  ;; but window size won't change.
-  (org-remark-line-highlight-overlay-put beg end face)
+  (progn
+(unless org-remark-lin

[elpa] externals/org-remark f679d00c0a 06/75: refactor(line): loading and renaming the el file

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit f679d00c0a523ba0c2e5f1b5cc44ea38968a50e6
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(line): loading and renaming the el file
---
 org-remark-line-highlighter.el | 130 -
 org-remark.el  |   2 -
 2 files changed, 132 deletions(-)

diff --git a/org-remark-line-highlighter.el b/org-remark-line-highlighter.el
deleted file mode 100644
index c81c4e1982..00
--- a/org-remark-line-highlighter.el
+++ /dev/null
@@ -1,130 +0,0 @@
-;;; org-remark-line.el --- Enable Org-roam to highlight a line -*- 
lexical-binding: t; -*-
-
-;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
-
-;; Author: Noboru Ota 
-;; URL: https://github.com/nobiot/org-remark
-;; Created: 01 August 2023
-;; Last modified: 02 August 2023
-;; Package-Requires: ((emacs "27.1") (org "9.4"))
-;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
-
-;; This file is not part of GNU Emacs.
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or (at
-;; your option) any later version.
-
-;; This program is distributed in the hope that it will be useful, but
-;; WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-;; General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program. If not, see .
-
-;;; Commentary:
-
-;;; Code:
-
-;;(require 'org-remark)
-
-(defface org-remark-line-highlighter
-  'class color) (min-colors 88) (background light))
- :foreground "#e2d980")
-(((class color) (min-colors 88) (background dark))
- :foreground "#e2d980")
-(t
- :inherit highlight))
-  "Face for the default line highlighter pen.")
-
-(defvar org-remark-line-icon "*")
-
-(defvar org-remark-line-ellipsis "…")
-
-(defun org-remark-line-pos-bol (pos)
-  "Return the beginning of the line position for POS."
-  (save-excursion
-(goto-char pos)
-(pos-bol)))
-
-(defun org-remark-line-highlight-p (highlight)
-  "Return t if HIGHLIGHT is one for the line.
-HIGHLIGHT is an overlay."
-  (string= "line" (overlay-get highlight 'org-remark-type)))
-
-(defun org-remark-line-find (&optional point)
-  "Return the line-highight (overlay) of the current line.
-When POINT is passed, one for the line it belongs to. If there
-are multiple line-hilights, return the car of the list returned
-by `overlays-in'."
-  (let* ((point (or point (point)))
- (bol (org-remark-line-pos-bol point))
- (highlights (overlays-in bol bol)))
-(seq-find #'org-remark-line-highlight-p highlights)))
-
-;; Depth is deeper than the default one for range highlight. This is to
-;; prioritize it over line-highlight when the fomer is at point and yet
-;; on the same line of another line-highlight.
-(add-hook 'org-remark-find-dwim-functions #'org-remark-line-find 80)
-
-(add-hook 'window-size-change-functions
-  #'(lambda (&rest args)
-  (set-window-margins nil 2)))
-
-;;;###autoload
-(defun org-remark-mark-line (beg end &optional id mode)
-  (interactive (org-remark-beg-end 'line))
-  (org-remark-highlight-mark beg end id mode  ;; LINE line function different
- ;; LINE needs to be the suffix of a
- ;; function: `org-remark-mark-'
- "line" nil ;; LINE important to put
- ;; the suffix of the label
- ;; to call this correct function
- (list 'org-remark-type 'line)))
-
-(cl-defmethod org-remark-beg-end ((org-remark-type (eql 'line)))
-(let ((bol (org-remark-line-pos-bol (point
-  (list bol bol)))
-
-(cl-defmethod org-remark-highlight-mark-overlay (ov face (org-remark-type (eql 
'line)))
-  (org-remark-line-highlight-overlay-put ov face) ;; LINE
-  (overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified)))
-
-(defun org-remark-line-highlight-overlay-put (ov face)
-  (let* ((face (or face 'org-remark-line-highlighter))
- (left-margin (or (car (window-margins))
-  ;; when nil = no margin, set to 1
-  (progn (set-window-margins nil 2)
- 2)))
- (spaces (- left-margin 2))
- (string (with-temp-buffer (insert-char ?\s spaces)
-   (insert org-remark-line-icon)
-   (buffer-string
-(overlay-put ov 'before-string (propertize "! " 'display
-   `((margin left-margin)
- ,(propertize string 'face 
face
-ov))
-
-(defun org-remark-line-hig

[elpa] externals/org-remark ded8fddddd 01/75: initial prototype to explore what needs to change

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit ded8fddd90d7f9dd813b2839f5ce17fe69dc
Author: Noboru Ota 
Commit: Noboru Ota 

initial prototype to explore what needs to change
---
 org-remark-line-highlighter.el | 125 +
 org-remark.el  |  12 ++--
 2 files changed, 133 insertions(+), 4 deletions(-)

diff --git a/org-remark-line-highlighter.el b/org-remark-line-highlighter.el
new file mode 100644
index 00..134af3104a
--- /dev/null
+++ b/org-remark-line-highlighter.el
@@ -0,0 +1,125 @@
+;;; org-remark-line.el --- Enable Org-roam to highlight a line -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
+
+;; Author: Noboru Ota 
+;; URL: https://github.com/nobiot/org-remark
+;; Created: 01 August 2023
+;; Last modified: 01 August 2023
+;; Package-Requires: ((emacs "27.1") (org "9.4"))
+;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see .
+
+;;; Commentary:
+
+;;; Code:
+
+(defun my/test-margin-left ()
+  (interactive)
+  (let* ((ov (make-overlay (line-beginning-position) 
(line-beginning-position)))
+ (left-margin (or (car (window-margins))
+  ;; when nil = no margin, set to 1
+  (progn (set-window-margins nil 2)
+ 2)))
+ (spaces (- left-margin 2))
+ (string (with-temp-buffer (insert-char ?\s spaces)
+   (insert "‣ ")
+   (buffer-string
+(overlay-put ov 'before-string (propertize "! " 'display
+   `((margin left-margin)
+ ,(propertize string 'face 
'modus-themes-markup-code))
+
+(defun test/get-beginning-of-line (pos)
+  "Return the beginning of the line position for POS."
+  (save-excursion
+(goto-char pos)
+(pos-bol)))
+
+
+(defun test/overlay-put-line-highlight (ov)
+  (let* ((left-margin (or (car (window-margins))
+  ;; when nil = no margin, set to 1
+  (progn (set-window-margins nil 2)
+ 2)))
+ (spaces (- left-margin 2))
+ (string (with-temp-buffer (insert-char ?\s spaces)
+   (insert " ")
+   (buffer-string
+(overlay-put ov 'before-string (propertize "! " 'display
+   `((margin left-margin)
+ ,(propertize string 'face 
'modus-themes-diff-refine-removed
+;;(overlay-put ov 'category "org-remark-line") ;; need to fix property add 
logic
+ov))
+
+;;;###autoload
+(defun org-remark-mark-line (beg end &optional id mode)
+  (interactive (org-remark-region-or-word))
+  (org-remark-line-highlight-mark beg end id mode
+  "line" nil ;; LINE needs to be the suffix of 
a function: `org-remark-mark-'
+  (list 'org-remark-type "line")))
+
+(defun org-remark-line-highlight-mark
+(beg end &optional id mode label face properties)
+  "Apply the FACE to the whole line that contains BEG."
+  ;; Ensure to turn on the local minor mode
+  (unless org-remark-mode (org-remark-mode +1))
+  ;; When highlights are toggled hidden, only the new one gets highlighted in
+  ;; the wrong toggle state.
+  (when org-remark-highlights-hidden (org-remark-highlights-show))
+  (let ((ov (make-overlay (test/get-beginning-of-line beg) 
(test/get-beginning-of-line beg))) ;; LINE without :front-advance
+;; UUID is too long; does not have to be the full length
+(id (if id id (substring (org-id-uuid) 0 8)))
+(filename (org-remark-source-find-file-name)))
+(if (not filename)
+(message (format "org-remark: Highlights not saved.\
+ This buffer (%s) is not supported" (symbol-name major-mode)))
+  (org-with-wide-buffer
+   ;;(overlay-put ov 'face (if face face 'org-remark-highlighter)) ;; LINE
+   (test/overlay-put-line-highlight ov) ;; LINE
+   (while properties ;; LINE add prop to indicate it is a line highlighter
+ (let ((prop (pop properties))
+   (val (pop properties)))
+   (

[elpa] externals/org-remark 447fc2beaf 04/75: feat(line): highlight level headline text

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 447fc2beaf13e9586796ddca6dba6edbd7aac506
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line): highlight level headline text

Trim spaces etc. and take the first 40 char. If longer, add an ellisis
at the end.
---
 org-remark-line-highlighter.el | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/org-remark-line-highlighter.el b/org-remark-line-highlighter.el
index 25520d04ae..9072c94857 100644
--- a/org-remark-line-highlighter.el
+++ b/org-remark-line-highlighter.el
@@ -41,6 +41,8 @@
 
 (defvar org-remark-line-icon "*")
 
+(defvar org-remark-line-ellipsis "…")
+
 (defun org-remark-line-pos-bol (pos)
   "Return the beginning of the line position for POS."
   (save-excursion
@@ -110,7 +112,16 @@ by `overlays-in'."
   (move-overlay ov (1+ beg) (1+ beg))
 
 (cl-defmethod org-remark-highlight-headline-text (ov (org-remark-type (eql 
'line)))
-  "Line highlight")
+  "Return the first x characters of the line.
+If the line is shorter than x, then up to the newline char."
+  (let ((line-text (buffer-substring-no-properties
+(overlay-start ov) (pos-eol
+(if (or (eq line-text nil)
+(string= line-text ""))
+"Empty line highlight"
+  (setq line-text (string-trim-left line-text))
+  (if (length<  line-text 40) line-text
+(concat (substring line-text 0 39) org-remark-line-ellipsis)
 
 (provide 'org-remark-line)
 ;;; org-remark-line.el ends here



[elpa] externals/org-remark 51c3d91585 11/75: refactor: create macro & menus

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 51c3d91585ee12353f83b3ce9b823932f3f515ad
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: create macro & menus

The `org-remark-create` macro has been changed to include the
line-highlight pen. This means that if the user creates pens in their
init file and compile it, they would need to recompile it.
---
 org-remark-line.el | 26 ++---
 org-remark.el  | 57 --
 2 files changed, 49 insertions(+), 34 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 20100ea936..c436738321 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 03 August 2023
+;; Last modified: 04 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -28,7 +28,7 @@
 
 ;;; Code:
 
-;;(require 'org-remark)
+(require 'org-remark)
 
 (defface org-remark-line-highlighter
   'class color) (min-colors 88) (background light))
@@ -76,15 +76,19 @@ by `overlays-in'."
   (set-window-margins nil 2)))
 
 ;;;###autoload
-(defun org-remark-mark-line (beg end &optional id mode)
-  (interactive (org-remark-beg-end 'line))
-  (org-remark-highlight-mark beg end id mode  ;; LINE line function different
- ;; LINE needs to be the suffix of a
- ;; function: `org-remark-mark-'
- "line" nil ;; LINE important to put
- ;; the suffix of the label
- ;; to call this correct function
- (list 'org-remark-type 'line)))
+;; (defun org-remark-mark-line (beg end &optional id mode)
+;;   (interactive (org-remark-beg-end 'line))
+;;   (org-remark-highlight-mark beg end id mode  ;; LINE line function 
different
+;;  ;; LINE needs to be the suffix of a
+;;  ;; function: `org-remark-mark-'
+;;  "line" nil ;; LINE important to put
+;;  ;; the suffix of the label
+;;  ;; to call this correct function
+;;  (list 'org-remark-type 'line)))
+
+(org-remark-create "line"
+   'org-remark-line-highlighter
+   '(org-remark-type line))
 
 (cl-defmethod org-remark-beg-end ((org-remark-type (eql 'line)))
 (let ((bol (org-remark-line-pos-bol (point
diff --git a/org-remark.el b/org-remark.el
index d395ef9a4d..84679aabcf 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1,4 +1,4 @@
- ;;; org-remark.el --- Highlight & annotate any text files -*- 
lexical-binding: t; -*-
+;;; org-remark.el --- Highlight & annotate any text files -*- lexical-binding: 
t; -*-
 
 ;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.1.0
 ;; Created: 22 December 2020
-;; Last modified: 03 August 2023
+;; Last modified: 05 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -198,7 +198,6 @@ add additional controls for the overlay properties")
 
 
  Macros to create user-defined highlighter pen functions
-
 (defmacro org-remark-create (label &optional face properties)
   "Create and register new highlighter pen functions.
 
@@ -247,7 +246,8 @@ highlight.  In this case, no new ID gets generated.
 When the pen itself defines the help-echo property, it will have
 the priority over the excerpt of the marginal notes."
   (or face "`org-remark-highlighter'") properties)
- (interactive (org-remark-region-or-word))
+ (interactive (org-remark-beg-end
+   (quote ,(plist-get (eval properties) 
'org-remark-type
  (org-remark-highlight-mark beg end id mode ,label ,face ,properties))
 
;; Register to `org-remark-available-pens'
@@ -266,7 +266,9 @@ the priority over the excerpt of the marginal notes."
  (lambda ()
(interactive)
(org-remark-change
-#',(intern (format "org-remark-mark-%s" label)
+#',(intern (format "org-remark-mark-%s" label
+ :enable (org-remark-pen-same-type-at-point-p
+  (quote ,(plist-get (eval properties) 
'org-remark-type
 
 
  Minor mode
@@ -340,35 +342,42 @@ recommended to turn it on as part of Emacs initialization.
 (define-key-after org-remark-menu-map
   [org-remark-open]
   '(menu-item "Open" org-remark-open
-  :help "Display and move to marginal notes for highlight at 
point"))
+  :help "Display and move to margi

[elpa] externals/org-remark 2bba54b535 05/75: fix: selecting wrong highlight when opening

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 2bba54b535fd3cde7a4187328aedb7d673607490
Author: Noboru Ota 
Commit: Noboru Ota 

fix: selecting wrong highlight when opening
---
 org-remark-line-highlighter.el | 5 -
 org-remark.el  | 8 
 2 files changed, 8 insertions(+), 5 deletions(-)

diff --git a/org-remark-line-highlighter.el b/org-remark-line-highlighter.el
index 9072c94857..c81c4e1982 100644
--- a/org-remark-line-highlighter.el
+++ b/org-remark-line-highlighter.el
@@ -64,7 +64,10 @@ by `overlays-in'."
  (highlights (overlays-in bol bol)))
 (seq-find #'org-remark-line-highlight-p highlights)))
 
-(add-hook 'org-remark-find-dwim-functions #'org-remark-line-find)
+;; Depth is deeper than the default one for range highlight. This is to
+;; prioritize it over line-highlight when the fomer is at point and yet
+;; on the same line of another line-highlight.
+(add-hook 'org-remark-find-dwim-functions #'org-remark-line-find 80)
 
 (add-hook 'window-size-change-functions
   #'(lambda (&rest args)
diff --git a/org-remark.el b/org-remark.el
index e3dc0051e5..46991f41ed 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -497,10 +497,10 @@ current buffer.
 This function ensures that there is only one cloned buffer for
 notes file by tracking it."
   (interactive "d\nP")
-  (when-let ((id (overlay-get (org-remark-find-dwim point)
-  'org-remark-id))
- (ibuf (org-remark-notes-buffer-get-or-create))
- (cbuf (current-buffer)))
+  (when-let* ((ov (org-remark-find-dwim point))
+  (id (overlay-get ov 'org-remark-id))
+  (ibuf (org-remark-notes-buffer-get-or-create))
+  (cbuf (current-buffer)))
 (pop-to-buffer ibuf org-remark-notes-display-buffer-action)
 (widen)
 (when-let (p (org-find-property org-remark-prop-id id))



[elpa] externals/org-remark 0f2bf566ee 10/75: docs(info): source comments

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 0f2bf566ee39651c67038f83a39751c08786280e
Author: Noboru Ota 
Commit: Noboru Ota 

docs(info): source comments
---
 org-remark-info.el | 25 +++--
 1 file changed, 11 insertions(+), 14 deletions(-)

diff --git a/org-remark-info.el b/org-remark-info.el
index b87902601d..6914e2c887 100644
--- a/org-remark-info.el
+++ b/org-remark-info.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 16 July 2023
-;; Last modified: 31 July 2023
+;; Last modified: 04 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -88,12 +88,14 @@ It is necessary as this function is intended to be used as 
part
 of advice for `Info-goto-node', which gets arguments passed to
 it. `org-remark-highlights-load' should be called with no
 arguments for the purpose of `org-remark-info-mode'."
-  ;; Enabling `org-remark-mode' runs `org-remark-highlight', which would
-  ;; result in duplicating the highlights if
-  ;; `org-remark-highlights-load' is run again. As this function must be
-  ;; run only once for initial load and only once for subsequent
-  ;; re-load, initial load and re-load needs to be differentiated. This
-  ;; `if' clause is meant to do this.
+  ;; Enabling `org-remark-mode' runs `org-remark-highlights-load', which
+  ;; would result in duplicating the highlights. As this function should
+  ;; be run only once for initial load or only once for subsequent
+  ;; re-load. This `if' statement is to differentiate the initial load
+  ;; when no Info node has been opened from subsequent reloads when the
+  ;; user moves to another Info node. In addition, `featurep' is used
+  ;; because variable `org-remark-mode' may not have been loaded yet to
+  ;; avoid symbol void.
   (if (or (not (featurep 'org-remark))
   (not org-remark-mode))
   (org-remark-mode +1)
@@ -108,9 +110,7 @@ arguments for the purpose of `org-remark-info-mode'."
 
 (defun org-remark-info-link (_filname _point)
   "Return \"info:\" link with current point in `Info-mode' buffer.
-
 This function only works when the mode is `Info-mode'.
-
 Assume the point is on the highlight in source Info document
 buffer and `ol-info' is loaded. The latter is necessary for
 `org-store-link' to work wiht Info buffer."
@@ -119,11 +119,8 @@ buffer and `ol-info' is loaded. The latter is necessary for
 
 (cl-defmethod org-remark-highlight-get-constructors (&context (major-mode 
Info-mode))
   "Construct lists for creating MAJOR-MODE specific hierarchy.
-
-This method is for `Info-mode'.
-
-Return the value in a alist like this:
-
+This method is for `Info-mode'. Return the value in a alist like
+this:
(SOURCE-FILENAME-FN TITLE-FN PROP-TO-FIND)"
   (let* ((headline-1 (list
   ;; SOURCE-FILENAME-FN



[elpa] externals/org-remark 15150c8d40 07/75: feat(line): highlight a whole line

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 15150c8d40dbfa8db1476a00b503a46b30be2051
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line): highlight a whole line

Likely to be v1.3. It involves a lot of refactoring to enable the
new pen type `line` while keeping the default `range` pen type in tact.
---
 org-remark-line.el | 130 +
 1 file changed, 130 insertions(+)

diff --git a/org-remark-line.el b/org-remark-line.el
new file mode 100644
index 00..1512021c35
--- /dev/null
+++ b/org-remark-line.el
@@ -0,0 +1,130 @@
+;;; org-remark-line.el --- Enable Org-roam to highlight a line -*- 
lexical-binding: t; -*-
+
+;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
+
+;; Author: Noboru Ota 
+;; URL: https://github.com/nobiot/org-remark
+;; Created: 01 August 2023
+;; Last modified: 02 August 2023
+;; Package-Requires: ((emacs "27.1") (org "9.4"))
+;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
+
+;; This file is not part of GNU Emacs.
+
+;; This program is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or (at
+;; your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+;; General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see .
+
+;;; Commentary:
+
+;;; Code:
+
+;;(require 'org-remark)
+
+(defface org-remark-line-highlighter
+  'class color) (min-colors 88) (background light))
+ :foreground "#dbba3f")
+(((class color) (min-colors 88) (background dark))
+ :foreground "#e2d980")
+(t
+ :inherit highlight))
+  "Face for the default line highlighter pen.")
+
+(defvar org-remark-line-icon "*")
+
+(defvar org-remark-line-ellipsis "…")
+
+(defun org-remark-line-pos-bol (pos)
+  "Return the beginning of the line position for POS."
+  (save-excursion
+(goto-char pos)
+(pos-bol)))
+
+(defun org-remark-line-highlight-p (highlight)
+  "Return t if HIGHLIGHT is one for the line.
+HIGHLIGHT is an overlay."
+  (string= "line" (overlay-get highlight 'org-remark-type)))
+
+(defun org-remark-line-find (&optional point)
+  "Return the line-highight (overlay) of the current line.
+When POINT is passed, one for the line it belongs to. If there
+are multiple line-hilights, return the car of the list returned
+by `overlays-in'."
+  (let* ((point (or point (point)))
+ (bol (org-remark-line-pos-bol point))
+ (highlights (overlays-in bol bol)))
+(seq-find #'org-remark-line-highlight-p highlights)))
+
+;; Depth is deeper than the default one for range highlight. This is to
+;; prioritize it over line-highlight when the fomer is at point and yet
+;; on the same line of another line-highlight.
+(add-hook 'org-remark-find-dwim-functions #'org-remark-line-find 80)
+
+(add-hook 'window-size-change-functions
+  #'(lambda (&rest args)
+  (set-window-margins nil 2)))
+
+;;;###autoload
+(defun org-remark-mark-line (beg end &optional id mode)
+  (interactive (org-remark-beg-end 'line))
+  (org-remark-highlight-mark beg end id mode  ;; LINE line function different
+ ;; LINE needs to be the suffix of a
+ ;; function: `org-remark-mark-'
+ "line" nil ;; LINE important to put
+ ;; the suffix of the label
+ ;; to call this correct function
+ (list 'org-remark-type 'line)))
+
+(cl-defmethod org-remark-beg-end ((org-remark-type (eql 'line)))
+(let ((bol (org-remark-line-pos-bol (point
+  (list bol bol)))
+
+(cl-defmethod org-remark-highlight-mark-overlay (ov face (org-remark-type (eql 
'line)))
+  (org-remark-line-highlight-overlay-put ov face) ;; LINE
+  (overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified)))
+
+(defun org-remark-line-highlight-overlay-put (ov face)
+  (let* ((face (or face 'org-remark-line-highlighter))
+ (left-margin (or (car (window-margins))
+  ;; when nil = no margin, set to 1
+  (progn (set-window-margins nil 2)
+ 2)))
+ (spaces (- left-margin 2))
+ (string (with-temp-buffer (insert-char ?\s spaces)
+   (insert org-remark-line-icon)
+   (buffer-string
+(overlay-put ov 'before-string (propertize "! " 'display
+   `((margin left-margin)
+ ,(propertize strin

[elpa] externals/org-remark ae376d860d 09/75: refactor(line): method name change

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit ae376d860db53d50593d1d95ffd208575508954d
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(line): method name change
---
 org-remark-line.el | 4 ++--
 org-remark.el  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index a306946c8d..20100ea936 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -141,8 +141,8 @@ Line-highlights are designed to be zero length with the 
start and
 end of overlay being identical."
   nil)
 
-(cl-defmethod org-remark-highlights-housekeep-remark-type (ov
-   (org-remark-type 
(eql 'line)))
+(cl-defmethod org-remark-highlights-housekeep-per-type (ov
+(org-remark-type (eql 
'line)))
   "Ensure line-highlight OV is always at the beginning of line."
   ;; if `pos-bol' is used to move, you can actually get the highlight to
   ;; always follow the point, keeping the original place unless you
diff --git a/org-remark.el b/org-remark.el
index c05623b144..d395ef9a4d 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1590,7 +1590,7 @@ Case 2. The overlay points to no buffer
 (delete-overlay ov))
   ;; Before deleting `org-remark-highlights', add a handler per
   ;; org-remark-type
-  (org-remark-highlights-housekeep-remark-type ov org-remark-type)
+  (org-remark-highlights-housekeep-per-type ov org-remark-type)
   ;; Update `org-remark-highlights' by removing the deleted overlays
   (unless (overlay-buffer ov)
 (setq org-remark-highlights (delete ov org-remark-highlights)
@@ -1605,7 +1605,7 @@ kept.
 The current buffer is source buffer."
   t)
 
-(cl-defgeneric org-remark-highlights-housekeep-remark-type (_ov 
_org-remark-type)
+(cl-defgeneric org-remark-highlights-housekeep-per-type (_ov _org-remark-type)
   (ignore))
 
 (defun org-remark-highlights-adjust-positions (overlays _notes-buf)



[elpa] externals/org-remark 56557549ec 16/75: refactor: Create macro to add function-put

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 56557549ec8bf7d562c3248ffe58f15a1a8aabcd
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: Create macro to add function-put
---
 org-remark.el | 67 +--
 1 file changed, 37 insertions(+), 30 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 225d54197d..cb2e997f02 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.1.0
 ;; Created: 22 December 2020
-;; Last modified: 05 August 2023
+;; Last modified: 06 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -219,11 +219,13 @@ property drawer from the highlighter pen.  To do this, 
prefix
 property names with \"org-remark-\" or use \"CATEGORY\"."
   (if (or (not label) (stringp label)
   (user-error "org-remark-create: Label is missing or not string"))
-`(progn
-   ;; Define custom pen function
-   (defun ,(intern (format "org-remark-mark-%s" label))
-   (beg end &optional id mode)
- ,(format "Apply the following face to the region selected by BEG and 
END.
+  (let ((org-remark-type
+ (symbol-name (plist-get (eval properties) 'org-remark-type
+`(progn
+   ;; Define custom pen function
+   (defun ,(intern (format "org-remark-mark-%s" label))
+   (beg end &optional id mode)
+ ,(format "Apply the following face to the region selected by BEG 
and END.
 
 %s
 
@@ -245,30 +247,35 @@ highlight.  In this case, no new ID gets generated.
 
 When the pen itself defines the help-echo property, it will have
 the priority over the excerpt of the marginal notes."
-  (or face "`org-remark-highlighter'") properties)
- (interactive (org-remark-beg-end
-   (quote ,(plist-get (eval properties) 
'org-remark-type
- (org-remark-highlight-mark beg end id mode ,label ,face ,properties))
-
-   ;; Register to `org-remark-available-pens'
-   (add-to-list 'org-remark-available-pens
-(intern (format "org-remark-mark-%s" ,label)))
-
-   ;; Add the custom pen function to the minor-mode menu
-   (define-key-after org-remark-pen-map
- [,(intern (format "org-remark-mark-%s" label))]
- '(menu-item ,(format "%s pen" label) ,(intern (format 
"org-remark-mark-%s" label
-
-   ;; Add the custom pen change function to the minor-mode menu
-   (define-key-after org-remark-change-pen-map
- [,(intern (format "org-remark-change-to-%s" label))]
- '(menu-item ,(format "%s pen" label)
- (lambda ()
-   (interactive)
-   (org-remark-change
-#',(intern (format "org-remark-mark-%s" label
- :enable (org-remark-pen-same-type-at-point-p
-  (quote ,(plist-get (eval properties) 
'org-remark-type
+  (or face "`org-remark-highlighter'") properties)
+ (interactive (org-remark-beg-end (intern ,org-remark-type)))
+ (org-remark-highlight-mark beg end id mode ,label ,face 
,properties))
+
+   ;; Register to `org-remark-available-pens'
+   (add-to-list 'org-remark-available-pens
+(intern (format "org-remark-mark-%s" ,label)))
+
+   ;; Add function prop This is for `org-remark-change' to show
+   ;; only the pens of the same type
+   (when 'org-remark-type (function-put
+   (intern (format "org-remark-mark-%s" 
,label))
+   'org-remark-type
+   (intern ,org-remark-type)))
+
+   ;; Add the custom pen function to the minor-mode menu
+   (define-key-after org-remark-pen-map
+ [,(intern (format "org-remark-mark-%s" label))]
+ '(menu-item ,(format "%s pen" label) ,(intern (format 
"org-remark-mark-%s" label
+
+   ;; Add the custom pen change function to the minor-mode menu
+   (define-key-after org-remark-change-pen-map
+ [,(intern (format "org-remark-change-to-%s" label))]
+ '(menu-item ,(format "%s pen" label)
+ (lambda ()
+   (interactive)
+   (org-remark-change
+#',(intern (format "org-remark-mark-%s" label
+ :enable (org-remark-pen-same-type-at-point-p (intern 
,org-remark-type
 
 
  Minor mode



[elpa] externals/org-remark 175ba6d06e 44/75: fix(line):when line-icon is an image, it fails to carry face

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 175ba6d06ec2dde56148c366eb609d81be53fdea
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line):when line-icon is an image, it fails to carry face

The notes icon from `org-remark-icon` package was made available to
`org-remrk-line`; however, it was assumed that the highlight the icon is
added to is an overlay added to the main text. This assumption does not
hold for line-highlights available with `org-remark-line`. It is likely
that the user customize the glyph to be displayed in the margin to be
an SVG icon. In this case, the notes icon (the icon that is added to the
highlight when the user has written an annotation to it) is added onto
another overlay to another SVG icon. This fix caters to this case, and
let the notes icon carry the same face as the underlying line-highlight
overlay.

LIMITATION made clear: if the user wants to use image icons (e.g. SVG
image icon created with package `icons', available Emacs 29.1 or
higher), it is limited to a single character with no space before and
after the character. This limitation does not apply to string of
characters without images, but it is generally assumed that the the
value set to this customizing variable will be a short string (e.g 3
characters long with a pair of parentheses before and after a single
character, such as the default value of icon customizing variables.
---
 org-remark-icon.el | 22 --
 org-remark-line.el | 84 +++---
 2 files changed, 74 insertions(+), 32 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 557e08f4f2..3cca7c1c31 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -46,7 +46,16 @@ and/or text-property to the string. This means you can 
return a
 string with a display property to show an SVG icon instead of the
 underlying string.
 
-Nil means no icon is to be displayed."
+Nil means no icon is to be displayed.
+
+If you wants to use image icons (e.g. SVG image icon created with
+package `icons', available Emacs 29.1 or higher), you're limited
+to a single character with no space before and after the
+character. This limitation does not apply to string of characters
+without images, but it is generally assumed that the the value
+set to this customizing variable will be a short string (e.g 3
+characters long with a pair of parentheses before and after a
+single character, such as the default value.)"
   :safe #'stringp
   :type '(choice
   (string "(*)")
@@ -63,7 +72,16 @@ and/or text-property to the string. This means you can 
return a
 string with a display property to show an SVG icon instead of the
 underlying string.
 
-Nil means no icon is to be displayed."
+Nil means no icon is to be displayed.
+
+If you wants to use image icons (e.g. SVG image icon created with
+package `icons', available Emacs 29.1 or higher), you're limited
+to a single character with no space before and after the
+character. This limitation does not apply to string of characters
+without images, but it is generally assumed that the the value
+set to this customizing variable will be a short string (e.g 3
+characters long with a pair of parentheses before and after a
+single character, such as the default value."
   :safe #'stringp
   :type '(choice
   (string "(d)")
diff --git a/org-remark-line.el b/org-remark-line.el
index 59a32e3c61..8eec55ebee 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -30,6 +30,25 @@
 
 (require 'org-remark)
 
+(defcustom org-remark-line-icon " * "
+  "Glyph displayed on the margin to indicate the line-highlight.
+If you wants to use image icons (e.g. SVG image icon created with
+package `icons', available Emacs 29.1 or higher), you're limited
+to a single character with no space before and after the
+character. This limitation does not apply to string of characters
+without images, but it is generally assumed that the the value
+set to this customizing variable will be a short string (e.g 3
+characters long with a padding spaces before and after a single
+character, such as the default value.)"
+  :local t
+  :type 'string
+  :safe 'stringp)
+
+(defvar org-remark-line-minimum-margin-width 3)
+
+(defvar org-remark-line-margin-padding 1
+  "Padding between the main text area the icon on the margin")
+
 (defcustom org-remark-line-margin-side 'left-margin
   "The side of margin to display line highlights.
 Left or rigth can be chosen."
@@ -38,6 +57,10 @@ Left or rigth can be chosen."
   (const :tag "Left margin" left-margin)
   (const :tag "Right margin" right-margin)))
 
+(defvar org-remark-line-heading-title-max-length 40)
+
+(defvar org-remark-line-ellipsis "…")
+
 (defface org-remark-line-highlighter
   'class color) (min-colors 88) (background light))
  :foreground "#dbba3f")
@@ -47,8 +70,6 @@ Left or rigth can be chosen."
  :inherit highlight))
   "Face for the de

[elpa] externals/org-remark 89ee82935c 14/75: fix: window margins do not persist

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 89ee82935ca9eb68535b4b05d63a4fe0292ca7d8
Author: Noboru Ota 
Commit: Noboru Ota 

fix: window margins do not persist

Adapt the way Olivetti does it.
---
 org-remark-line.el | 59 +-
 org-remark.el  |  2 ++
 2 files changed, 47 insertions(+), 14 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 93b118f857..9e3ad39c51 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -45,6 +45,47 @@
 
 (defvar org-remark-line-ellipsis "…")
 
+;;;###autoload
+(define-minor-mode org-remark-line-mode
+  "Enable Org-remark to highlight and annotate the whole line."
+  :global nil
+  :group 'org-remark
+  (if org-remark-line-mode
+  ;; Enable
+  (progn
+;; Depth is deeper than the default one for range highlight.
+;; This is to prioritize it over line-highlight when the fomer
+;; is at point and yet on the same line of another
+;; line-highlight.
+(add-hook 'org-remark-find-dwim-functions
+  #'org-remark-line-find 80 :local)
+(add-hook 'window-size-change-functions
+  #'org-remark-line-set-window-margins nil :local)
+;; (add-hook 'text-scale-mode-hook
+;;   #'org-remark-line-set-buffer-windows nil :local)
+(org-remark-line-set-buffer-windows))
+(remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
+(remove-hook 'window-size-change-functions
+ #'org-remark-line-set-window-margins :local)
+(remove-hook 'text-scale-mode-hook
+  #'org-remark-line-set-buffer-windows :local)))
+
+(defun org-remark-line-set-buffer-windows ()
+  "
+Adapted from Olivetti mode"
+  (mapc #'org-remark-line-set-window-margins
+(get-buffer-window-list nil nil 'visible)))
+
+(defun org-remark-line-set-window-margins (window-or-frame)
+  "Set the margins of current window that displays current buffer.
+Return a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). If a
+marginal area does not exist, its width will be returned as nil."
+  (when (and (windowp window-or-frame) org-remark-line-mode)
+(cl-destructuring-bind (left-width . right-width) (window-margins)
+  (when (or (eq left-width nil) (< left-width 3))
+(set-window-margins nil 3))
+  (window-margins
+
 (defun org-remark-line-pos-bol (pos)
   "Return the beginning of the line position for POS."
   (save-excursion
@@ -66,14 +107,6 @@ by `overlays-in'."
  (highlights (overlays-in bol bol)))
 (seq-find #'org-remark-line-highlight-p highlights)))
 
-;; Depth is deeper than the default one for range highlight. This is to
-;; prioritize it over line-highlight when the fomer is at point and yet
-;; on the same line of another line-highlight.
-(add-hook 'org-remark-find-dwim-functions #'org-remark-line-find 80)
-
-(add-hook 'window-size-change-functions
-  #'(lambda (&rest args)
-  (set-window-margins nil 2)))
 
 ;;;###autoload
 ;; (defun org-remark-mark-line (beg end &optional id mode)
@@ -100,13 +133,11 @@ by `overlays-in'."
 
 (defun org-remark-line-highlight-overlay-put (ov face &optional string)
   (let* ((face (or face 'org-remark-line-highlighter))
- (left-margin (or (car (window-margins))
-  ;; when nil = no margin, set to 1
-  (progn (set-window-margins nil 2)
- 2)))
- (spaces (- left-margin 2))
+ (left-margin (car (org-remark-line-set-window-margins
+(get-buffer-window
+ ;;(spaces (- left-margin 1))
  (string (or string
- (with-temp-buffer (insert-char ?\s spaces)
+ (with-temp-buffer ;;(insert-char ?\s spaces)
(insert org-remark-line-icon)
(buffer-string)
 (overlay-put ov 'before-string (propertize "! " 'display
diff --git a/org-remark.el b/org-remark.el
index 84679aabcf..6b5e95dcc9 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -315,6 +315,7 @@ recommended to turn it on as part of Emacs initialization.
  (org-remark-mode
   ;; Activate
   (org-remark-icon-mode +1) ;; automatically enabled by default
+  (org-remark-line-mode +1)
   (org-remark-highlights-load)
   (add-hook 'after-save-hook #'org-remark-save nil t)
   (add-hook 'org-remark-highlight-link-to-source-functions
@@ -328,6 +329,7 @@ recommended to turn it on as part of Emacs initialization.
   (delete-overlay highlight)))
   (setq org-remark-highlights nil)
   (org-remark-icon-mode -1)
+  (org-remark-line-mode -1)
   (remove-hook 'after-save-hook #'org-remark-save t)
   (remove-hook 'org-remark-highlight-link-to-source-functions
#'org-remark-highlight-link-to-source-default)



[elpa] externals/org-remark 94ba0ecea0 21/75: fix(line): When source narrowed, existing line-hls move wrongly

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 94ba0ecea0a585b3b13e2b9dce2ba2fdbc8cb85c
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): When source narrowed, existing line-hls move wrongly
---
 org-remark.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index 18fb9dd5ac..407cea5f0c 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1628,7 +1628,8 @@ Case 2. The overlay points to no buffer
 (delete-overlay ov))
   ;; Before deleting `org-remark-highlights', add a handler per
   ;; org-remark-type
-  (org-remark-highlights-housekeep-per-type ov org-remark-type)
+  (org-with-wide-buffer
+   (org-remark-highlights-housekeep-per-type ov org-remark-type))
   ;; Update `org-remark-highlights' by removing the deleted overlays
   (unless (overlay-buffer ov)
 (setq org-remark-highlights (delete ov org-remark-highlights)



[elpa] externals/org-remark 3a9884e5df 26/75: fix(line): When buffer is first created, window may not be created

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 3a9884e5dff5e34c71519345df06f119e8667102
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): When buffer is first created, window may not be created

`get-buffer-window` may not return when the buffer is already created.
This happens when the user opens the file (find-file, recentf-file,
etc.). In this case, delay calling the overlay-put functions to
`window-size-change-function`.
---
 org-remark-line.el | 49 -
 1 file changed, 40 insertions(+), 9 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index f38ce3463b..383fca9c09 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 07 August 2023
+;; Last modified: 10 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -45,6 +45,13 @@
 
 (defvar org-remark-line-ellipsis "…")
 
+(defvar-local org-remark-line-delayed-put-overlay-functions '()
+  "List of lambda functions that add a highlight.
+We need to delay adding highlight overlays until window is
+available for the current buffer. When the buffer visits a
+filefor the first time, the window has not been created before
+`org-remark-highlight-mark-overlay' is called.")
+
 ;;;###autoload
 (define-minor-mode org-remark-line-mode
   "Enable Org-remark to highlight and annotate the whole line."
@@ -60,8 +67,9 @@
 (add-hook 'org-remark-find-dwim-functions
   #'org-remark-line-find 80 :local)
 (add-hook 'window-size-change-functions
-  #'org-remark-line-set-window-margins nil :local)
-(org-remark-line-set-buffer-windows))
+ #'org-remark-line-set-window-margins nil :local)
+;;(org-remark-line-set-buffer-windows))
+)
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)))
@@ -77,8 +85,15 @@ Adapted from Olivetti mode"
 Return a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). If a
 marginal area does not exist, its width will be returned as nil."
   (when (and (windowp window-or-frame) org-remark-line-mode)
+;;(message "size change used with a window argument")
+(when org-remark-line-delayed-put-overlay-functions
+  (dolist (fn (reverse org-remark-line-delayed-put-overlay-functions))
+(funcall fn))
+  (setq org-remark-line-delayed-put-overlay-functions nil))
 (cl-destructuring-bind (left-width . right-width) (window-margins)
   (when (or (eq left-width nil) (< left-width 3))
+(setq left-margin-width 3)
+(set-window-buffer (get-buffer-window) (current-buffer) 'keep-margins)
 (set-window-margins nil 3))
   (window-margins
 
@@ -114,13 +129,19 @@ by `overlays-in'."
 (cl-defmethod org-remark-highlight-mark-overlay (ov face (org-remark-type (eql 
'line)))
   "Put FACE and other necessary properties to the highlight OV.
 This is a method for highlights of ORG-REMARK-TYPE \\='line\\='."
-  (org-remark-line-highlight-overlay-put ov face)
-  (overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified)))
+  (if (get-buffer-window)
+  ;; When revert-buffer is called, the window is already available
+  ;; but window size won't change.
+  (org-remark-line-highlight-overlay-put ov face)
+(push (lambda ()
+(org-remark-line-highlight-overlay-put ov face))
+org-remark-line-delayed-put-overlay-functions)))
 
 (defun org-remark-line-highlight-overlay-put (ov face &optional string)
   (let* ((face (or face 'org-remark-line-highlighter))
- (left-margin (car (org-remark-line-set-window-margins
-(get-buffer-window
+ ;;(left-margin (car (org-remark-line-set-window-margins
+ ;;   (get-buffer-window
+ ;;(left-margin 3)
  ;;(spaces (- left-margin 1))
  (string (or string
  (with-temp-buffer ;;(insert-char ?\s spaces)
@@ -129,6 +150,7 @@ This is a method for highlights of ORG-REMARK-TYPE 
\\='line\\='."
 (overlay-put ov 'before-string (propertize "! " 'display
`((margin left-margin)
  ,(propertize string 'face 
face
+(overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified))
 ov))
 
 (defun org-remark-line-highlight-modified (ov after-p beg end &optional length)
@@ -154,6 +176,8 @@ If the line is shorter than x, then up to the newline char."
 org-remark-line-ellipsis)
 
 (cl-defmethod org-remark-highlights-adjust-positions-p ((org-remark-type (eql 
'line)))
+  "
+For line-highlights, adjust-positi

[elpa] externals/org-remark 8020d33380 47/75: docs: organize customizing groups

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 8020d33380addbb484ad78ca5fe3be613d23e09f
Author: Noboru Ota 
Commit: Noboru Ota 

docs: organize customizing groups
---
 org-remark-eww.el  | 4 ++--
 org-remark-icon.el | 2 +-
 org-remark-info.el | 4 ++--
 org-remark-nov.el  | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/org-remark-eww.el b/org-remark-eww.el
index 7d8ee02769..2435c10978 100644
--- a/org-remark-eww.el
+++ b/org-remark-eww.el
@@ -6,7 +6,7 @@
 ;;  Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 23 December 2022
-;; Last modified: 25 June 2023
+;; Last modified: 19 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -41,7 +41,7 @@
 (define-minor-mode org-remark-eww-mode
   "Enable Org-remark to work with EWW."
   :global t
-  :group 'org-remark
+  :group 'org-remark-eww
   (if org-remark-eww-mode
   ;; Enable
   (progn
diff --git a/org-remark-icon.el b/org-remark-icon.el
index 3cca7c1c31..9ccdd2e7d1 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -30,7 +30,7 @@
 (require 'cl-macs)
 
 (defgroup org-remark-icon nil
-  "Highlight and annotate any text files with using Org mode."
+  "Enable `org-remark' to display glyph/icon indicators."
   :group 'org-remark
   :prefix "org-remark-icon"
   :link '(url-link :tag "GitHub" "https://github.com/nobiot/org-remark";))
diff --git a/org-remark-info.el b/org-remark-info.el
index 6914e2c887..fc07589aaa 100644
--- a/org-remark-info.el
+++ b/org-remark-info.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 16 July 2023
-;; Last modified: 04 August 2023
+;; Last modified: 19 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -64,7 +64,7 @@
 (define-minor-mode org-remark-info-mode
   "Enable Org-remark to work with `Info-mode' for Info documentation reader."
   :global t
-  :group 'org-remark
+  :group 'org-remark-info
   (if org-remark-info-mode
   ;; Enable
   (progn
diff --git a/org-remark-nov.el b/org-remark-nov.el
index 8674f219fa..1fd2f7d292 100644
--- a/org-remark-nov.el
+++ b/org-remark-nov.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 9 January 2023
-;; Last modified: 29 July 2023
+;; Last modified: 19 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -62,7 +62,7 @@
 (define-minor-mode org-remark-nov-mode
   "Enable Org-remark to work with `nov-mode' for eub."
   :global t
-  :group 'org-remark
+  :group 'org-remark-nov
   (if org-remark-nov-mode
   ;; Enable
   (progn



[elpa] externals/org-remark 822e730fc8 75/75: Merge branch 'dev/1.3.0'

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 822e730fc8d32eef80686f637dab8bcf2cbcdf53
Merge: c33e2b7c77 7a9c0454b2
Author: Noboru Ota 
Commit: Noboru Ota 

Merge branch 'dev/1.3.0'
---
 NEWS   |  16 +-
 README-elpa|  34 +-
 README.org |  30 +-
 ...0T184309_C_how-to-set-icons-to-be-svg-images.md |   6 +-
 docs/org-remark.org| 195 -
 org-remark-eww.el  |   4 +-
 org-remark-icon.el |  80 +-
 org-remark-info.el |  29 +-
 org-remark-line.el | 425 +++
 org-remark-nov.el  |   6 +-
 org-remark.el  | 806 ++---
 11 files changed, 1314 insertions(+), 317 deletions(-)

diff --git a/NEWS b/NEWS
index 39e86c24e1..5ee5010050 100644
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,19 @@
-Current development version
-  - fix: compiler warning ‘org-remark-highlight-save’ is an obsolete...
+Current development version (release candidate 1.3.0)
+
+ Features:
+
+   - Ability to highlight a whole line and show a mark on the margin (#71)
+
+   - Option to delete the whole notes entry when highlight is removed if
+ there is no notes body text (#21)
+
+   - `org-remark-open` to open the associated marginal notes file if
+ cursor outside a highlight (#72)
+
+   - fix: compiler warning ‘org-remark-highlight-save’ is an obsolete...
 
 Version 1.2.1 - 2023-08-20
+
   - fix: org-remark-icon-mode is a void symbol
 
 Version 1.2.0 - 2023-08-20
diff --git a/README-elpa b/README-elpa
index eca34e0481..a86998ea22 100644
--- a/README-elpa
+++ b/README-elpa
@@ -37,7 +37,8 @@ _
   For customization, refer to the customization group `org-remark' or
   user manual: [online] or Info node `(org-remark) Customizing'. A
   [separate online article] has been written to guide you on how to
-  customize an icon (to be incorporated into the user manual later).
+  customize an icon (also part of the user manual. Evaluate (info
+  "(or-gremark) How to Set Org-remark to Use SVG Icons").
 
   An [introductory video] (8 minutes) and [V1.1.0 release introduction]
   (12 minutes) are available on YouTube.
@@ -91,8 +92,7 @@ _
   This package is available on:
 
   - [GNU-ELPA] (releases only; equivalent to MELPA-Stable)
-  - [GNU-devel ELPA] (unreleased development branch; equivalent to
-MELPA)
+  - [GNU-devel ELPA] (unreleased main branch; equivalent to MELPA)
 
   GNU ELPA should be already set up in your Emacs by default. If you
   wish to add GNU-devel ELPA, simply add its URL to `package-archives'
@@ -146,6 +146,34 @@ _
   |   (define-key org-remark-mode-map (kbd "C-c n d") #'org-remark-delete))
   `
 
+  Alternatively, you can use `use-package' to set up Org-remark. The
+  example provided below should be equivalent to the setup described
+  above.
+
+  ,
+  | (use-package org-remark
+  |   :bind (;; :bind keyword also implicitly defers org-remark itself.
+  |  ;; Keybindings before :map is set for global-map.
+  |  ("C-c n m" . org-remark-mark)
+  |  :map org-remark-mode-map
+  |  ("C-c n o" . org-remark-open)
+  |  ("C-c n ]" . org-remark-view-next)
+  |  ("C-c n [" . org-remark-view-prev)
+  |  ("C-c n r" . org-remark-remove)
+  |  ("C-c n d" . org-remark-delete))
+  |   ;; Alternative way to enable `org-remark-global-tracking-mode' in
+  |   ;; `after-init-hook'.
+  |   ;; :hook (after-init . org-remark-global-tracking-mode)
+  |   :init
+  |   ;; It is recommended that `org-remark-global-tracking-mode' be
+  |   ;; enabled when Emacs initializes. Alternatively, you can put it to
+  |   ;; `:after-init-hook' to load it after Emacs has been initialized.
+  |   (org-remark-global-tracking-mode +1)
+  |   (use-package org-remark-info :after info :config (org-remark-info-mode 
+1))
+  |   (use-package org-remark-eww  :after eww  :config (org-remark-eww-mode 
+1))
+  |   (use-package org-remark-nov  :after nov  :config (org-remark-nov-mode 
+1)))
+  `
+
 
 [GNU-ELPA] 
 
diff --git a/README.org b/README.org
index 7a005d9409..f3e69bc3c5 100644
--- a/README.org
+++ b/README.org
@@ -20,7 +20,7 @@ For installation and minimum configuration, refer to 
[[#installation][Installati
 
 Getting Started in the user manual will get you started in 5 minutes: 
[[https://nobiot.github.io/org-remark/#Getting-Started][online]] or or Info 
node `(org-remark) Getting Started'.
 
-For customization, refer to the customization group `org-remark' or user 
manual: [[https://nobiot.github.io/org-remark/#Customizing][online]] or Info 
node `(org-remark) Customizing'. A 
[[https://github.com/nobiot/org-remark/tree/main/docs/articles/2023-08-20T1843

[elpa] externals/org-remark cbc26304a8 23/75: refactor: add org-remark-default-features to automatically load

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit cbc26304a8caf3a79d0c1b5e454a5174df4786a1
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: add org-remark-default-features to automatically load

In addition to the default features to load, variable
org-remark-default-feature-modes is also added to enable the extensions
automatically. Initially we have org-remark-icon and org-remark-line.
---
 org-remark-icon.el |  6 +++---
 org-remark.el  | 52 
 2 files changed, 31 insertions(+), 27 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 2203f48c5e..46b8c5eea6 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 05 August 2023
+;; Last modified: 07 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -161,13 +161,13 @@ Each overlay is a highlight."
 ;; image icon is used instead of a string."
 ;;   (when (get-text-property 0 'display icon-string)))
 
-(cl-defgeneric org-remark-icon-overlay-put (ov icon-string _org-remark-type)
+(cl-defgeneric org-remark-icon-overlay-put (_ov _icon-string _org-remark-type)
   "Default method to deal with icon.
  This is used when a method specific \\='org-remark-type\\=' not
  implemented."
   (ignore))
 
-(cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type 
(eql nil)))
+(cl-defmethod org-remark-icon-overlay-put (ov icon-string (_org-remark-type 
(eql nil)))
   (overlay-put ov 'after-string icon-string))
 
 (defun org-remark-icon-propertize (icon-name highlight default-face)
diff --git a/org-remark.el b/org-remark.el
index 9687f5fc03..9ca48e08e3 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.1.0
 ;; Created: 22 December 2020
-;; Last modified: 06 August 2023
+;; Last modified: 07 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -40,8 +40,6 @@
 (require 'org-remark-global-tracking)
 (declare-function org-remark-convert-legacy-data "org-remark-convert-legacy")
 
-(defvar org-remark-find-dwim-functions (list 
#'org-remark-find-overlay-at-point))
-
 
  Customization
 
@@ -139,6 +137,21 @@ highlights. It is run with the source buffer as current 
buffer."
 
  Variables
 
+(defvar org-remark-default-features '(org-remark-icon org-remark-line))
+(defvar org-remark-default-feature-modes '(org-remark-icon-mode 
org-remark-line-mode))
+(defvar org-remark-find-dwim-functions '(org-remark-find-overlay-at-point))
+
+(defvar org-remark-last-notes-buffer nil
+  "The cloned indirect buffer visiting the notes file.
+It is meant to exist only one of these in each Emacs session.")
+
+(defvar org-remark-available-pens (list #'org-remark-mark)
+  "A list of pens available.
+Each pen is a function. Users can create a new custom pen with
+using `org-remark-create', which automatically add a new pen
+function this list. It is used by `org-remark-change' as a
+selection list.")
+
 (defvar-local org-remark-highlights '()
   "All the highlights in current source buffer.
 It is a local variable and is a list of overlays.  Each overlay
@@ -161,18 +174,7 @@ killed so that this needs to be checked with 
`buffer-live-p'.")
 (defvar-local org-remark-source-setup-done nil
   "Local indicator that sync with notes buffer is set up.")
 
-(defvar org-remark-last-notes-buffer nil
-  "The cloned indirect buffer visiting the notes file.
-It is meant to exist only one of these in each Emacs session.")
-
-(defvar org-remark-available-pens (list #'org-remark-mark)
-  "A list of pens available.
-Each pen is a function. Users can create a new custom pen with
-using `org-remark-create', which automatically add a new pen
-function this list. It is used by `org-remark-change' as a
-selection list.")
-
-(defvar org-remark-highlights-toggle-hide-functions nil
+(defvar-local org-remark-highlights-toggle-hide-functions nil
   "Functions to be called when toggling to hide highlights.
 Each function is called with one argument HIGHLIGHT, which is an
 overlay that shows the highlight. It also stores properties to
@@ -181,7 +183,7 @@ control visibility such as \\=':face\\='.
 This variable is an abnormal hook and is intended to be used to
 add additional controls for the overlay properties.")
 
-(defvar org-remark-highlights-toggle-show-functions nil
+(defvar-local org-remark-highlights-toggle-show-functions nil
   "Functions to be called when toggling to show highlights.
 Each function is called with one argument HIGHLIGHT, which is an
 overlay that shows the highlight. It also stores properties to
@@ -321,8 +323,10 @@ recommended to turn it on as part of Emacs initialization.
 (cond
  (org-remark-mode
   ;; Activate
-  (org-r

[elpa] externals/org-remark e904b53b2c 60/75: refactor: silence compilier warning

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit e904b53b2c06e152b37f8984ae03cf1ce13228c9
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: silence compilier warning
---
 org-remark.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index a333651536..ed3e37de3b 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -705,7 +705,7 @@ arguments as follows:
   This is an automatic deletion. Delete the entry without asking
   the user when there is no notes in the entry. If there are any
   notes, remove the entry's properties only. This is the same
-  behavior as passing a single universal-argument to
+  behavior as passing a single `universal-argument' to
   function `org-remark-delete'.
 
 If you have done so by error, you could still `undo' it in the
@@ -739,7 +739,7 @@ If there are no notes, this function will not prompt for
 confirmation and will remove the highlight and deletes the entry
 in the marginal notes buffer.
 
-This is the same behavior as passing a single universal-argument
+This is the same behavior as passing a single `universal-argument'
 to function `org-remark-remove'.
 
 Optionally, you can let this command automatically delete the
@@ -1119,7 +1119,7 @@ buffer for automatic sync."
 
 (cl-defgeneric org-remark-highlight-headline-text (_ov _org-remark-type))
 
-(cl-defmethod org-remark-highlight-headline-text (ov (org-remark-type (eql 
nil)))
+(cl-defmethod org-remark-highlight-headline-text (ov (_org-remark-type (eql 
nil)))
   "Assume it is called within `org-with-wide-buffer' of the source."
   (replace-regexp-in-string
"\n" " "
@@ -1149,7 +1149,7 @@ HIGHLIGHT is an overlay from the SOURCE-BUF.
 Assume the current buffer is NOTES-BUF and point is placed on the
 beginning of source-headline, which should be one level up."
   ;; Add org-remark-link with updated line-num as a property
-  (let (title beg end props id text filename link orgid org-remark-type)
+  (let (title beg end props id text filename link orgid org-remark-type 
other-props)
 (with-current-buffer source-buf
   (setq title (org-remark-highlight-get-title)
 beg (overlay-start highlight)



[elpa] externals/org-remark 2f7d16ef4e 31/75: refactor(line): remove unused functions, source comments

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 2f7d16ef4e6d779bfff86985162615ef9d8f67c1
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(line): remove unused functions, source comments
---
 org-remark-line.el | 210 ++---
 1 file changed, 85 insertions(+), 125 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 6d56587031..51d31c2aea 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -59,13 +59,6 @@ in cons cell (or nil) before function
 (defvar-local org-remark-line-margins-set-p nil
   "State if margins are set by `org-remark-line' for current buffer.")
 
-;; (defvar-local org-remark-line-delayed-put-overlay-functions '()
-;;   "List of lambda functions that add a highlight.
-;; We need to delay adding highlight overlays until window is
-;; available for the current buffer. When the buffer visits a
-;; filefor the first time, the window has not been created before
-;; `org-remark-highlight-mark-overlay' is called.")
-
 ;;;###autoload
 (define-minor-mode org-remark-line-mode
   "Enable Org-remark to highlight and annotate the whole line."
@@ -74,7 +67,7 @@ in cons cell (or nil) before function
   (if org-remark-line-mode
   ;; Enable
   (progn
-;; Depth is deeper than the default one for range highlight.
+;; Depth is deeper than the default one for range-highlight.
 ;; This is to prioritize it over line-highlight when the fomer
 ;; is at point and yet on the same line of another
 ;; line-highlight.
@@ -83,45 +76,39 @@ in cons cell (or nil) before function
 ;; olivetti sets DEPTH to t (=90). We need go lower priority than it
 (add-hook 'window-size-change-functions
   #'org-remark-line-set-window-margins 95 :local)
-;;(setq left-margin-width org-remark-line-minimum-margin-width)
-;;(org-remark-line-set-buffer-windows))
-)
+(org-remark-line-set-window-margins))
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)
 (when org-remark-line-margins-set-p
   (setq left-margin-width (car org-remark-line-margins-original))
-  (setq right-marign-width (cdr org-remark-line-margins-original))
+  (setq right-margin-width (cdr org-remark-line-margins-original))
   (set-window-margins nil left-margin-width right-margin-width)
   (set-window-buffer (get-buffer-window) (current-buffer) nil)
   (setq org-remark-line-margins-set-p nil
 
-;; (defun org-remark-line-set-buffer-windows ()
-;;   "
-;; Adapted from Olivetti mode"
-;;   (mapc #'org-remark-line-set-window-margins
-;; (get-buffer-window-list nil nil 'visible)))
-(defun org-remark-line-set-window-margins (window)
+(defun org-remark-line-set-window-margins (&optional window)
   "Set the margins of current window that displays current buffer.
 Return a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). If a
 marginal area does not exist, its width will be returned as nil."
-  (when (and (windowp window) org-remark-line-mode)
-(cl-destructuring-bind (left-width . right-width) (window-margins)
-  ;; TODO make this part compatible with right margin
-  (unless org-remark-line-margins-set-p
-(setq org-remark-line-margins-original (window-margins))
-(setq org-remark-line-margins-set-p t))
-  (if (or (eq left-width nil) (< left-width
- org-remark-line-minimum-margin-width))
-  (progn
-(setq left-margin-width org-remark-line-minimum-margin-width)
-(setq right-margin-width org-remark-line-minimum-margin-width))
-(setq left-margin-width left-width)
-(setq right-margin-width right-width))
-  (set-window-margins nil left-margin-width right-margin-width)
-  (set-window-buffer window (current-buffer) 'keep-margins)
-  (org-remark-highlights-load)
-  (window-margins
+  (let ((window (or window (get-buffer-window
+(when (windowp window)
+  (cl-destructuring-bind (left-width . right-width) (window-margins)
+;; TODO make this part compatible with right margin
+(unless org-remark-line-margins-set-p
+  (setq org-remark-line-margins-original (window-margins))
+  (setq org-remark-line-margins-set-p t))
+(if (or (eq left-width nil) (< left-width
+   org-remark-line-minimum-margin-width))
+(progn
+  (setq left-margin-width org-remark-line-minimum-margin-width)
+  (setq right-margin-width org-remark-line-minimum-margin-width))
+  (setq left-margin-width left-width)
+  (setq right-margin-width right-width))
+;;(org-remark-highlights-load)
+(set-window-margins window left-margin-width right-margin-width)
+(set-window-buffer window (current-buffer) 'keep

[elpa] externals/org-remark f28dc7e7f5 62/75: docs: update docstrings for remove and delete

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit f28dc7e7f5b99e54640cdcf6f66df8420c9654a1
Author: Noboru Ota 
Commit: Noboru Ota 

docs: update docstrings for remove and delete
---
 org-remark.el | 75 +--
 1 file changed, 42 insertions(+), 33 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index ed3e37de3b..7d667bc8df 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.2.1
 ;; Created: 22 December 2020
-;; Last modified: 21 August 2023
+;; Last modified: 22 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -680,37 +680,40 @@ from."
 
 (defun org-remark-remove (point &optional delete)
   "Remove the highlight at POINT.
-By default, it will remove the highlight and the properties from the marginal
-notes buffer, but will keep the headline title and any notes in
-it. This is to ensure to keep any notes you might have written
-intact.
+By default, it will remove the highlight from the source buffer
+and the properties of entry from the marginal notes buffer, but
+will keep the headline title and any notes in it. This is to
+ensure to keep any notes you might have written intact.
 
 Optionally, you can let this command delete the entire heading
-subtree for the highlight, along with the annotations you have
-written, by passing universal argument in DELETE.
-
-This command differentiates a single or double universal
-arguments as follows:
+subtree for the highlight along with the notes you have written,
+by passing universal argument in DELETE. For deletion, this
+command differentiates a single or double universal arguments as
+follows:
 
 - \\[universal-argument]
 
-  Look for notes in the entry. If there is any, ask the user for
-  confirmation. Delete the entire entry only when the user
-  confirms with \\='y\\='. When \\='n\\=', remove the entry's
-  properties only. This is the same behavior as
-  function `org-remark-delete'.
+  Look for notes in the entry. If there is any, the side-window
+  will show them and a prompt will ask the user for confirmation.
+  The function will delete the entry only when the user confirms
+  with \\='y\\='. When \\='n\\=', it will only remove the entry's
+  properties. This is the same behavior as function
+  `org-remark-delete'.
 
 - \\[universal-argument] \\[universal-argument]
 
-  This is an automatic deletion. Delete the entry without asking
-  the user when there is no notes in the entry. If there are any
-  notes, remove the entry's properties only. This is the same
-  behavior as passing a single `universal-argument' to
-  function `org-remark-delete'.
-
-If you have done so by error, you could still `undo' it in the
-marginal notes buffer, and not in the current buffer as adding
-and removing overlays are not part of the undo tree."
+  This is automatic deletion. This command will delete the entry
+  without asking the user when there is no notes in the entry. If
+  there are any notes, only the entry's properties will be
+  removed. This is the same behavior as passing a single
+  `universal-argument' to function `org-remark-delete'.
+
+If you have removed or deleted a highlight by error, you can
+still `undo' it in the marginal notes buffer and not in the
+current buffer. This is because adding and removing overlays are
+not part of the undo tree. You can undo the deletion in the
+marginal notes buffer and then save it to sync the highlight back
+in the source."
   (interactive "d\nP")
   (let* ((ov (org-remark-find-dwim point))
  (id (overlay-get ov 'org-remark-id)))
@@ -736,23 +739,29 @@ temporarily displayed together with the prompt for the 
user to
 see the notes to help with confirmation.
 
 If there are no notes, this function will not prompt for
-confirmation and will remove the highlight and deletes the entry
-in the marginal notes buffer.
+confirmation and will remove the highlight in the source buffer
+and deletes the entry in the marginal notes buffer.
 
 This is the same behavior as passing a single `universal-argument'
 to function `org-remark-remove'.
 
-Optionally, you can let this command automatically delete the
-entry when there are no notes in it by passing universal argument
-in ARG.
+Optionally, you can pass `universal-argument' to this function
+with ARG and it will behave as follows.
 
 - \\[universal-argument]
 
-  This is an automatic deletion. Delete the entry without asking
-  the user when there is no notes in the entry. If there are any
+  This is automatic deletion. Delete the entry without asking the
+  user when there is no notes in the entry. If there are any
   notes, remove the entry's properties only. This is the same
-  behavior as passing double universal-arguments to
-  function `org-remark-remove'."
+  behavior as passing double universal-arguments to function
+  `org-remark-remove'.
+
+If you have remov

[elpa] externals/org-remark 4ad2be30e4 13/75: fix(icon): the line icon not displaying

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 4ad2be30e4d5516218a381ce879b1df44d9b9fdc
Author: Noboru Ota 
Commit: Noboru Ota 

fix(icon): the line icon not displaying
---
 org-remark-icon.el | 40 
 org-remark-line.el | 31 ++-
 2 files changed, 46 insertions(+), 25 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 4e50911ffe..2203f48c5e 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -85,26 +85,22 @@ The icons currently available are defined in 
`org-remark-icons'."
 ;; Add-icons should be the last function because other functions may do
 ;; something relevant for an icon -- e.g. adjust-positon."
 (add-hook 'org-remark-highlights-after-load-functions
-  #'org-remark-highlights-add-icons 80 :local))
+  #'org-remark-highlights-add-icons-maybe 80 :local))
 ;; Disable
 (remove-hook 'org-remark-highlights-toggle-hide-functions
  #'org-remark-icon-toggle-hide :local)
 (remove-hook 'org-remark-highlights-toggle-show-functions
  #'org-remark-icon-toggle-show :local)
 (remove-hook 'org-remark-highlights-after-load-functions
- #'org-remark-highlights-add-icons 80 :local)))
+ #'org-remark-highlights-add-icons-maybe :local)))
 
 (defvar org-remark-icons
   (list
(list 'notes
- (lambda (ov)
-   (and org-remark-icon-notes
-(overlay-get ov '*org-remark-note-body)))
+ #'org-remark-icon-notes-p
  nil)
(list 'position-adjusted
- (lambda (ov)
-   (and org-remark-icon-position-adjusted
-(overlay-get ov '*org-remark-position-adjusted)))
+ #'org-remark-icon-position-adjusted-p
  'org-remark-highlighter-warning))
   "List of icons enabled.
 It is an alist. Each element is a list of this form:
@@ -121,6 +117,14 @@ for ICON-NAME will be added to the highlight.
 
 DEFAULT FACE must be a named face. It is optinal and can be nil.")
 
+(defun org-remark-icon-notes-p (ov)
+  (and org-remark-icon-notes
+   (overlay-get ov '*org-remark-note-body)))
+
+(defun org-remark-icon-position-adjusted-p (ov)
+  (and org-remark-icon-position-adjusted
+   (overlay-get ov '*org-remark-position-adjusted)))
+
 (defun org-remark-icon-toggle-hide (highlight)
   (overlay-put highlight '*org-remark-icons (overlay-get highlight 
'after-string))
   (overlay-put highlight 'after-string nil))
@@ -129,7 +133,7 @@ DEFAULT FACE must be a named face. It is optinal and can be 
nil.")
   (overlay-put highlight 'after-string (overlay-get highlight 
'*org-remark-icons))
   (overlay-put highlight '*org-remark-icons nil))
 
-(defun org-remark-highlights-add-icons (overlays _notes-buf)
+(defun org-remark-highlights-add-icons-maybe (overlays _notes-buf)
   "Add icons to OVERLAYS.
 Each overlay is a highlight."
   (dolist (ov overlays)
@@ -141,9 +145,21 @@ Each overlay is a highlight."
 (org-remark-icon-propertize icon-name ov default-face)
   (let ((icon-string
  (mapconcat #'add-icon-maybe org-remark-icons)))
-(when icon-string (org-remark-icon-overlay-put
-   ov icon-string
-   (overlay-get ov 'org-remark-type)))
+;; `mapconcat' returns "" when all function calls for SEQUENCE
+;; return nil, I guess to guarantee the result is a string
+(when (and icon-string
+   (not (string= icon-string "")))
+  (org-remark-icon-overlay-put
+   ov icon-string
+   (overlay-get ov 'org-remark-type)))
+
+;; (defun org-remark-icon-image-p (icon-string)
+;;   "Return t when ICON-STRING contains a display property.
+;; The string may be empty like \"\" but it may have a display
+;; property to display an icon image. In this case, we should not
+;; consider it an empty string. This is important to know when an
+;; image icon is used instead of a string."
+;;   (when (get-text-property 0 'display icon-string)))
 
 (cl-defgeneric org-remark-icon-overlay-put (ov icon-string _org-remark-type)
   "Default method to deal with icon.
diff --git a/org-remark-line.el b/org-remark-line.el
index 1b4fdcebc0..93b118f857 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -98,16 +98,17 @@ by `overlays-in'."
   (org-remark-line-highlight-overlay-put ov face) ;; LINE
   (overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified)))
 
-(defun org-remark-line-highlight-overlay-put (ov face)
+(defun org-remark-line-highlight-overlay-put (ov face &optional string)
   (let* ((face (or face 'org-remark-line-highlighter))
  (left-margin (or (car (window-margins))
   ;; when nil = no margin, set to 1
   (progn (set-window-margins nil 2)
  2)))
  (spaces (- left-margin 2))
- (string 

[elpa] externals/org-remark 4e57d99e2d 68/75: fix: use space display specification instead of a string of \s

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 4e57d99e2df9e8dbfc1f1f65bd2dd82bf54e189c
Author: Noboru Ota 
Commit: Noboru Ota 

fix: use space display specification instead of a string of \s
---
 org-remark-line.el | 21 +++--
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index e30a44041c..a4bcd9b5bf 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 20 August 2023
+;; Last modified: 30 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -88,9 +88,9 @@ The maximum is set in 
`org-remark-line-heading-title-max-length'."
 
 (defface org-remark-line-highlighter
   'class color) (min-colors 88) (background light))
- :foreground "#dbba3f")
+ :foreground "#dbba3f" :inherit default)
 (((class color) (min-colors 88) (background dark))
- :foreground "#e2d980")
+ :foreground "#e2d980" :inherit default)
 (t
  :inherit highlight))
   "Face for the default line highlighter pen.")
@@ -173,9 +173,10 @@ marginal area does not exist, its width will be returned 
as nil."
   (setq org-remark-line-margins-original (window-margins))
   (setq org-remark-line-margins-set-p t)
   (setq org-remark-line-minimum-left-margin-width
-(if (numberp org-remark-line-minimum-margin-width)
+(+ (if (numberp org-remark-line-minimum-margin-width)
org-remark-line-minimum-margin-width
- (car org-remark-line-minimum-margin-width)))
+ (car org-remark-line-minimum-margin-width))
+   org-remark-line-margin-padding))
   (setq org-remark-line-minimum-right-margin-width
 (+ (if (numberp org-remark-line-minimum-margin-width)
org-remark-line-minimum-margin-width
@@ -242,8 +243,6 @@ This happens only when HIGHLIGHT is a line-highlight."
(- left-margin
   (+ string-length 
org-remark-line-margin-padding
  (spaces-length (if (> spaces-base-length 0) spaces-base-length 0))
- (spaces (with-temp-buffer (insert-char ?\s spaces-length)
-   (buffer-string)))
  (spacer-ov (make-overlay pos pos nil :front-advance)))
 ;; Add a spacing overlay before the line-highlight overlay but we
 ;; only need one of these; remove it if one already exits
@@ -253,7 +252,7 @@ This happens only when HIGHLIGHT is a line-highlight."
  (propertize " "
  'display
  `((margin ,org-remark-line-margin-side)
-   ,spaces)))
+   (space . (:width ,spaces-length)
 (overlay-put spacer-ov 'category 'org-remark-spacer)
 spacer-ov))
 
@@ -282,8 +281,10 @@ This happens only when HIGHLIGHT is a line-highlight."
   ;; If the icon-string has a display properties, assume it is an icon image
   (let ((display-prop (get-text-property 0 'display icon-string)))
 (cond (display-prop ; svg-based icon
-   (let* ((display-prop
-   (list `(margin ,org-remark-line-margin-side) display-prop))
+   (let* ((display-prop (list `(margin ,org-remark-line-margin-side) 
display-prop))
+   ;; TODO margin needs to be calculated
+   ;; (list `(margin ,org-remark-line-margin-side)
+   ;;   (append display-prop '(:margin (10 . 0))
   (icon-face (get-text-property 0 'face icon-string))
   (icon-string (propertize " " 'display display-prop)))
  (when icon-face



[elpa] externals/org-remark ca648a1876 18/75: fix: change now can only select pens from the same type

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit ca648a18767418b5b3774daa3a9720b472743bf0
Author: Noboru Ota 
Commit: Noboru Ota 

fix: change now can only select pens from the same type

Changing from the range-highlight to line-highlight and vice versa must
not be possible. This would break the begin end properties.
---
 org-remark.el | 30 +-
 1 file changed, 21 insertions(+), 9 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 9e8cb1d8b4..18fb9dd5ac 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -622,15 +622,27 @@ and the current source buffer."
 This function will show you a list of available pens to choose
 from."
   (interactive)
-  (when-let* ((ov (org-remark-find-overlay-at-point))
-  (id (overlay-get ov 'org-remark-id))
-  (beg (overlay-start ov))
-  (end (overlay-end ov)))
-(let ((new-pen (if pen pen
- (intern
-  (completing-read "Which pen?:" 
org-remark-available-pens)
-  (org-remark-highlight-clear ov)
-  (funcall new-pen beg end id :change
+  (if-let* ((ov (org-remark-find-dwim))
+(id (overlay-get ov 'org-remark-id))
+(beg (overlay-start ov))
+(end (overlay-end ov)))
+  (let* ((available-pens (seq-filter
+  (lambda (pen-fn)
+(let ((type (overlay-get ov 'org-remark-type)))
+  (eql type (function-get pen-fn 
'org-remark-type
+  org-remark-available-pens))
+ (new-pen
+  (if pen pen
+(intern
+ ;; To guard against minibuffer quit error when
+ ;; the user quit without selecting any pen.
+ (unwind-protect
+ (completing-read "Which pen?:"
+  available-pens))
+(org-remark-highlight-clear ov)
+(funcall new-pen beg end id :change))
+;; if ov or any other variables are not found
+(message "No highlight here.")))
 
 (defun org-remark-remove (point &optional delete)
   "Remove the highlight at POINT.



[elpa] externals/org-remark 1a6745acce 71/75: fix(line): change some customizing options from integer to natnum

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 1a6745acce38a5e9292aca8ff9e0b84d5e8be1c4
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): change some customizing options from integer to natnum

For margin width, etc. we only need positive integer (= natural number).
---
 org-remark-line.el | 22 ++
 1 file changed, 10 insertions(+), 12 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index a4bcd9b5bf..9a01af7c88 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 30 August 2023
+;; Last modified: 30 September 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -51,22 +51,20 @@ character, such as the default value.)"
   :safe 'stringp)
 
 (defcustom org-remark-line-minimum-margin-width 3
-  "Margin width in an integer or cons cell.
-It can be a single number or a cons cell. When it is a single
-number, both the left and right margin widths will be the same.
-When this customizing variable is a cons cell, the format is as
-follows: (LEFT-MARGIN-WIDTH . RIGHT-MARGIN-WIDTH). The first
-value is the left margin width and the secon value is the right
-one."
+  "Margin width in a natural number.
+It can be a single number or a cons cell of two. When it is a
+single number, both the left and right margin widths will be the
+same. When this customizing variable is a cons cell, the format
+is as follows: (LEFT-MARGIN-WIDTH . RIGHT-MARGIN-WIDTH)."
   :local t
   :type '(choice
-  (integer :tag "Minimum margin width for both left and right margins" 
3)
-  (cons :tag "Left and right margin widths" integer integer)))
+  (natnum :tag "Minimum margin width for both left and right margins" 
3)
+  (cons :tag "Left and right margin widths" natnum natnum)))
 
 (defcustom org-remark-line-margin-padding 1
   "Padding between the main text area the glyph/icon on the margin"
   :local t
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom org-remark-line-margin-side 'left-margin
   "The side of margin to display line highlights.
@@ -78,7 +76,7 @@ Left or rigth can be chosen."
 
 (defcustom org-remark-line-heading-title-max-length 40
   "Maximum length of string included as the highlight title."
-  :type 'integer)
+  :type 'natnum)
 
 (defcustom org-remark-line-ellipsis "…"
   "Ellipsis used when the highlight title is longer than maximum.



[elpa] externals/org-remark 52cf20297b 67/75: feat: #72 org-remark-open can open the marginal notes file

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 52cf20297bb40a9125fff025b6ab333b3e9ad605
Author: Noboru Ota 
Commit: Noboru Ota 

feat: #72 org-remark-open can open the marginal notes file

`org-remark-open` now opens the marginal notes file for the current
buffer if ponit is not on any highlight.
---
 org-remark.el | 73 +--
 1 file changed, 46 insertions(+), 27 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 7884331cab..9abb94c458 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.2.1
 ;; Created: 22 December 2020
-;; Last modified: 29 August 2023
+;; Last modified: 01 September 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -543,9 +543,10 @@ The marginal notes will be narrowed to the relevant 
headline to
 show only the highlight at point.
 
 This function creates a cloned indirect buffer for the marginal
-notes file.  You can edit it as a normal Org buffer.  Once you
-have done editing, you can simply save and kill the buffer or
-keep it around.
+notes file. You can edit it as a normal Org buffer. Once you have
+done editing, you can simply save and kill the buffer or keep it
+around. Org-remark ensures that there is only one cloned buffer
+for notes file by tracking it.
 
 The marginal notes file gets displayed by the action defined by
 `org-remark-notes-display-buffer-action' (by default in a left
@@ -556,30 +557,48 @@ You can customize the name of the marginal notes buffer 
with
 `org-remark-notes-buffer-name'.
 
 By default, the cursor will go to the marginal notes buffer for
-further editing.  When VIEW-ONLY is non-nil \(e.g. by passing a
-universal argument with \\[universal-argument]\), you can display
-the marginal notes buffer with the cursor remaining in the
-current buffer.
-
-This function ensures that there is only one cloned buffer for
-notes file by tracking it."
+further editing. When VIEW-ONLY is \\=':view-only\\=' \(e.g.
+Elisp program to pass the value), you can view the marginal notes
+buffer with the cursor remaining in the current buffer.
+
+If you pass a single universal argument with
+\\[universal-argument]\), you open the marginal notes buffer
+associated with the current buffer with `find-file' without
+narrowing it to a specific node or cloning it as indirect buffer..
+
+If you pass any other values to VIEW-ONLY, this function behaves
+in the way as passing \\=':view-only\\=' to it and simply let you
+view the marginal notes in a cloned indirect buffer in the
+side-window (as defined by user option
+`org-remark-notes-display-buffer-action')."
   (interactive "d\nP")
-  (when-let* ((ov (org-remark-find-dwim point))
-  (id (overlay-get ov 'org-remark-id))
-  (ibuf (org-remark-notes-buffer-get-or-create))
-  (cbuf (current-buffer)))
-(pop-to-buffer ibuf org-remark-notes-display-buffer-action)
-(widen)
-(when-let (p (org-find-property org-remark-prop-id id))
-  ;; Somehow recenter is needed when a highlight is deleted and move to a
-  ;; previous highlight.  Otherwise, the cursor is too low to show the
-  ;; entire entry.  It looks like there is no entry.
-  (goto-char p) (org-narrow-to-subtree) (org-end-of-meta-data t) 
(recenter))
-;; Run hook with the current-buffer being the note's buffer
-(run-hooks 'org-remark-open-hook)
-;; Avoid error when buffer-action is set to display a new frame
-(when view-only
-  (select-window (get-buffer-window cbuf)
+  (let ((ov (org-remark-find-dwim point)))
+;; If C-u is used or the cursor is not on a highlight, we don't want
+;; to open in a normal way but open the margnal notes buffer with
+;; find-file.
+(if (or (eql (prefix-numeric-value current-prefix-arg) 4)
+(not ov))
+(let ((notes-file (org-remark-notes-get-file-name)))
+  (when (file-exists-p notes-file) (find-file notes-file)))
+  ;; Open marginal notes normally as an indirect buffer in a side
+  ;; window.
+  (when-let*
+  ((ov ov) ;; OV must be present here.
+   (id (overlay-get ov 'org-remark-id))
+   (ibuf (org-remark-notes-buffer-get-or-create))
+   (cbuf (current-buffer)))
+(pop-to-buffer ibuf org-remark-notes-display-buffer-action)
+(widen)
+(when-let (p (org-find-property org-remark-prop-id id))
+  ;; Somehow recenter is needed when a highlight is deleted and move 
to a
+  ;; previous highlight.  Otherwise, the cursor is too low to show the
+  ;; entire entry.  It looks like there is no entry.
+  (goto-char p) (org-narrow-to-subtree) (org-end-of-meta-data t) 
(recenter))
+;; Run hook with the current-buffer being the note's buffer
+(run-hooks 'org-remark-open-hook)
+;; Avoid error when buffer-action 

[elpa] externals/org-remark 680651e339 37/75: refactor(icon): remove unnecessary source comment (old func)

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 680651e339bda54126b70cba4e02640fe85a4e39
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(icon): remove unnecessary source comment (old func)
---
 org-remark-icon.el | 10 +-
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index fa66d31401..557e08f4f2 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 18 August 2023
+;; Last modified: 19 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -153,14 +153,6 @@ Each overlay is a highlight."
ov icon-string
(overlay-get ov 'org-remark-type)))
 
-;; (defun org-remark-icon-image-p (icon-string)
-;;   "Return t when ICON-STRING contains a display property.
-;; The string may be empty like \"\" but it may have a display
-;; property to display an icon image. In this case, we should not
-;; consider it an empty string. This is important to know when an
-;; image icon is used instead of a string."
-;;   (when (get-text-property 0 'display icon-string)))
-
 (cl-defgeneric org-remark-icon-overlay-put (_ov _icon-string _org-remark-type)
   "Default method to deal with icon.
  This is used when a method specific \\='org-remark-type\\=' not



[elpa] externals/org-remark 32b8699b12 64/75: doc: docstring for `org-remark-notes-auto-delete`

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 32b8699b1234da7be399890d5a43359ef8487506
Author: Noboru Ota 
Commit: Noboru Ota 

doc: docstring for `org-remark-notes-auto-delete`
---
 org-remark.el | 13 -
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 832411360a..a7d62d4fc2 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -103,15 +103,18 @@ only the properties in the notes buffer and keeping the 
headline
 title and any notes in the entry (with using
 `org-remark-remove').
 
-Set this customizing variable to \\=':auto-delete\\=' and you can
-change the behavior to delete the entire entry when it contains
-no notes without a prompt asking for confirmation. This is the
-same behavior as passing a single universal
-argument (\\[universal-argument]) to `org-remark-delete'."
+If this behavior leads to cluttering the marginal notes org file,
+you can set this customizing variable to \\=':auto-delete\\='.
+With this option, Org-remark will delete the entire entry when it
+contains no notes without a prompt asking for confirmation. This
+is the same behavior as passing a single `universal-argument'
+(\\[universal-argument]) to`org-remark-delete' or double `universal-argument'
+(\\[universal-argument] \\[universal-argument]) to `org-remark-remove'."
   :type '(radio
   (const :tag "Keep entries (default)" nil)
   (const :tag "Delete entries automatically when no notes exist"
  :auto-delete)))
+
 (defvaralias
   'org-remark-source-path-function 'org-remark-source-file-name)
 



[elpa] externals/org-remark cdcab9e294 73/75: docs: v1.3

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit cdcab9e294174e1b77ea56c71e847e5734bf8f70
Author: Noboru Ota 
Commit: Noboru Ota 

docs: v1.3
---
 README-elpa |   6 +-
 README.org  |   2 +-
 docs/org-remark.org | 192 ++--
 org-remark-line.el  |  55 +--
 org-remark.el   |  25 ---
 5 files changed, 223 insertions(+), 57 deletions(-)

diff --git a/README-elpa b/README-elpa
index 9a639b7ec5..a86998ea22 100644
--- a/README-elpa
+++ b/README-elpa
@@ -37,7 +37,8 @@ _
   For customization, refer to the customization group `org-remark' or
   user manual: [online] or Info node `(org-remark) Customizing'. A
   [separate online article] has been written to guide you on how to
-  customize an icon (to be incorporated into the user manual later).
+  customize an icon (also part of the user manual. Evaluate (info
+  "(or-gremark) How to Set Org-remark to Use SVG Icons").
 
   An [introductory video] (8 minutes) and [V1.1.0 release introduction]
   (12 minutes) are available on YouTube.
@@ -91,8 +92,7 @@ _
   This package is available on:
 
   - [GNU-ELPA] (releases only; equivalent to MELPA-Stable)
-  - [GNU-devel ELPA] (unreleased development branch; equivalent to
-MELPA)
+  - [GNU-devel ELPA] (unreleased main branch; equivalent to MELPA)
 
   GNU ELPA should be already set up in your Emacs by default. If you
   wish to add GNU-devel ELPA, simply add its URL to `package-archives'
diff --git a/README.org b/README.org
index 0ee9bb0f36..f3e69bc3c5 100644
--- a/README.org
+++ b/README.org
@@ -20,7 +20,7 @@ For installation and minimum configuration, refer to 
[[#installation][Installati
 
 Getting Started in the user manual will get you started in 5 minutes: 
[[https://nobiot.github.io/org-remark/#Getting-Started][online]] or or Info 
node `(org-remark) Getting Started'.
 
-For customization, refer to the customization group `org-remark' or user 
manual: [[https://nobiot.github.io/org-remark/#Customizing][online]] or Info 
node `(org-remark) Customizing'. A 
[[https://github.com/nobiot/org-remark/tree/main/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md][separate
 online article]] has been written to guide you on how to customize an icon (to 
be incorporated into the user manual later).
+For customization, refer to the customization group `org-remark' or user 
manual: [[https://nobiot.github.io/org-remark/#Customizing][online]] or Info 
node `(org-remark) Customizing'. A 
[[https://github.com/nobiot/org-remark/tree/main/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md][separate
 online article]] has been written to guide you on how to customize an icon 
(also part of the user manual. Evaluate (info "(or-gremark) How to Set 
Org-remark to Use SVG Icons").
 
 An [[https://youtu.be/c8DHrAsFiLc][introductory video]] (8 minutes) and 
[[https://youtu.be/BTFuS21N00k][V1.1.0 release introduction]] (12 minutes) are 
available on YouTube.
 
diff --git a/docs/org-remark.org b/docs/org-remark.org
index 7c8bb15f90..0b1110b5ca 100644
--- a/docs/org-remark.org
+++ b/docs/org-remark.org
@@ -1,7 +1,7 @@
 #+title: Org-remark User Manual
 #+author: Noboru Ota 
-#+macro: version 1.2.x
-#+macro: modified 20 August 2023
+#+macro: version 1.3.x
+#+macro: modified 06 October 2023
 #+language: en
 #+export_file_name: org-remark.texi
 #+texinfo_dir_category: Emacs
@@ -10,11 +10,11 @@
 #+texinfo: @paragraphindent asis
 #+options: toc:nil ':t
 
-This manual is for Org-remark version {{{version}}}. Some new features are 
mentioned in this manual that are currently in development; these are mentioned 
clearly as such.
+This manual is for Org-remark version {{{version}}}. The new features 
introduced with version {{{version}}} are currently only avaiable 
[[https://elpa.gnu.org/devel/org-remark.html][GNU-devel ELPA]] until the new 
version is released to 
[[https://elpa.gnu.org/packages/org-remark.html][GNU-ELPA]].
 
 Last updated: {{{modified}}}.
 
-Org-remark lets you highlight and annotate text files and websites (EWW).
+Org-remark lets you highlight and annotate text files, websites (EWW), EPUB 
books (nov.el) and Info documentation (Info-mode).
 
 #+texinfo: @insertcopying
 
@@ -23,7 +23,7 @@ Org-remark lets you highlight and annotate text files and 
websites (EWW).
 :COPYING: t
 :END:
 
-Copyright \copy 2021-2022  Free Software Foundation, Inc.
+Copyright \copy 2021-2023  Free Software Foundation, Inc.
 
 #+begin_quote
 Permission is granted to copy, distribute and/or modify this document
@@ -45,7 +45,7 @@ modify this GNU manual.”
 This package is available on:
 
 - [[https://elpa.gnu.org/packages/org-remark.html][GNU-ELPA]] (releases only; 
equivalent to MELPA-Stable)
-- [[https://elpa.gnu.org/devel/org-remark.html][GNU-devel ELPA]] (unreleased 
development branch; equivalent to MELPA)
+- [[https://elpa.gnu.org/devel/org-remark.html][GNU-devel ELPA]] (unreleased 
main branch; equivalent to MELP

[elpa] externals/org-remark e7aae5e4f4 25/75: doc: docstring for org-remark-highlight-mark-overlay

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit e7aae5e4f4474a31fccaa982a752071c91033288
Author: Noboru Ota 
Commit: Noboru Ota 

doc: docstring for org-remark-highlight-mark-overlay
---
 org-remark-line.el | 4 +++-
 org-remark.el  | 6 +-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 707d931184..f38ce3463b 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -112,7 +112,9 @@ by `overlays-in'."
   (list bol bol)))
 
 (cl-defmethod org-remark-highlight-mark-overlay (ov face (org-remark-type (eql 
'line)))
-  (org-remark-line-highlight-overlay-put ov face) ;; LINE
+  "Put FACE and other necessary properties to the highlight OV.
+This is a method for highlights of ORG-REMARK-TYPE \\='line\\='."
+  (org-remark-line-highlight-overlay-put ov face)
   (overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified)))
 
 (defun org-remark-line-highlight-overlay-put (ov face &optional string)
diff --git a/org-remark.el b/org-remark.el
index 9ca48e08e3..eb353821f7 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -804,9 +804,13 @@ Optionally ID can be passed to find the exact ID match."
 ;;   functions here mostly assume the current buffer is the source
 ;;   buffer.
 
-(cl-defgeneric org-remark-highlight-mark-overlay (_org-remark-type))
+(cl-defgeneric org-remark-highlight-mark-overlay (_org-remark-type)
+  "Put FACE and other necessary properties to the highlight OV")
 
 (cl-defmethod org-remark-highlight-mark-overlay (ov face (_org-remark-type 
(eql nil)))
+  "Put FACE and other necessary properties to the highlight OV.
+This is a method for highlights of default ORG-REMARK-TYPE, that
+is for a character range."
   (overlay-put ov 'face (if face face 'org-remark-highlighter)))
 
 (defun org-remark-highlight-mark



[elpa] externals/org-remark 7a9c0454b2 74/75: fix: declare-function file location

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 7a9c0454b24eec50bbbfc7b8497dcef8441f1b1f
Author: Noboru Ota 
Commit: Noboru Ota 

fix: declare-function file location
---
 org-remark-info.el | 4 ++--
 org-remark-nov.el  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-remark-info.el b/org-remark-info.el
index c97fc6b280..1a8ce90a6e 100644
--- a/org-remark-info.el
+++ b/org-remark-info.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 16 July 2023
-;; Last modified: 20 August 2023
+;; Last modified: 06 October 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -60,7 +60,7 @@
 (defvar org-remark-prop-source-file)
 (defvar org-remark-mode)
 (declare-function org-remark-highlights-load "org-remark")
-(declare-function org-remark-mode "orgremark")
+(declare-function org-remark-mode "org-remark")
 
 ;;;###autoload
 (define-minor-mode org-remark-info-mode
diff --git a/org-remark-nov.el b/org-remark-nov.el
index 1fd2f7d292..42dab16ff0 100644
--- a/org-remark-nov.el
+++ b/org-remark-nov.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 9 January 2023
-;; Last modified: 19 August 2023
+;; Last modified: 06 October 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -50,7 +50,7 @@
   (error "Org-remark: package `nov' is missing"))
 (require 'org-remark-global-tracking)
 (declare-function org-remark-highlights-load "org-remark")
-(declare-function org-store-link "org")
+(declare-function org-store-link "ol")
 (defvar org-remark-prop-source-file)
 ;; To silence flymake
 (defvar nov-file-name)



[elpa] externals/org-remark 4156342f88 40/75: refactor(line): make spacer overlay

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 4156342f88bb192861fd98c5586ace4ae5539f5b
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(line): make spacer overlay
---
 org-remark-line.el | 88 ++
 1 file changed, 35 insertions(+), 53 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index c55a193695..8155454c48 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -65,7 +65,7 @@ in cons cell (or nil) before function
 `org-remark-line-set-window-margins' set margins.")
 
 (defvar-local org-remark-line-margins-set-p nil
-  "State if margins are set by `org-remark-line' for current buffer.")
+  "Status indicating if margins are set by `org-remark-line'.")
 
 ;;;###autoload
 (define-minor-mode org-remark-line-mode
@@ -86,13 +86,13 @@ in cons cell (or nil) before function
   #'org-remark-line-set-window-margins 95 :local)
 ;; Need to reload to cater to margin changes done by `olivetti'.
 (add-hook 'window-size-change-functions
-  #'org-remark-line-redraw-highlights 96 :local)
+  #'org-remark-line-highlights-redraw 96 :local)
 (org-remark-line-set-window-margins))
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)
 (remove-hook 'window-size-change-functions
- #'org-remark-line-redraw-highlights :local)
+ #'org-remark-line-highlights-redraw :local)
 (when org-remark-line-margins-set-p
   (setq left-margin-width (car org-remark-line-margins-original))
   (setq right-margin-width (cdr org-remark-line-margins-original))
@@ -161,7 +161,35 @@ by `overlays-in'."
 (let ((bol (org-remark-line-pos-bol (point
   (list bol bol)))
 
-(defun org-remark-line-redraw-highlights (&optional window)
+(defun org-remark-line-make-spacer-overlay (pos)
+  "Return a spacer overlay."
+  (let* ((left-margin (or (car (window-margins)) left-margin-width))
+ (right-margin (or (cdr (window-margins)) right-margin-width))
+ (string (with-temp-buffer
+   (insert org-remark-line-icon)
+   (buffer-string)))
+ (string-length (length string))
+ (spaces-base-length (if (eql org-remark-line-margin-side 
'right-margin)
+ org-remark-line-margin-padding
+   (- left-margin
+  (+ string-length 
org-remark-line-margin-padding
+ (spaces-length (if (> spaces-base-length 0) spaces-base-length 0))
+ (spaces (with-temp-buffer (insert-char ?\s spaces-length)
+   (buffer-string)))
+ (spacer-ov (make-overlay pos pos nil :front-advance)))
+;; Add a spacing overlay before the line-highlight overlay but we
+;; only need one of these; remove it if one already exits
+(remove-overlays (overlay-start spacer-ov) (overlay-end spacer-ov)
+ 'category 'org-remark-spacer)
+(overlay-put spacer-ov 'before-string
+ (propertize " "
+ 'display
+ `((margin ,org-remark-line-margin-side)
+   ,spaces)))
+(overlay-put spacer-ov 'category 'org-remark-spacer)
+spacer-ov))
+
+(defun org-remark-line-highlights-redraw (&optional window)
   (let ((window (or window (get-buffer-window
 (when (and (windowp window) (not (window-minibuffer-p window)))
   (org-with-wide-buffer
@@ -169,31 +197,8 @@ by `overlays-in'."
   (seq-filter (lambda (ov) (eql 'line (overlay-get ov 
'org-remark-type)))
   org-remark-highlights)))
  (dolist (ov highlights)
-   ;; The following is almost the same as 
`org-remark-highlight-make-overlay'.
-   ;; TODO Rationalize these two
(let* ((beg (overlay-start ov))
-  (left-margin (or (car (window-margins)) left-margin-width))
-  (right-margin (or (cdr (window-margins)) right-margin-width))
-  (string (with-temp-buffer
-(insert org-remark-line-icon)
-(buffer-string)))
-  (string-length (length string))
-  (spaces-base-length (if (eql org-remark-line-margin-side 
'right-margin)
-  org-remark-line-margin-padding
-(- left-margin
-   (+ string-length 
org-remark-line-margin-padding
-  (spaces-length (if (> spaces-base-length 0) 
spaces-base-length 0))
-  (spaces (with-temp-buffer (insert-char ?\s spaces-length)
-(buffer-string)))
-  (spacer-ov (make-overlay beg be

[elpa] externals/org-remark 1df1fcb331 46/75: feat(line): define various customizing options

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 1df1fcb331ae501e4fdd0b72928079b55a912a14
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line): define various customizing options
---
 org-remark-line.el | 71 +++---
 1 file changed, 51 insertions(+), 20 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 0113ee6478..9d8403de56 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -30,6 +30,12 @@
 
 (require 'org-remark)
 
+(defgroup org-remark-line nil
+  "Enable`org-remark' to highlight and annotate whole lines. "
+  :group 'org-remark
+  :prefix "org-remark-line"
+  :link '(url-link :tag "GitHub" "https://github.com/nobiot/org-remark";))
+
 (defcustom org-remark-line-icon " * "
   "Glyph displayed on the margin to indicate the line-highlight.
 If you wants to use image icons (e.g. SVG image icon created with
@@ -45,7 +51,7 @@ character, such as the default value.)"
   :safe 'stringp)
 
 (defcustom org-remark-line-minimum-margin-width 3
-  "Margin width in number.
+  "Margin width in an integer or cons cell.
 It can be a single number or a cons cell. When it is a single
 number, both the left and right margin widths will be the same.
 When this customizing variable is a cons cell, the format is as
@@ -57,8 +63,10 @@ one."
   (integer :tag "Minimum margin width for both left and right margins" 
3)
   (cons :tag "Left and right margin widths" integer integer)))
 
-(defvar org-remark-line-margin-padding 1
-  "Padding between the main text area the icon on the margin")
+(defcustom org-remark-line-margin-padding 1
+  "Padding between the main text area the glyph/icon on the margin"
+  :local t
+  :type 'integer)
 
 (defcustom org-remark-line-margin-side 'left-margin
   "The side of margin to display line highlights.
@@ -68,9 +76,15 @@ Left or rigth can be chosen."
   (const :tag "Left margin" left-margin)
   (const :tag "Right margin" right-margin)))
 
-(defvar org-remark-line-heading-title-max-length 40)
+(defcustom org-remark-line-heading-title-max-length 40
+  "Maximum length of string included as the highlight title."
+  :type 'integer)
 
-(defvar org-remark-line-ellipsis "…")
+(defcustom org-remark-line-ellipsis "…"
+  "Ellipsis used when the highlight title is longer than maximum.
+The maximum is set in `org-remark-line-heading-title-max-length'."
+  :type 'string
+  :safe 'stringp)
 
 (defface org-remark-line-highlighter
   'class color) (min-colors 88) (background light))
@@ -81,9 +95,11 @@ Left or rigth can be chosen."
  :inherit highlight))
   "Face for the default line highlighter pen.")
 
-(defvar-local org-remark-line-left-margin-width nil)
+(defvar-local org-remark-line-minimum-left-margin-width nil
+  "Computed minimum left-margin width.")
 
-(defvar-local org-remark-line-right-margin-width nil)
+(defvar-local org-remark-line-minimum-right-margin-width nil
+  "Computed minimum right-margin width.")
 
 (defvar-local org-remark-line-margins-original '()
   "Original window margin width values.
@@ -126,8 +142,8 @@ in cons cell (or nil) before function
   (setq right-margin-width (cdr org-remark-line-margins-original))
   (set-window-margins nil left-margin-width right-margin-width)
   (set-window-buffer (get-buffer-window) (current-buffer) nil)
-  (setq org-remark-line-left-margin-width nil)
-  (setq org-remark-line-right-margin-width nil)
+  (setq org-remark-line-minimum-left-margin-width nil)
+  (setq org-remark-line-minimum-right-margin-width nil)
   (setq org-remark-line-margins-set-p nil
 
 ;; Default line-highlighter pen
@@ -145,22 +161,22 @@ marginal area does not exist, its width will be returned 
as nil."
 (unless org-remark-line-margins-set-p
   (setq org-remark-line-margins-original (window-margins))
   (setq org-remark-line-margins-set-p t)
-  (setq org-remark-line-left-margin-width
+  (setq org-remark-line-minimum-left-margin-width
 (if (numberp org-remark-line-minimum-margin-width)
org-remark-line-minimum-margin-width
  (car org-remark-line-minimum-margin-width)))
-  (setq org-remark-line-right-margin-width
+  (setq org-remark-line-minimum-right-margin-width
 (+ (if (numberp org-remark-line-minimum-margin-width)
org-remark-line-minimum-margin-width
  (cdr org-remark-line-minimum-margin-width))
org-remark-line-margin-padding)))
 (if (or (eq left-width nil) (< left-width
-   org-remark-line-left-margin-width))
-(setq left-margin-width org-remark-line-left-margin-width)
+   
org-remark-line-minimum-left-margin-width))
+(setq left-margin-width org-remark-line-minimum-left-margin-width)
   (setq left-margin-width left-width))
 (if (or (eq rig

[elpa] externals/org-remark cfaf02d823 72/75: docs: minor update to README and article on SVG icon

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit cfaf02d8239c2e33af588ffefe61fa0432ea9174
Author: Noboru Ota 
Commit: Noboru Ota 

docs: minor update to README and article on SVG icon
---
 README.org  | 2 +-
 .../2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md| 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/README.org b/README.org
index c4d05de3e2..0ee9bb0f36 100644
--- a/README.org
+++ b/README.org
@@ -57,7 +57,7 @@ An [[https://youtu.be/c8DHrAsFiLc][introductory video]] (8 
minutes) and [[https:
 This package is available on:
 
 - [[https://elpa.gnu.org/packages/org-remark.html][GNU-ELPA]] (releases only; 
equivalent to MELPA-Stable)
-- [[https://elpa.gnu.org/devel/org-remark.html][GNU-devel ELPA]] (unreleased 
development branch; equivalent to MELPA)
+- [[https://elpa.gnu.org/devel/org-remark.html][GNU-devel ELPA]] (unreleased 
main branch; equivalent to MELPA)
 
 GNU ELPA should be already set up in your Emacs by default. If you wish to add 
GNU-devel ELPA, simply add its URL to ~package-archives~ like this:
 
diff --git 
a/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md 
b/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md
index 508cd5e888..6c811b237c 100644
--- a/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md
+++ b/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md
@@ -1,14 +1,14 @@
 ---
-title:How to Set Icons to be SVG Images
+title:How to Set Org-remark to Use SVG Icons
 created:  2023-08-20
-modified: 20 August 2023
+modified: 16 September 2023
 category: #creation
 id:   2023-08-20T184309
 ---
 
 # How to Set Org-remark to Use SVG Icons
 
-![Highlights with an icon indicating annotations 
exist](../../resources/images/v1.2.0/2023-08-20-SVG-icon.png "Highlights with 
an icon indicating annotations exist")
+![Highlights with an icon indicating annotations 
exist](../screen-images/v1.2.0/2023-08-20-SVG-icon.png "Highlights with an icon 
indicating annotations exist")
 
 I have released version 1.2.0 of Org-remark. In this version, highlights can 
display an icon to visually indicate that annotations exist for them. This was 
implemented in response to a feature request I received via YouTube comments 
and recorded in [issue #64](https://github.com/nobiot/org-remark/issues/64).
 



[elpa] externals/org-remark 16958accc2 02/75: refactor: org-remark-mark

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 16958accc202be09d4b64c2b941dcf35e8c5fe3d
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: org-remark-mark
---
 org-remark-icon.el |  20 ++---
 org-remark-line-highlighter.el | 176 +
 org-remark.el  |  54 +++--
 3 files changed, 163 insertions(+), 87 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 5ac05d3dc3..bf324f9f30 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 31 July 2023
+;; Last modified: 01 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -133,14 +133,16 @@ DEFAULT FACE must be a named face. It is optinal and can 
be nil.")
   "Add icons to OVERLAYS.
 Each overlay is a highlight."
   (dolist (ov overlays)
-(cl-flet ((add-icon-maybe (icon)
-(cl-destructuring-bind
-(icon-name pred default-face) icon
-  (when (funcall pred ov)
-(org-remark-icon-propertize icon-name ov default-face)
-  (let ((icon-string
- (mapconcat #'add-icon-maybe org-remark-icons)))
-(when icon-string (overlay-put ov 'after-string icon-string))
+(unless (string= "line" (overlay-get ov 'org-remark-type))
+  ;; icons added to line highlighters differently from normal ones.
+  (cl-flet ((add-icon-maybe (icon)
+  (cl-destructuring-bind
+  (icon-name pred default-face) icon
+(when (funcall pred ov)
+  (org-remark-icon-propertize icon-name ov 
default-face)
+(let ((icon-string
+   (mapconcat #'add-icon-maybe org-remark-icons)))
+  (when icon-string (overlay-put ov 'after-string icon-string)))
 
 (defun org-remark-icon-propertize (icon-name highlight default-face)
   "Return a propertized string.
diff --git a/org-remark-line-highlighter.el b/org-remark-line-highlighter.el
index 134af3104a..1b2fe949ea 100644
--- a/org-remark-line-highlighter.el
+++ b/org-remark-line-highlighter.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 01 August 2023
+;; Last modified: 02 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -28,27 +28,34 @@
 
 ;;; Code:
 
-(defun my/test-margin-left ()
-  (interactive)
-  (let* ((ov (make-overlay (line-beginning-position) 
(line-beginning-position)))
- (left-margin (or (car (window-margins))
-  ;; when nil = no margin, set to 1
-  (progn (set-window-margins nil 2)
- 2)))
- (spaces (- left-margin 2))
- (string (with-temp-buffer (insert-char ?\s spaces)
-   (insert "‣ ")
-   (buffer-string
-(overlay-put ov 'before-string (propertize "! " 'display
-   `((margin left-margin)
- ,(propertize string 'face 
'modus-themes-markup-code))
+;;(require 'org-remark)
 
-(defun test/get-beginning-of-line (pos)
+(defun org-remark-line-pos-bol (pos)
   "Return the beginning of the line position for POS."
   (save-excursion
 (goto-char pos)
 (pos-bol)))
 
+(defun org-remark-line-highlight-p (highlight)
+  "Return t if HIGHLIGHT is one for the line.
+HIGHLIGHT is an overlay."
+  (string= "line" (overlay-get highlight 'org-remark-type)))
+
+(defun org-remark-line-find (&optional point)
+  "Return the line-highight (overlay) of the current line.
+When POINT is passed, one for the line it belongs to. If there
+are multiple line-hilights, return the car of the list returned
+by `overlays-in'."
+  (let* ((point (or point (point)))
+ (bol (org-remark-line-pos-bol point))
+ (highlights (overlays-in bol bol)))
+(seq-find #'org-remark-line-highlight-p highlights)))
+
+(add-hook 'org-remark-find-dwim-functions #'org-remark-line-find)
+
+(add-hook 'window-size-change-functions
+  #'(lambda (&rest args)
+  (set-window-margins nil 2)))
 
 (defun test/overlay-put-line-highlight (ov)
   (let* ((left-margin (or (car (window-margins))
@@ -57,7 +64,7 @@
  2)))
  (spaces (- left-margin 2))
  (string (with-temp-buffer (insert-char ?\s spaces)
-   (insert " ")
+   (insert "•")
(buffer-string
 (overlay-put ov 'before-string (propertize "! " 'display
`((margin left-margin)
@@ -65,61 +72

[elpa] externals/org-remark d72fa0ef45 70/75: fix: regression next/prev-view opens the notes when there is none

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit d72fa0ef458514726be754b9b8c2d2b9d00ddda3
Author: Noboru Ota 
Commit: Noboru Ota 

fix: regression next/prev-view opens the notes when there is none

org-remark-view, org-remark-view-[next|prev] should not open the
marginal notes buffer when there is no highlights under cursor or in the
current (narrowed part of) buffer.
---
 org-remark.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 9abb94c458..53c682fb40 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.2.1
 ;; Created: 22 December 2020
-;; Last modified: 01 September 2023
+;; Last modified: 09 September 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -577,7 +577,8 @@ side-window (as defined by user option
 ;; to open in a normal way but open the margnal notes buffer with
 ;; find-file.
 (if (or (eql (prefix-numeric-value current-prefix-arg) 4)
-(not ov))
+;; :view-only should not open the marginal notes buffer
+(and (null ov) (not (eql view-only :view-only
 (let ((notes-file (org-remark-notes-get-file-name)))
   (when (file-exists-p notes-file) (find-file notes-file)))
   ;; Open marginal notes normally as an indirect buffer in a side



[elpa] externals/org-remark 193fe279ea 49/75: feat(line):add line-number as a property to the highlight headline

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 193fe279ea3c7943cd441e41f5ccf55db8d35e2c
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line):add line-number as a property to the highlight headline

This commit also adds the facility (abnormal hook) for future
extensions.
---
 org-remark-line.el | 13 -
 org-remark.el  | 23 ---
 2 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 9d8403de56..ff57efa8fe 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 19 August 2023
+;; Last modified: 20 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -130,6 +130,8 @@ in cons cell (or nil) before function
 ;; Need to reload to cater to margin changes done by `olivetti'.
 (add-hook 'window-size-change-functions
   #'org-remark-line-highlights-redraw 96 :local)
+(add-hook 'org-remark-highlight-other-props-functions
+  #'org-remark-line-prop-line-number-get)
 (org-remark-line-set-window-margins))
 ;; Disable
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
@@ -137,6 +139,8 @@ in cons cell (or nil) before function
  #'org-remark-line-set-window-margins :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-highlights-redraw :local)
+(remove-hook 'org-remark-highlight-other-props-functions
+ #'org-remark-line-prop-line-number-get)
 (when org-remark-line-margins-set-p
   (setq left-margin-width (car org-remark-line-margins-original))
   (setq right-margin-width (cdr org-remark-line-margins-original))
@@ -210,6 +214,13 @@ by `overlays-in'."
  (highlights (overlays-in bol bol)))
 (seq-find #'org-remark-line-highlight-p highlights)))
 
+(defun org-remark-line-prop-line-number-get (highlight)
+  "Return the line number for HIGHLIGHT overlay.
+This happens only when HIGHLIGHT is a line-highlight."
+  (when (org-remark-line-highlight-p highlight)
+(list 'org-remark-line-number
+  (number-to-string (org-current-line (overlay-start highlight))
+
 (cl-defmethod org-remark-beg-end ((_org-remark-type (eql 'line)))
 (let ((bol (org-remark-line-pos-bol (point
   (list bol bol)))
diff --git a/org-remark.el b/org-remark.el
index 03d0228e83..75ff21e08a 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.1.0
 ;; Created: 22 December 2020
-;; Last modified: 18 August 2023
+;; Last modified: 20 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -1056,6 +1056,21 @@ buffer for automatic sync."
"\n" " "
(buffer-substring-no-properties (overlay-start ov) (overlay-end ov
 
+(defvar org-remark-highlight-other-props-functions nil
+  "Abnormal hook to be run when adding or updating headline.
+It is called with one argument HIGHLIGHT, which is the overlay
+that represents the current highlight being worked on. The
+function is run with source buffer as the current buffer.")
+
+(defun org-remark-highlight-collect-other-props (highlight)
+  "
+Assume to be run in the source buffer."
+  (let ((props nil))
+(dolist (fn org-remark-highlight-other-props-functions props)
+  (let ((plist (funcall fn highlight)))
+(when plist
+  (setq props (append props plist)))
+
 (defun org-remark-highlight-add-or-update-highlight-headline (highlight 
source-buf notes-buf)
   "Add a new HIGHLIGHT headlne to the NOTES-BUF or update it.
 Return notes-props as a property list.
@@ -1079,11 +1094,13 @@ beginning of source-headline, which should be one level 
up."
   (org-remark-source-find-file-name))
 link (run-hook-with-args-until-success
   'org-remark-highlight-link-to-source-functions filename beg)
-orgid (org-remark-highlight-get-org-id beg))
+orgid (org-remark-highlight-get-org-id beg)
+other-props (org-remark-highlight-collect-other-props highlight))
   ;; TODO ugly to add the beg end after setq above
   (plist-put props org-remark-prop-source-beg (number-to-string beg))
   (plist-put props org-remark-prop-source-end (number-to-string end))
-  (when link (plist-put props "org-remark-link" link)))
+  (when link (plist-put props "org-remark-link" link))
+  (when other-props (setq props (append props other-props
 ;;; Make it explicit that we are now in the notes-buf, though it is
 ;;; functionally redundant.
 (with-current-buffer notes-buf



[elpa] externals/org-remark 3f5ea6777b 32/75: fix(line): window selection is utterly confused

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 3f5ea6777b192d40e24a9830352e0e0f9d8e7062
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): window selection is utterly confused
---
 org-remark-line.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 51d31c2aea..b6452ef848 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -39,7 +39,7 @@
  :inherit highlight))
   "Face for the default line highlighter pen.")
 
-(defvar org-remark-line-icon "*")
+(defvar org-remark-line-icon " * ")
 
 (defvar org-remark-line-heading-title-max-length 40)
 
@@ -106,8 +106,8 @@ marginal area does not exist, its width will be returned as 
nil."
   (setq left-margin-width left-width)
   (setq right-margin-width right-width))
 ;;(org-remark-highlights-load)
-(set-window-margins window left-margin-width right-margin-width)
-(set-window-buffer window (current-buffer) 'keep-margins)
+(set-window-margins nil left-margin-width right-margin-width)
+(set-window-buffer nil (current-buffer) 'keep-margins)
 (window-margins)
 
 (defun org-remark-line-pos-bol (pos)



[elpa] externals/org-remark 063f68e5a4 36/75: feat(line): right margin

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 063f68e5a45258a52c722dac6030576bf22fdd0c
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line): right margin
---
 org-remark-line.el | 59 --
 1 file changed, 39 insertions(+), 20 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 17fcc30258..900bb5543a 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -59,6 +59,14 @@ in cons cell (or nil) before function
 (defvar-local org-remark-line-margins-set-p nil
   "State if margins are set by `org-remark-line' for current buffer.")
 
+(defcustom org-remark-line-margin-side 'left-margin
+  "The side of margin to display line highlights.
+Left or rigth can be chosen."
+  :local t
+  :type '(radio
+  (const :tag "Left margin" left-margin)
+  (const :tag "Right margin" right-margin)))
+
 ;;;###autoload
 (define-minor-mode org-remark-line-mode
   "Enable Org-remark to highlight and annotate the whole line."
@@ -105,11 +113,13 @@ marginal area does not exist, its width will be returned 
as nil."
   (setq org-remark-line-margins-set-p t))
 (if (or (eq left-width nil) (< left-width
org-remark-line-minimum-margin-width))
-(progn
-  (setq left-margin-width org-remark-line-minimum-margin-width)
-  (setq right-margin-width org-remark-line-minimum-margin-width))
-  (setq left-margin-width left-width)
-  (setq right-margin-width right-width))
+(setq left-margin-width org-remark-line-minimum-margin-width)
+  (setq left-margin-width left-width))
+(if (or (eq right-width nil) (< right-width
+   org-remark-line-minimum-margin-width))
+(setq right-margin-width (+ org-remark-line-minimum-margin-width
+org-remark-line-margin-padding))
+  (setq right-margin-width (+ right-width 
org-remark-line-margin-padding)))
 ;; For `set-window-margins' window should be specified.
 ;; Howerver, `set-window-buffer' should get nil for window.
 ;; Otherwise, the minibuffer also gets the margins. It's a
@@ -153,19 +163,19 @@ by `overlays-in'."
 (cl-defmethod org-remark-highlight-make-overlay (beg end face 
(_org-remark-type (eql 'line)))
   "Make and return a highlight overlay for line-highlight.
 Return nil when no window is created for current buffer."
-  (when (get-buffer-window)
+(when (get-buffer-window)
 (unless org-remark-line-mode (org-remark-line-mode +1))
 (let* ((face (or face 'org-remark-line-highlighter))
-   ;; We need to be sure where the minimum-margin-width is set to the 
buffer
-   ;; TODO rigth margin
(left-margin (or (car (window-margins)) left-margin-width))
-   ;; TODO we might want another string per line-highlight pen
+   (right-margin (or (cdr (window-margins)) right-margin-width))
(string (with-temp-buffer
  (insert org-remark-line-icon)
  (buffer-string)))
(string-length (length string))
-   (spaces-base-length (- left-margin
-  (+ string-length 
org-remark-line-margin-padding)))
+   (spaces-base-length (if (eql org-remark-line-margin-side 
'right-margin)
+   org-remark-line-margin-padding
+ (- left-margin
+(+ string-length 
org-remark-line-margin-padding
(spaces-length (if (> spaces-base-length 0) spaces-base-length 0))
(spaces (with-temp-buffer (insert-char ?\s spaces-length)
  (buffer-string)))
@@ -175,18 +185,27 @@ Return nil when no window is created for current buffer."
   ;; only need one of these; remove it if one already exits
   (remove-overlays (overlay-start spacer-ov) (overlay-end spacer-ov)
'category 'org-remark-spacer)
-  (overlay-put spacer-ov 'before-string (propertize " "
-'display
-`((margin left-margin)
-  ,spaces)))
+  (overlay-put spacer-ov 'before-string
+   (propertize " "
+   'display
+   `((margin ,org-remark-line-margin-side)
+ ,spaces)))
   (overlay-put spacer-ov 'category 'org-remark-spacer)
   (overlay-put spacer-ov 'insert-in-front-hooks
(list 'org-remark-line-highlight-modified))
   ;; line-highlight overlay
-  (overlay-put ov 'before-string (propertize " " 'display
- `((margin left-margin)
-   ,(prope

[elpa] externals/org-remark 2fd1025490 63/75: fix: Regression. Delete only removes.

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 2fd1025490ed411668257d307ebb4efd33b6de21
Author: Noboru Ota 
Commit: Noboru Ota 

fix: Regression. Delete only removes.
---
 org-remark.el | 41 +
 1 file changed, 25 insertions(+), 16 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 7d667bc8df..832411360a 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -693,12 +693,16 @@ follows:
 
 - \\[universal-argument]
 
+  This is the same behavior as function `org-remark-delete'.
+
   Look for notes in the entry. If there is any, the side-window
   will show them and a prompt will ask the user for confirmation.
   The function will delete the entry only when the user confirms
   with \\='y\\='. When \\='n\\=', it will only remove the entry's
-  properties. This is the same behavior as function
-  `org-remark-delete'.
+  properties.
+
+  If there are no notes in the entry, the command will delete the
+  entry without the prompt.
 
 - \\[universal-argument] \\[universal-argument]
 
@@ -740,7 +744,7 @@ see the notes to help with confirmation.
 
 If there are no notes, this function will not prompt for
 confirmation and will remove the highlight in the source buffer
-and deletes the entry in the marginal notes buffer.
+and delete the entry in the marginal notes buffer.
 
 This is the same behavior as passing a single `universal-argument'
 to function `org-remark-remove'.
@@ -763,10 +767,10 @@ not part of the undo tree. You can undo the deletion in 
the
 marginal notes buffer and then save it to sync the highlight
 back in the source."
   (interactive "d\nP")
-  (let ((optional-arg (if (eql 4 (prefix-numeric-value arg))
+  (let ((delete (if (eql 4 (prefix-numeric-value arg))
   '(16) ;; make it universal-arg x 2
 :delete)))
-(org-remark-remove point optional-arg)))
+(org-remark-remove point delete)))
 
 
  Private Functions
@@ -1364,17 +1368,19 @@ Return the point of begining of current heading."
 
 (defun org-remark-notes-remove (id &optional delete)
   "Remove the note entry for highlight ID.
-By default, it removes only the properties of the entry keeping
-the headline title and any notes in it intact.
+Return t.
 
-You can pass DELETE and delete the entire entry. Elisp can pass
-the following value to differentiate the deletion behavor (for
+By default, this function only removes the properties of the
+entry, keeping the headline title and any notes in it intact.
+
+You can pass DELETE to delete the entire entry. Elisp can pass
+the following value to differentiate the deletion behavior (for
 example, with commands `org-remark-remove' or
 `org-remark-delete'):
 
-- :auto-delete or a list including 16 (16) The latter value is
-  generated when the user uses a command with
-  \\[universal-argument] \\[universal-argument] ::
+- :auto-delete or a list that has a single element 16, that is
+  \\='(16)\\='. The latter value is generated when the user uses
+  a command with \\[universal-argument] \\[universal-argument] ::
 
   Delete the entry without asking the user when there is no notes
   in the entry. If there are any notes, remove the entry's
@@ -1387,7 +1393,8 @@ example, with commands `org-remark-remove' or
   confirms with \\='y\\='. When \\='n\\=', remove the entry's
   properties only.
 
-Return t if an entry is removed or deleted."
+  If there are no notes, do not prompt for confirmation and
+  delete the entry in the marginal notes buffer."
   (let* ((ibuf (org-remark-notes-buffer-get-or-create))
  (window (get-buffer-window ibuf)))
 (with-current-buffer ibuf
@@ -1407,14 +1414,16 @@ Return t if an entry is removed or deleted."
  (notes-exist-p (looking-at "."))
  (ok-to-delete-p nil))
  (cond
+  ;; Deletion Case 1. No notes. Auto-delete. OK to Delete
   ((and (not notes-exist-p) (eql delete :auto-delete))
(setq ok-to-delete-p t))
+  ;; Deletion Case 2. No notes. Normal delete. OK to Delete
   ((and (not notes-exist-p) (not (eql delete :auto-delete)))
-   ;; default behavior: keep the entry
-   (setq ok-to-delete-p nil))
+   (setq ok-to-delete-p t))
+  ;; Deletion Case 3. Notes exist. Auto-delete. Keep.
   ((and notes-exist-p (eql delete :auto-delete))
-   ;; keep the notes and entry when not asking the user
(setq ok-to-delete-p nil))
+  ;; Deletion Case 4. Notes exist. Normal delete. Prompt Y/N
   ((and notes-exist-p (not (eql delete :auto-delete)))
;; default behavior: when notes exist, ask the user
(display-buffer ibuf



[elpa] externals/org-remark 0829e27379 39/75: fix(line): redraw instead of reload when window size changes

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 0829e2737928f2b7cee0763857d4a9eefe84f48e
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): redraw instead of reload when window size changes

Reload causes some troubles. An example case:

1. the buffer contains a range-highlight and a line-highlight.
2. While you are editing the buffer, you move both highlights.
3. Before saving, you press C-h e to show echo or M-x to show minibuffer

3 above triggers `window-size-change-function` and reload all the
highlights for the buffer. Since the location of the range-highlight has
changed from that saved in the marginalia.org, `position-adjusted` gets
triggered, showing the icon (when enabled). This is false. The
save-buffer would have saved the new location and the
`position-adjusted` would not have been applied.

The line-highlight also gets moved to the location saved in the
marginalia.org. Again, this should not happen -- either wait for the
user to save the buffer or undo the changes to get back where the
highlight should be.

Redrawing avoids these issues. We are now only looking at the
line-highlights, and changing the spacer overlays. This way, we can
avoid triggering `after-load` functions (including `position-adjusted`).
---
 org-remark-line.el | 64 +++---
 1 file changed, 56 insertions(+), 8 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 9cb85df2a3..c55a193695 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -30,6 +30,14 @@
 
 (require 'org-remark)
 
+(defcustom org-remark-line-margin-side 'left-margin
+  "The side of margin to display line highlights.
+Left or rigth can be chosen."
+  :local t
+  :type '(radio
+  (const :tag "Left margin" left-margin)
+  (const :tag "Right margin" right-margin)))
+
 (defface org-remark-line-highlighter
   'class color) (min-colors 88) (background light))
  :foreground "#dbba3f")
@@ -77,14 +85,14 @@ in cons cell (or nil) before function
 (add-hook 'window-size-change-functions
   #'org-remark-line-set-window-margins 95 :local)
 ;; Need to reload to cater to margin changes done by `olivetti'.
-;;(add-hook 'window-size-change-functions
-;;  #'org-remark-highlights-load 96 :local)
+(add-hook 'window-size-change-functions
+  #'org-remark-line-redraw-highlights 96 :local)
 (org-remark-line-set-window-margins))
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)
-;;(remove-hook 'window-size-change-functions
-;; #'org-remark-highlights-load :local)
+(remove-hook 'window-size-change-functions
+ #'org-remark-line-redraw-highlights :local)
 (when org-remark-line-margins-set-p
   (setq left-margin-width (car org-remark-line-margins-original))
   (setq right-margin-width (cdr org-remark-line-margins-original))
@@ -153,6 +161,45 @@ by `overlays-in'."
 (let ((bol (org-remark-line-pos-bol (point
   (list bol bol)))
 
+(defun org-remark-line-redraw-highlights (&optional window)
+  (let ((window (or window (get-buffer-window
+(when (and (windowp window) (not (window-minibuffer-p window)))
+  (org-with-wide-buffer
+   (let ((highlights
+  (seq-filter (lambda (ov) (eql 'line (overlay-get ov 
'org-remark-type)))
+  org-remark-highlights)))
+ (dolist (ov highlights)
+   ;; The following is almost the same as 
`org-remark-highlight-make-overlay'.
+   ;; TODO Rationalize these two
+   (let* ((beg (overlay-start ov))
+  (left-margin (or (car (window-margins)) left-margin-width))
+  (right-margin (or (cdr (window-margins)) right-margin-width))
+  (string (with-temp-buffer
+(insert org-remark-line-icon)
+(buffer-string)))
+  (string-length (length string))
+  (spaces-base-length (if (eql org-remark-line-margin-side 
'right-margin)
+  org-remark-line-margin-padding
+(- left-margin
+   (+ string-length 
org-remark-line-margin-padding
+  (spaces-length (if (> spaces-base-length 0) 
spaces-base-length 0))
+  (spaces (with-temp-buffer (insert-char ?\s spaces-length)
+(buffer-string)))
+  (spacer-ov (make-overlay beg beg nil :front-advance)))
+ (remove-overlays (overlay-start spacer-ov) (overlay-end spacer-ov)
+  'category 'org-remark-spacer)
+ (overlay

[elpa] externals/org-remark c7dc42bf30 28/75: fix: margin width

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit c7dc42bf30f73b823348eb58e19acad4cd14f212
Author: Noboru Ota 
Commit: Noboru Ota 

fix: margin width
---
 org-remark-line.el | 21 --
 org-remark.el  | 85 +-
 2 files changed, 57 insertions(+), 49 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index e1ec071c4e..9bd028d753 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 14 August 2023
+;; Last modified: 15 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -74,7 +74,7 @@ filefor the first time, the window has not been created before
 ;; olivetti sets DEPTH to t (=90). We need go lower priority than it
 (add-hook 'window-size-change-functions
   #'org-remark-line-set-window-margins 95 :local)
-(setq left-margin-width org-remark-line-minimum-margin-width)
+;;(setq left-margin-width org-remark-line-minimum-margin-width)
 ;;(org-remark-line-set-buffer-windows))
 )
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
@@ -97,11 +97,14 @@ marginal area does not exist, its width will be returned as 
nil."
 ;; (funcall fn))
 ;;   (setq org-remark-line-delayed-put-overlay-functions nil))
 (cl-destructuring-bind (left-width . right-width) (window-margins)
-  (when (or (eq left-width nil) (< left-width
-   org-remark-line-minimum-margin-width))
-;; (setq left-margin-width org-remark-line-minimum-margin-width)
-(set-window-buffer (get-buffer-window) (current-buffer) 'keep-margins)
-(set-window-margins nil org-remark-line-minimum-margin-width))
+  (if (or (eq left-width nil) (< left-width
+ org-remark-line-minimum-margin-width))
+  (progn
+(setq left-margin-width org-remark-line-minimum-margin-width))
+(setq left-margin-width left-width)
+(setq right-margin-width right-width))
+  (set-window-buffer (get-buffer-window) (current-buffer) 'keep-margins)
+  (set-window-margins nil left-margin-width right-margin-width)
   (org-remark-highlights-load)
   (window-margins
 
@@ -144,7 +147,7 @@ Return OV"
   (org-remark-line-highlight-overlay-put beg end face)
 ;; window is still not created and assigned to the current buffer.
 ;; Reload when it is.
-(add-hook 'window-state-change-functions #'org-remark-line-reload 80 
'local)
+(add-hook 'window-state-change-functions #'org-remark-line-reload 95 
'local)
 ;;(push (lambda ()
 ;;(org-remark-line-highlight-overlay-put beg end face))
 ;;  org-remark-line-delayed-put-overlay-functions)
@@ -160,7 +163,7 @@ Return OV"
   ;;(when (or (car (window-margins)) (cdr (window-margins)))
   (let* ((face (or face 'org-remark-line-highlighter))
  ;; We need to be sure where the minimum-margin-width is set to the 
buffer
- (left-margin (or (car (window-margins)) 
org-remark-line-minimum-margin-width))
+ (left-margin (or (car (window-margins)) left-margin-width))
  (string (or string
  (with-temp-buffer ;;(insert-char ?\s spaces)
(insert org-remark-line-icon)
diff --git a/org-remark.el b/org-remark.el
index 2fcc8a03e8..65470522ad 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.1.0
 ;; Created: 22 December 2020
-;; Last modified: 14 August 2023
+;; Last modified: 15 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -331,7 +331,7 @@ recommended to turn it on as part of Emacs initialization.
   (add-hook 'after-save-hook #'org-remark-save nil t)
   (add-hook 'org-remark-highlight-link-to-source-functions
 #'org-remark-highlight-link-to-source-default 80)
-  (add-hook 'after-revert-hook #'org-remark-highlights-load)
+  (add-hook 'after-revert-hook #'org-remark-highlights-load :local)
   (add-hook 'clone-buffer-hook #'org-remark-highlights-load 80 :local))
  (t
   ;; Deactivate
@@ -344,7 +344,7 @@ recommended to turn it on as part of Emacs initialization.
   (remove-hook 'after-save-hook #'org-remark-save t)
   (remove-hook 'org-remark-highlight-link-to-source-functions
#'org-remark-highlight-link-to-source-default)
-  (remove-hook 'after-revert-hook #'org-remark-highlights-load)
+  (remove-hook 'after-revert-hook #'org-remark-highlights-load :local)
   (remove-hook 'clone-buffer-hook #'org-remark-highlights-load :local
 
 
@@ -862,42 +862,43 @@ round-trip back to the notes file."

[elpa] externals/org-remark 18f39bf119 56/75: Merge branch 'main' into dev/1.3.0

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 18f39bf119f7e00f2d645727d1125e903438d5e4
Merge: c506e61017 6bdd326e46
Author: Noboru Ota 
Commit: Noboru Ota 

Merge branch 'main' into dev/1.3.0
---
 NEWS   |   3 ++
 README-elpa|   7 ++-
 README.org |   2 +-
 .../2023-08-20T183400_how-to-buffer-window.org |   2 +
 ...0T184309_C_how-to-set-icons-to-be-svg-images.md |  57 +
 org-remark-info.el |   4 +-
 org-remark.el  |   2 +-
 resources/images/v1.2.0/2023-08-20-SVG-icon.png| Bin 0 -> 147118 bytes
 8 files changed, 73 insertions(+), 4 deletions(-)

diff --git a/NEWS b/NEWS
index 1dd79b04fd..2eaacbd217 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+Version 1.2.1 - 2023-08-20
+  - fix: org-remark-icon-mode is a void symbol
+
 Version 1.2.0 - 2023-08-20
 
   - feat(info): Org-remark supports Info
diff --git a/README-elpa b/README-elpa
index 0e1b7099a2..eca34e0481 100644
--- a/README-elpa
+++ b/README-elpa
@@ -35,7 +35,9 @@ _
   [online] or or Info node `(org-remark) Getting Started'.
 
   For customization, refer to the customization group `org-remark' or
-  user manual: [online] or Info node `(org-remark) Customizing'.
+  user manual: [online] or Info node `(org-remark) Customizing'. A
+  [separate online article] has been written to guide you on how to
+  customize an icon (to be incorporated into the user manual later).
 
   An [introductory video] (8 minutes) and [V1.1.0 release introduction]
   (12 minutes) are available on YouTube.
@@ -51,6 +53,9 @@ _
 
 [online] 
 
+[separate online article]
+
+
 [introductory video] 
 
 [V1.1.0 release introduction] 
diff --git a/README.org b/README.org
index 79ac957668..f007d8cb39 100644
--- a/README.org
+++ b/README.org
@@ -18,7 +18,7 @@ For installation and minimum configuration, refer to 
[[#installation][Installati
 
 Getting Started in the user manual will get you started in 5 minutes: 
[[https://nobiot.github.io/org-remark/#Getting-Started][online]] or or Info 
node `(org-remark) Getting Started'.
 
-For customization, refer to the customization group `org-remark' or user 
manual: [[https://nobiot.github.io/org-remark/#Customizing][online]] or Info 
node `(org-remark) Customizing'.
+For customization, refer to the customization group `org-remark' or user 
manual: [[https://nobiot.github.io/org-remark/#Customizing][online]] or Info 
node `(org-remark) Customizing'. A 
[[https://github.com/nobiot/org-remark/tree/main/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md][separate
 online article]] has been written to guide you on how to customize an icon (to 
be incorporated into the user manual later).
 
 An [[https://youtu.be/c8DHrAsFiLc][introductory video]] (8 minutes) and 
[[https://youtu.be/BTFuS21N00k][V1.1.0 release introduction]] (12 minutes) are 
available on YouTube.
 
diff --git a/docs/articles/2023-08-20T183400_how-to-buffer-window.org 
b/docs/articles/2023-08-20T183400_how-to-buffer-window.org
new file mode 100644
index 00..d8f79658b9
--- /dev/null
+++ b/docs/articles/2023-08-20T183400_how-to-buffer-window.org
@@ -0,0 +1,2 @@
+Buffer window customization #43
+https://github.com/nobiot/org-remark/discussions/43
diff --git 
a/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md 
b/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md
new file mode 100644
index 00..508cd5e888
--- /dev/null
+++ b/docs/articles/2023-08-20T184309_C_how-to-set-icons-to-be-svg-images.md
@@ -0,0 +1,57 @@
+---
+title:How to Set Icons to be SVG Images
+created:  2023-08-20
+modified: 20 August 2023
+category: #creation
+id:   2023-08-20T184309
+---
+
+# How to Set Org-remark to Use SVG Icons
+
+![Highlights with an icon indicating annotations 
exist](../../resources/images/v1.2.0/2023-08-20-SVG-icon.png "Highlights with 
an icon indicating annotations exist")
+
+I have released version 1.2.0 of Org-remark. In this version, highlights can 
display an icon to visually indicate that annotations exist for them. This was 
implemented in response to a feature request I received via YouTube comments 
and recorded in [issue #64](https://github.com/nobiot/org-remark/issues/64).
+
+The icon by default is a string of ASCII characters "`(*)`" so that it can be 
used for terminals. You can easily customize Org-remark to use an SVG image as 
shown in the image above.
+
+There are mainly two ways:
+
+1. Use the new built-in `icons` library available as of Emacs version 29.1
+
+2. Create a custom function and use a third-party library such as 
[`svg-lib`](ht

[elpa] externals/org-remark 79ad1baf7e 20/75: refactor(line): no need for text-scale-mode-hook

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 79ad1baf7e112fcaea32f73be1ac68fb0e875cd1
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(line): no need for text-scale-mode-hook
---
 org-remark-line.el | 15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 7692829c80..774af8ea95 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -61,14 +61,10 @@
   #'org-remark-line-find 80 :local)
 (add-hook 'window-size-change-functions
   #'org-remark-line-set-window-margins nil :local)
-;; (add-hook 'text-scale-mode-hook
-;;   #'org-remark-line-set-buffer-windows nil :local)
 (org-remark-line-set-buffer-windows))
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
- #'org-remark-line-set-window-margins :local)
-(remove-hook 'text-scale-mode-hook
-  #'org-remark-line-set-buffer-windows :local)))
+ #'org-remark-line-set-window-margins :local)))
 
 (defun org-remark-line-set-buffer-windows ()
   "
@@ -184,11 +180,10 @@ end of overlay being identical."
   ;; always follow the point, keeping the original place unless you
   ;; directly change the notes. That's not really an intutive behaviour,
   ;; though in some cases, it imay be useful.
-  (org-with-wide-buffer
-   (let* ((ov-start (overlay-start ov))
-  (ov-line-bol (org-remark-line-pos-bol ov-start)))
- (unless (= ov-start ov-line-bol)
-   (move-overlay ov ov-line-bol ov-line-bol)
+  (let* ((ov-start (overlay-start ov))
+ (ov-line-bol (org-remark-line-pos-bol ov-start)))
+(unless (= ov-start ov-line-bol)
+  (move-overlay ov ov-line-bol ov-line-bol
 
 (cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type 
(eql 'line)))
   ;; If the icon-string has a display properties, assume it is an icon image



[elpa] externals/org-remark 3997025261 33/75: feat: icons for line-hl get their default face when notes exit

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 39970252611acb18b5b227e04b6ed5f46a5b8086
Author: Noboru Ota 
Commit: Noboru Ota 

feat: icons for line-hl get their default face when notes exit
---
 org-remark-icon.el | 12 ++--
 org-remark-line.el | 16 
 2 files changed, 22 insertions(+), 6 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 39f5ffa809..fa66d31401 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 14 August 2023
+;; Last modified: 18 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -196,11 +196,19 @@ of them. All it needs to do is to return a string that 
represents
 an icon, typically propertized with a face."
   (let ((icon (symbol-value (intern (concat "org-remark-icon-"
 (symbol-name icon-name)
-(highlight-face (overlay-get highlight 'face))
+(highlight-face (org-remark-icon-highlight-get-face
+ highlight
+ (overlay-get highlight 'org-remark-type)))
 (default-face default-face))
 (if (functionp icon)
 (funcall icon icon-name highlight-face default-face)
   (propertize icon 'face (if default-face default-face highlight-face)
 
+(cl-defgeneric org-remark-icon-highlight-get-face (highlight _org-remark-type)
+  "Return the face of the HIGHLIGHT overlay.
+This is default method for range-highlights."
+  (overlay-get highlight 'face))
+
+
 (provide 'org-remark-icon)
 ;;; org-remark-icon.el ends here
diff --git a/org-remark-line.el b/org-remark-line.el
index b6452ef848..79a314b94b 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -241,14 +241,22 @@ Return nil when no window is created for current buffer."
   (cond (display-prop
  (let* ((display-prop (list '(margin left-margin) display-prop))
 (icon-string (propertize " " 'display display-prop)))
-   (setq icon-string (propertize icon-string
- 'face 
'org-remark-line-highlighter))
+  ;; (setq icon-string (propertize icon-string
+  ;;   'face 
'org-remark-line-highlighter))
(overlay-put ov 'before-string icon-string)))
 (icon-string
- (let ((icon-string (propertize icon-string
-'face 
'org-remark-line-highlighter)))
+ (let ((icon-string icon-string))
+;;(propertize icon-string
+;;'face 
'org-remark-line-highlighter)))
(overlay-put ov 'before-string (propertize " " 'display (list 
'(margin left-margin) icon-string)
 (t (ignore))
 
+
+(cl-defmethod org-remark-icon-highlight-get-face (highlight (_org-remark-type 
(eql 'line)))
+  "Return the face of the line-highilght in a margin."
+  (get-text-property 0 'face
+ (cadr (get-text-property 0 'display
+  (overlay-get highlight 
'before-string)
+
 (provide 'org-remark-line)
 ;;; org-remark-line.el ends here



[elpa] externals/org-remark f7031507db 15/75: fix: defgeneric seems needed anyway..

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit f7031507db51d79f0c2e17f747f287a533e20afb
Author: Noboru Ota 
Commit: Noboru Ota 

fix: defgeneric seems needed anyway..
---
 org-remark.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index 6b5e95dcc9..225d54197d 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -781,7 +781,7 @@ Optionally ID can be passed to find the exact ID match."
 ;;   functions here mostly assume the current buffer is the source
 ;;   buffer.
 
-;; (cl-defgeneric org-remark-highlight-mark-overlay (_org-remark-type))
+(cl-defgeneric org-remark-highlight-mark-overlay (_org-remark-type))
 
 (cl-defmethod org-remark-highlight-mark-overlay (ov face (_org-remark-type 
(eql nil)))
   (overlay-put ov 'face (if face face 'org-remark-highlighter)))



[elpa] externals/org-remark af03b2103e 50/75: docs: Docstring for org-remark-default-features, etc.

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit af03b2103e1be65bb18829b750d5f29e8cded4c6
Author: Noboru Ota 
Commit: Noboru Ota 

docs: Docstring for org-remark-default-features, etc.
---
 org-remark-icon.el |  8 +++-
 org-remark.el  | 25 +++--
 2 files changed, 26 insertions(+), 7 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 9ccdd2e7d1..8fca035524 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 19 August 2023
+;; Last modified: 20 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -28,6 +28,8 @@
 
 ;;; Code:
 (require 'cl-macs)
+;; Silence compiler
+(defvar org-remark-default-feature-modes)
 
 (defgroup org-remark-icon nil
   "Enable `org-remark' to display glyph/icon indicators."
@@ -87,6 +89,10 @@ single character, such as the default value."
   (string "(d)")
   (function)))
 
+;; Register a mode for automatic enablement at the same time as
+;; `org-remark-mode'.
+(add-to-list 'org-remark-default-feature-modes #'org-remark-icon-mode)
+
 ;;;###autoload
 (define-minor-mode org-remark-icon-mode
   "Enable Org-remark to display icons.
diff --git a/org-remark.el b/org-remark.el
index 75ff21e08a..a272214ba8 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -137,9 +137,21 @@ highlights. It is run with the source buffer as current 
buffer."
 
  Variables
 
-(defvar org-remark-default-features '(org-remark-icon org-remark-line))
-(defvar org-remark-default-feature-modes '(org-remark-icon-mode))
-(defvar org-remark-find-dwim-functions '(org-remark-find-overlay-at-point))
+(defvar org-remark-default-features '(org-remark-icon org-remark-line)
+  "Extension features to be enabled by default.
+It is suggested to keep them as the default, but you can choose to disable 
them")
+
+(defvar org-remark-default-feature-modes '()
+  "Extension minor modes to be enabled together with `org-remark-mode'.
+These minor modes should be registered to this variable by the
+respective feature where required. As an example, see
+`org-remark-line'.")
+
+(defvar org-remark-find-dwim-functions '(org-remark-find-overlay-at-point)
+  "Functions to find the highlight overlays.
+These functions should be registered to this variable by the
+respective feature where required. As an example, see
+`org-remark-line'.")
 
 (defvar org-remark-last-notes-buffer nil
   "The cloned indirect buffer visiting the notes file.
@@ -324,9 +336,9 @@ recommended to turn it on as part of Emacs initialization.
  (org-remark-mode
   ;; Activate
   (dolist (feature org-remark-default-features)
-(unless (featurep feature) (require feature)))
+(unless (featurep feature) (require feature nil 'noerror)))
   (dolist (feature-mode org-remark-default-feature-modes)
-(funcall feature-mode +1))
+(when (functionp feature-mode) (funcall feature-mode +1)))
   (org-remark-highlights-load)
   (add-hook 'after-save-hook #'org-remark-save nil t)
   (add-hook 'org-remark-highlight-link-to-source-functions
@@ -806,7 +818,8 @@ Optionally ID can be passed to find the exact ID match."
 
 (cl-defgeneric org-remark-highlight-make-overlay (_beg _end _face 
_org-remark-type)
   "Make overlay and return it
-Put FACE and other necessary properties to the highlight OV")
+Put FACE and other necessary properties to the highlight OV"
+  (ignore))
 
 (cl-defmethod org-remark-highlight-make-overlay (beg end face
  (_org-remark-type (eql 
nil)))



[elpa] externals/org-remark 833d909264 61/75: docs: NEWS for the current development branch (WIP)

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 833d90926472b1f77efe9758600104a2d5f41e3f
Author: Noboru Ota 
Commit: Noboru Ota 

docs: NEWS for the current development branch (WIP)
---
 NEWS | 9 +
 1 file changed, 9 insertions(+)

diff --git a/NEWS b/NEWS
index 2eaacbd217..c6aab5cb7a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,13 @@
+Under current development
+
+ Features:
+
+   - (#21) Option to delete notes when highlight removed if the notes are empty
+
+   - (#71) Ability to highlight a whole line and show a mark on the margin
+
 Version 1.2.1 - 2023-08-20
+
   - fix: org-remark-icon-mode is a void symbol
 
 Version 1.2.0 - 2023-08-20



[elpa] externals/org-remark 16622af0c0 66/75: fix: add org-remark-find-overlay-at-point to local hook

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 16622af0c001d449b58ba794602facda850119d1
Author: Noboru Ota 
Commit: Noboru Ota 

fix: add org-remark-find-overlay-at-point to local hook

This function is to be set to org-remark-find-dwim-functions. Before the
chagne, it was added as globa. This patch changes it to local buffer
specific.
---
 org-remark.el | 10 +++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index a7d62d4fc2..7884331cab 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.2.1
 ;; Created: 22 December 2020
-;; Last modified: 22 August 2023
+;; Last modified: 29 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -168,7 +168,7 @@ These minor modes should be registered to this variable by 
the
 respective feature where required. As an example, see
 `org-remark-line'.")
 
-(defvar org-remark-find-dwim-functions '(org-remark-find-overlay-at-point)
+(defvar org-remark-find-dwim-functions nil
   "Functions to find the highlight overlays.
 These functions should be registered to this variable by the
 respective feature where required. As an example, see
@@ -361,7 +361,9 @@ recommended to turn it on as part of Emacs initialization.
   (dolist (feature-mode org-remark-default-feature-modes)
 (when (functionp feature-mode) (funcall feature-mode +1)))
   (org-remark-highlights-load)
-  (add-hook 'after-save-hook #'org-remark-save nil t)
+  (add-hook 'org-remark-find-dwim-functions
+#'org-remark-find-overlay-at-point nil :local)
+  (add-hook 'after-save-hook #'org-remark-save nil :local)
   (add-hook 'org-remark-highlight-link-to-source-functions
 #'org-remark-highlight-link-to-source-default 80)
   (add-hook 'after-revert-hook #'org-remark-highlights-load :local)
@@ -374,6 +376,8 @@ recommended to turn it on as part of Emacs initialization.
   (setq org-remark-highlights nil)
   (dolist (feature-mode org-remark-default-feature-modes)
 (funcall feature-mode -1))
+  (remove-hook 'org-remark-find-dwim-functions
+#'org-remark-find-overlay-at-point :local)
   (remove-hook 'after-save-hook #'org-remark-save t)
   (remove-hook 'org-remark-highlight-link-to-source-functions
#'org-remark-highlight-link-to-source-default)



[elpa] externals/org-remark c506e61017 55/75: fix(line): `org-remark-mark-line` does not autoload

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit c506e6101751bd55982bf1e835ff291112fc3fa8
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): `org-remark-mark-line` does not autoload

The comment is created via a call to `org-remark-create` macro. The call
is done within the library, so we would need to wait for it to be
loaded. This is too late, so adding a dummy `defun` with the autoload
cookie to register it. The actual implementation is added when the
library is later loaded (likely together with `org-remark` itself
as it is likely to be deferred).
---
 org-remark-line.el | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/org-remark-line.el b/org-remark-line.el
index ff57efa8fe..e30a44041c 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -151,6 +151,13 @@ in cons cell (or nil) before function
   (setq org-remark-line-margins-set-p nil
 
 ;; Default line-highlighter pen
+
+;;;###autoload
+(defun org-remark-mark-line (&args _)
+  "Dummy function definition to let autoload work.
+The actual implementation is added when this library is loaded
+and macro `org-remark-create' creates the actual function.")
+
 (org-remark-create "line"
`org-remark-line-highlighter
`(org-remark-type line))



[elpa] externals/org-remark f37ddb69e7 22/75: fix(change): force trigger of notes buffer face

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit f37ddb69e781e0069684fc60b4ae7b81f978a3e7
Author: Noboru Ota 
Commit: Noboru Ota 

fix(change): force trigger of notes buffer face

Problem: changing to the same line-highlight does not trigger sync but
this causes the icon for notes not being updated.

Force tiggering the update save for :change:operation. The line-icons do
not get updated because :change: to the same pen does not involve buffer
modificaiton and thus the sync does not get triggered to update icons.
---
 org-remark.el | 8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index 407cea5f0c..9687f5fc03 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -873,7 +873,13 @@ round-trip back to the notes file."
  (org-remark-highlight-put-props ov notes-props))
;; Save the notes buffer when not loading
(unless (eq notes-buf (current-buffer))
- (with-current-buffer notes-buf (save-buffer))
+ ;; Force tiggering the update save for :change: operation
+ ;; line-icons do not get updated because it does not
+ ;; involve buffer modificaiton and thus the sync does not
+ ;; get triggered to update icons.
+ (with-current-buffer notes-buf
+   (unless (buffer-modified-p) (restore-buffer-modified-p t))
+   (save-buffer))
   (deactivate-mark)
   (org-remark-highlights-housekeep)
   (org-remark-highlights-sort)



[elpa] externals/org-remark ace9570070 52/75: refactor: simply org-remark-open

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit ace9570070038918bef8ab6525d3b4f556d5d37b
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: simply org-remark-open
---
 org-remark.el | 7 +++
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 57515240e0..cd61425c08 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -549,13 +549,12 @@ notes file by tracking it."
   ;; Somehow recenter is needed when a highlight is deleted and move to a
   ;; previous highlight.  Otherwise, the cursor is too low to show the
   ;; entire entry.  It looks like there is no entry.
-  (goto-char p)(org-narrow-to-subtree)(org-end-of-meta-data t)(recenter))
+  (goto-char p) (org-narrow-to-subtree) (org-end-of-meta-data t) 
(recenter))
 ;; Run hook with the current-buffer being the note's buffer
 (run-hooks 'org-remark-open-hook)
 ;; Avoid error when buffer-action is set to display a new frame
-(when-let ((view-only view-only)
-   (window (get-buffer-window cbuf)))
-  (select-window window
+(when view-only
+  (select-window (get-buffer-window cbuf)
 
 (defun org-remark-view (point)
   "View marginal notes for highlight at POINT.



[elpa] externals/org-remark d606d80a47 29/75: refactor: move highlights-delay-load to org-remark.el

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit d606d80a47f9cbbd1619ed795d8de9f8d67f5f33
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: move highlights-delay-load to org-remark.el
---
 org-remark-line.el | 27 +++
 org-remark.el  | 33 +
 2 files changed, 36 insertions(+), 24 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 9bd028d753..25abebd909 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -97,10 +97,12 @@ marginal area does not exist, its width will be returned as 
nil."
 ;; (funcall fn))
 ;;   (setq org-remark-line-delayed-put-overlay-functions nil))
 (cl-destructuring-bind (left-width . right-width) (window-margins)
+  ;; TODO make this part compatible with right margin
   (if (or (eq left-width nil) (< left-width
  org-remark-line-minimum-margin-width))
   (progn
-(setq left-margin-width org-remark-line-minimum-margin-width))
+(setq left-margin-width org-remark-line-minimum-margin-width)
+(setq right-margin-width org-remark-line-minimum-margin-width))
 (setq left-margin-width left-width)
 (setq right-margin-width right-width))
   (set-window-buffer (get-buffer-window) (current-buffer) 'keep-margins)
@@ -147,22 +149,23 @@ Return OV"
   (org-remark-line-highlight-overlay-put beg end face)
 ;; window is still not created and assigned to the current buffer.
 ;; Reload when it is.
-(add-hook 'window-state-change-functions #'org-remark-line-reload 95 
'local)
+;; (add-hook 'window-state-change-functions #'org-remark-line-reload 95 
'local)
 ;;(push (lambda ()
 ;;(org-remark-line-highlight-overlay-put beg end face))
 ;;  org-remark-line-delayed-put-overlay-functions)
 nil))
 
-(defun org-remark-line-reload (window)
-  (when (windowp window)
-(remove-hook 'window-state-change-functions
- #'org-remark-line-reload 'local)
-(org-remark-highlights-load)))
+;; (defun org-remark-line-reload (window)
+;;   (when (windowp window)
+;; (remove-hook 'window-state-change-functions
+;;  #'org-remark-line-reload 'local)
+;; (org-remark-highlights-load)))
 
 (defun org-remark-line-highlight-overlay-put (beg end face &optional string)
   ;;(when (or (car (window-margins)) (cdr (window-margins)))
   (let* ((face (or face 'org-remark-line-highlighter))
  ;; We need to be sure where the minimum-margin-width is set to the 
buffer
+ ;; TODO rigth margin
  (left-margin (or (car (window-margins)) left-margin-width))
  (string (or string
  (with-temp-buffer ;;(insert-char ?\s spaces)
@@ -243,11 +246,11 @@ end of overlay being identical."
   ;; always follow the point, keeping the original place unless you
   ;; directly change the notes. That's not really an intutive behaviour,
   ;; though in some cases, it imay be useful.
-  (if (not (overlay-start ov)) (delete-overlay ov)
-(let* ((ov-start (overlay-start ov))
-   (ov-line-bol (org-remark-line-pos-bol ov-start)))
-  (unless (= ov-start ov-line-bol)
-(move-overlay ov ov-line-bol ov-line-bol)
+  ;; (if (not (overlay-start ov)) (delete-overlay ov)
+  (let* ((ov-start (overlay-start ov))
+ (ov-line-bol (org-remark-line-pos-bol ov-start)))
+(unless (= ov-start ov-line-bol)
+  (move-overlay ov ov-line-bol ov-line-bol
 
 (defun org-remark-line-icon-overlay-put (ov icon-string)
   ;; If the icon-string has a display properties, assume it is an icon image
diff --git a/org-remark.el b/org-remark.el
index 65470522ad..34f7855a33 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -862,6 +862,10 @@ round-trip back to the notes file."
  (if (not filename)
  (message (format "org-remark: Highlights not saved.\
  This buffer (%s) is not supported" (symbol-name major-mode)))
+   ;; OV may not be created for line-highlights when the user opens
+   ;; the buffer for the first time, as the window may not have been
+   ;; created to display the buffer yet. This is necessary for the
+   ;; margin width to be calculated.
(when ov
  (while properties
(let ((prop (pop properties))
@@ -1471,6 +1475,13 @@ highlight is a property list in the following properties:
  highlights)
highlights))
 
+(defun org-remark-highlights-delay-load (window)
+  "Delay load until window for current buffer is created."
+  (when (windowp window)
+(remove-hook 'window-state-change-functions
+ #'org-remark-highlights-delay-load 'local)
+(org-remark-highlights-load)))
+
 ;;;###autoload
 (defun org-remark-highlights-load (&optional update)
   "Visit notes file & load the saved highlights onto current buffer.
@@ -1479,16 +1490,15 @@ output a message in the echo.
 
 Non-nil value for UPDATE is passed for the n

[elpa] externals/org-remark e136189485 34/75: fix(line): window margin wrongly sets minibuffer's margin

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit e1361894857902537baf81aada79cbf294c764ad
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): window margin wrongly sets minibuffer's margin
---
 org-remark-line.el | 19 +++
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 79a314b94b..ee76016738 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 18 August 2023
+;; Last modified: 19 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -76,10 +76,15 @@ in cons cell (or nil) before function
 ;; olivetti sets DEPTH to t (=90). We need go lower priority than it
 (add-hook 'window-size-change-functions
   #'org-remark-line-set-window-margins 95 :local)
+;; Need to reload to cater to margin changes done by `olivetti'.
+(add-hook 'window-size-change-functions
+  #'org-remark-highlights-load 96 :local)
 (org-remark-line-set-window-margins))
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)
+(remove-hook 'window-size-change-functions
+ #'org-remark-highlights-load :local)
 (when org-remark-line-margins-set-p
   (setq left-margin-width (car org-remark-line-margins-original))
   (setq right-margin-width (cdr org-remark-line-margins-original))
@@ -92,7 +97,7 @@ in cons cell (or nil) before function
 Return a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). If a
 marginal area does not exist, its width will be returned as nil."
   (let ((window (or window (get-buffer-window
-(when (windowp window)
+(when (and (windowp window) (not (window-minibuffer-p window)))
   (cl-destructuring-bind (left-width . right-width) (window-margins)
 ;; TODO make this part compatible with right margin
 (unless org-remark-line-margins-set-p
@@ -105,8 +110,14 @@ marginal area does not exist, its width will be returned 
as nil."
   (setq right-margin-width org-remark-line-minimum-margin-width))
   (setq left-margin-width left-width)
   (setq right-margin-width right-width))
-;;(org-remark-highlights-load)
-(set-window-margins nil left-margin-width right-margin-width)
+;; For `set-window-margins' window should be specified.
+;; Howerver, `set-window-buffer' should get nil for window.
+;; Otherwise, the minibuffer also gets the margins. It's a
+;; little tricky behaviour. Both functions seem to be required.
+;; The former changes the current window's margin display
+;; immediately. The latter makes the margin widths the default
+;; for future, when window gets split, etc.
+(set-window-margins window left-margin-width right-margin-width)
 (set-window-buffer nil (current-buffer) 'keep-margins)
 (window-margins)
 



[elpa] externals/org-remark 6dbf1cca4a 35/75: fix(line): svg icon does not get the face correctly

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 6dbf1cca4ac403713509f6ac52905ea442205622
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): svg icon does not get the face correctly
---
 org-remark-line.el | 11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index ee76016738..17fcc30258 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -249,16 +249,15 @@ Return nil when no window is created for current buffer."
   (when (get-buffer-window)
 ;; If the icon-string has a display properties, assume it is an icon image
 (let ((display-prop (get-text-property 0 'display icon-string)))
-  (cond (display-prop
+  (cond (display-prop ; svg-based icon
  (let* ((display-prop (list '(margin left-margin) display-prop))
+(icon-face (get-text-property 0 'face icon-string))
 (icon-string (propertize " " 'display display-prop)))
-  ;; (setq icon-string (propertize icon-string
-  ;;   'face 
'org-remark-line-highlighter))
+   (when icon-face
+ (setq icon-string (propertize icon-string 'face icon-face)))
(overlay-put ov 'before-string icon-string)))
-(icon-string
+(icon-string ; text/string-based icon
  (let ((icon-string icon-string))
-;;(propertize icon-string
-;;'face 
'org-remark-line-highlighter)))
(overlay-put ov 'before-string (propertize " " 'display (list 
'(margin left-margin) icon-string)
 (t (ignore))
 



[elpa] externals/org-remark 8f9875f714 24/75: doc(line): Remove unused source comments (old code)

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 8f9875f714b6eb02baa8f617acd19bc27b1bfec5
Author: Noboru Ota 
Commit: Noboru Ota 

doc(line): Remove unused source comments (old code)
---
 org-remark-line.el | 14 +-
 1 file changed, 1 insertion(+), 13 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 774af8ea95..707d931184 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 06 August 2023
+;; Last modified: 07 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -103,18 +103,6 @@ by `overlays-in'."
  (highlights (overlays-in bol bol)))
 (seq-find #'org-remark-line-highlight-p highlights)))
 
-
-;;;###autoload
-;; (defun org-remark-mark-line (beg end &optional id mode)
-;;   (interactive (org-remark-beg-end 'line))
-;;   (org-remark-highlight-mark beg end id mode  ;; LINE line function 
different
-;;  ;; LINE needs to be the suffix of a
-;;  ;; function: `org-remark-mark-'
-;;  "line" nil ;; LINE important to put
-;;  ;; the suffix of the label
-;;  ;; to call this correct function
-;;  (list 'org-remark-type 'line)))
-
 (org-remark-create "line"
'org-remark-line-highlighter
'(org-remark-type line))



[elpa] externals/org-remark c1c120f0c9 45/75: feat(line):defcustom org-remark-line-minimum-margin-width

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit c1c120f0c92b59a8b3e30f234749ff9edb69047b
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line):defcustom org-remark-line-minimum-margin-width
---
 org-remark-line.el | 46 --
 1 file changed, 28 insertions(+), 18 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 8eec55ebee..0113ee6478 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -44,7 +44,18 @@ character, such as the default value.)"
   :type 'string
   :safe 'stringp)
 
-(defvar org-remark-line-minimum-margin-width 3)
+(defcustom org-remark-line-minimum-margin-width 3
+  "Margin width in number.
+It can be a single number or a cons cell. When it is a single
+number, both the left and right margin widths will be the same.
+When this customizing variable is a cons cell, the format is as
+follows: (LEFT-MARGIN-WIDTH . RIGHT-MARGIN-WIDTH). The first
+value is the left margin width and the secon value is the right
+one."
+  :local t
+  :type '(choice
+  (integer :tag "Minimum margin width for both left and right margins" 
3)
+  (cons :tag "Left and right margin widths" integer integer)))
 
 (defvar org-remark-line-margin-padding 1
   "Padding between the main text area the icon on the margin")
@@ -70,14 +81,7 @@ Left or rigth can be chosen."
  :inherit highlight))
   "Face for the default line highlighter pen.")
 
-(defvar org-remark-line-heading-title-max-length 40)
-
-(defvar org-remark-line-ellipsis "…")
-
-(defvar org-remark-line-minimum-margin-width 3)
-
-(defvar org-remark-line-margin-padding 1
-  "Padding between the main text area the icon on the margin")
+(defvar-local org-remark-line-left-margin-width nil)
 
 (defvar-local org-remark-line-right-margin-width nil)
 
@@ -102,10 +106,6 @@ in cons cell (or nil) before function
 ;; This is to prioritize it over line-highlight when the fomer
 ;; is at point and yet on the same line of another
 ;; line-highlight.
-(unless org-remark-line-right-margin-width
-  (setq org-remark-line-right-margin-width
-(+ org-remark-line-minimum-margin-width
-   org-remark-line-margin-padding)))
 (add-hook 'org-remark-find-dwim-functions
   #'org-remark-line-find 80 :local)
 ;; olivetti sets DEPTH to t (=90). We need go lower priority than it
@@ -116,7 +116,6 @@ in cons cell (or nil) before function
   #'org-remark-line-highlights-redraw 96 :local)
 (org-remark-line-set-window-margins))
 ;; Disable
-(setq org-remark-line-right-margin-width nil)
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)
@@ -127,6 +126,8 @@ in cons cell (or nil) before function
   (setq right-margin-width (cdr org-remark-line-margins-original))
   (set-window-margins nil left-margin-width right-margin-width)
   (set-window-buffer (get-buffer-window) (current-buffer) nil)
+  (setq org-remark-line-left-margin-width nil)
+  (setq org-remark-line-right-margin-width nil)
   (setq org-remark-line-margins-set-p nil
 
 ;; Default line-highlighter pen
@@ -143,13 +144,22 @@ marginal area does not exist, its width will be returned 
as nil."
   (cl-destructuring-bind (left-width . right-width) (window-margins)
 (unless org-remark-line-margins-set-p
   (setq org-remark-line-margins-original (window-margins))
-  (setq org-remark-line-margins-set-p t))
+  (setq org-remark-line-margins-set-p t)
+  (setq org-remark-line-left-margin-width
+(if (numberp org-remark-line-minimum-margin-width)
+   org-remark-line-minimum-margin-width
+ (car org-remark-line-minimum-margin-width)))
+  (setq org-remark-line-right-margin-width
+(+ (if (numberp org-remark-line-minimum-margin-width)
+   org-remark-line-minimum-margin-width
+ (cdr org-remark-line-minimum-margin-width))
+   org-remark-line-margin-padding)))
 (if (or (eq left-width nil) (< left-width
-   org-remark-line-minimum-margin-width))
-(setq left-margin-width org-remark-line-minimum-margin-width)
+   org-remark-line-left-margin-width))
+(setq left-margin-width org-remark-line-left-margin-width)
   (setq left-margin-width left-width))
 (if (or (eq right-width nil) (< right-width
-   org-remark-line-minimum-margin-width))
+org-remark-line-right-margin-width))
 (setq right-margin-width org-remark-line-right-margin-width)
   (setq right-margin-width right-width))
 ;; For `set-window-margins' window

[elpa] externals/org-remark 9f86daaee6 43/75: feat(line):Redraw can now change the margin side

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 9f86daaee618cdcd60fd0c551cc9bae533a6baac
Author: Noboru Ota 
Commit: Noboru Ota 

feat(line):Redraw can now change the margin side
---
 org-remark-line.el | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index afccf09cab..59a32e3c61 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -196,6 +196,7 @@ by `overlays-in'."
 spacer-ov))
 
 (defun org-remark-line-highlights-redraw (&optional window)
+  "Redraw line-highlights to adjust the spaces/padding."
   (let ((window (or window (get-buffer-window
 (when (and (windowp window) (not (window-minibuffer-p window)))
   (org-with-wide-buffer
@@ -204,8 +205,12 @@ by `overlays-in'."
   org-remark-highlights)))
  (dolist (ov highlights)
(let* ((beg (overlay-start ov))
-  (spacer-ov (org-remark-line-make-spacer-overlay beg)))
- (push (copy-overlay ov) org-remark-highlights)
+  (spacer-ov (org-remark-line-make-spacer-overlay beg))
+  (copied-highlight (copy-overlay ov))
+  (display-props
+   (get-text-property 0 'display (overlay-get copied-highlight 
'before-string
+ (setf (car display-props) `(margin ,org-remark-line-margin-side))
+ (push copied-highlight org-remark-highlights)
  (copy-overlay spacer-ov)
  (delete-overlay ov)
  (org-remark-highlights-housekeep)



[elpa] externals/org-remark 335293a03e 41/75: style(line):Clean up comments

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 335293a03ec58e2a35d1980eae7921c74b5a5579
Author: Noboru Ota 
Commit: Noboru Ota 

style(line):Clean up comments
---
 org-remark-line.el | 1 -
 1 file changed, 1 deletion(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 8155454c48..fdb510e6a1 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -112,7 +112,6 @@ marginal area does not exist, its width will be returned as 
nil."
   (let ((window (or window (get-buffer-window
 (when (and (windowp window) (not (window-minibuffer-p window)))
   (cl-destructuring-bind (left-width . right-width) (window-margins)
-;; TODO make this part compatible with right margin
 (unless org-remark-line-margins-set-p
   (setq org-remark-line-margins-original (window-margins))
   (setq org-remark-line-margins-set-p t))



[elpa] externals/org-remark e77787ca5d 27/75: refactor:spacer

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit e77787ca5d510701a1551b2feb7cf4e42d01891a
Author: Noboru Ota 
Commit: Noboru Ota 

refactor:spacer
---
 org-remark-icon.el |   4 +-
 org-remark-line.el | 134 +++--
 org-remark.el  |  91 +++-
 3 files changed, 141 insertions(+), 88 deletions(-)

diff --git a/org-remark-icon.el b/org-remark-icon.el
index 46b8c5eea6..39f5ffa809 100644
--- a/org-remark-icon.el
+++ b/org-remark-icon.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 29 July 2023
-;; Last modified: 07 August 2023
+;; Last modified: 14 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -137,7 +137,7 @@ DEFAULT FACE must be a named face. It is optinal and can be 
nil.")
   "Add icons to OVERLAYS.
 Each overlay is a highlight."
   (dolist (ov overlays)
-  ;; icons added to line highlighters differently from normal ones.
+;; icons added to line highlighters differently from normal ones.
 (cl-flet ((add-icon-maybe (icon)
 (cl-destructuring-bind
 (icon-name pred default-face) icon
diff --git a/org-remark-line.el b/org-remark-line.el
index 383fca9c09..e1ec071c4e 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 10 August 2023
+;; Last modified: 14 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -45,6 +45,11 @@
 
 (defvar org-remark-line-ellipsis "…")
 
+(defvar org-remark-line-minimum-margin-width 3)
+
+(defvar org-remark-line-margin-padding 1
+  "Padding between the main text area the icon on the margin")
+
 (defvar-local org-remark-line-delayed-put-overlay-functions '()
   "List of lambda functions that add a highlight.
 We need to delay adding highlight overlays until window is
@@ -66,35 +71,38 @@ filefor the first time, the window has not been created 
before
 ;; line-highlight.
 (add-hook 'org-remark-find-dwim-functions
   #'org-remark-line-find 80 :local)
+;; olivetti sets DEPTH to t (=90). We need go lower priority than it
 (add-hook 'window-size-change-functions
- #'org-remark-line-set-window-margins nil :local)
+  #'org-remark-line-set-window-margins 95 :local)
+(setq left-margin-width org-remark-line-minimum-margin-width)
 ;;(org-remark-line-set-buffer-windows))
 )
 (remove-hook 'org-remark-find-dwim-functions #'org-remark-line-find :local)
 (remove-hook 'window-size-change-functions
  #'org-remark-line-set-window-margins :local)))
 
-(defun org-remark-line-set-buffer-windows ()
-  "
-Adapted from Olivetti mode"
-  (mapc #'org-remark-line-set-window-margins
-(get-buffer-window-list nil nil 'visible)))
-
-(defun org-remark-line-set-window-margins (window-or-frame)
+;; (defun org-remark-line-set-buffer-windows ()
+;;   "
+;; Adapted from Olivetti mode"
+;;   (mapc #'org-remark-line-set-window-margins
+;; (get-buffer-window-list nil nil 'visible)))
+(defun org-remark-line-set-window-margins (window)
   "Set the margins of current window that displays current buffer.
 Return a cons of the form (LEFT-WIDTH . RIGHT-WIDTH). If a
 marginal area does not exist, its width will be returned as nil."
-  (when (and (windowp window-or-frame) org-remark-line-mode)
+  (when (and (windowp window) org-remark-line-mode)
 ;;(message "size change used with a window argument")
-(when org-remark-line-delayed-put-overlay-functions
-  (dolist (fn (reverse org-remark-line-delayed-put-overlay-functions))
-(funcall fn))
-  (setq org-remark-line-delayed-put-overlay-functions nil))
+;; (when org-remark-line-delayed-put-overlay-functions
+;;   (dolist (fn (reverse org-remark-line-delayed-put-overlay-functions))
+;; (funcall fn))
+;;   (setq org-remark-line-delayed-put-overlay-functions nil))
 (cl-destructuring-bind (left-width . right-width) (window-margins)
-  (when (or (eq left-width nil) (< left-width 3))
-(setq left-margin-width 3)
+  (when (or (eq left-width nil) (< left-width
+   org-remark-line-minimum-margin-width))
+;; (setq left-margin-width org-remark-line-minimum-margin-width)
 (set-window-buffer (get-buffer-window) (current-buffer) 'keep-margins)
-(set-window-margins nil 3))
+(set-window-margins nil org-remark-line-minimum-margin-width))
+  (org-remark-highlights-load)
   (window-margins
 
 (defun org-remark-line-pos-bol (pos)
@@ -126,38 +134,76 @@ by `overlays-in'."
 (let ((bol (org-remark-line-pos-bol (point
   (list bol bol)))
 
-(cl-defme

[elpa] externals/org-remark updated (c33e2b7c77 -> 822e730fc8)

2023-10-06 Thread ELPA Syncer
elpasync pushed a change to branch externals/org-remark.

  from  c33e2b7c77 fix: compiler warning ‘org-remark-highlight-save’ is an 
obsolete...
   new  ded8fd initial prototype to explore what needs to change
   new  16958accc2 refactor: org-remark-mark
   new  6e3254d231 refactor: highlight headlne text
   new  447fc2beaf feat(line): highlight level headline text
   new  2bba54b535 fix: selecting wrong highlight when opening
   new  f679d00c0a refactor(line): loading and renaming the el file
   new  15150c8d40 feat(line): highlight a whole line
   new  a2311005ff fix(line): Ensure line hl ovs are always at bol
   new  ae376d860d refactor(line): method name change
   new  0f2bf566ee docs(info): source comments
   new  51c3d91585 refactor: create macro & menus
   new  6b4c196f86 feat: icon for line  highlight
   new  4ad2be30e4 fix(icon): the line icon not displaying
   new  89ee82935c fix: window margins do not persist
   new  f7031507db fix: defgeneric seems needed anyway..
   new  56557549ec refactor: Create macro to add function-put
   new  d5a3fcf612 refactor(create): quoting org-remark-type value
   new  ca648a1876 fix: change now can only select pens from the same type
   new  da73102a2d fix(line): When source is narrowed line-hl moves the 
wrong place
   new  79ad1baf7e refactor(line): no need for text-scale-mode-hook
   new  94ba0ecea0 fix(line): When source narrowed, existing line-hls move 
wrongly
   new  f37ddb69e7 fix(change): force trigger of notes buffer face
   new  cbc26304a8 refactor: add org-remark-default-features to 
automatically load
   new  8f9875f714 doc(line): Remove unused source comments (old code)
   new  e7aae5e4f4 doc: docstring for org-remark-highlight-mark-overlay
   new  3a9884e5df fix(line): When buffer is first created, window may not 
be created
   new  e77787ca5d refactor:spacer
   new  c7dc42bf30 fix: margin width
   new  d606d80a47 refactor: move highlights-delay-load to org-remark.el
   new  199702118a fix(line): Disable line-mode should disable the margins
   new  2f7d16ef4e refactor(line): remove unused functions, source comments
   new  3f5ea6777b fix(line): window selection is utterly confused
   new  3997025261 feat: icons for line-hl get their default face when 
notes exit
   new  e136189485 fix(line): window margin wrongly sets minibuffer's margin
   new  6dbf1cca4a fix(line): svg icon does not get the face correctly
   new  063f68e5a4 feat(line): right margin
   new  680651e339 refactor(icon): remove unnecessary source comment (old 
func)
   new  e02519836d fix(line): spacer movement
   new  0829e27379 fix(line): redraw instead of reload when window size 
changes
   new  4156342f88 refactor(line): make spacer overlay
   new  335293a03e style(line):Clean up comments
   new  533167091a fix(line):Right margin expands every 
window-size-change-func call
   new  9f86daaee6 feat(line):Redraw can now change the margin side
   new  175ba6d06e fix(line):when line-icon is an image, it fails to carry 
face
   new  c1c120f0c9 feat(line):defcustom org-remark-line-minimum-margin-width
   new  1df1fcb331 feat(line): define various customizing options
   new  8020d33380 docs: organize customizing groups
   new  6364474a73 Merge branch 'main' into dev/line-highlight
   new  193fe279ea feat(line):add line-number as a property to the 
highlight headline
   new  af03b2103e docs: Docstring for org-remark-default-features, etc.
   new  2b68d4748c Merge branch 'main' into dev/line-highlight
   new  ace9570070 refactor: simply org-remark-open
   new  ceef4b537c Merge branch 'main' into dev/line-highlight
   new  8c3238902b docs: keybinding sync with README
   new  c506e61017 fix(line): `org-remark-mark-line` does not autoload
   new  18f39bf119 Merge branch 'main' into dev/1.3.0
   new  bdd54cf237 Merge branch 'main' into dev/1.3.0
   new  3ea41202e6 feat: #21 Delete notes when highlight removed if the 
notes are empty
   new  a879b66013 docs: docstring for new auto-delete feature
   new  e904b53b2c refactor: silence compilier warning
   new  833d909264 docs: NEWS for the current development branch (WIP)
   new  f28dc7e7f5 docs: update docstrings for remove and delete
   new  2fd1025490 fix: Regression. Delete only removes.
   new  32b8699b12 doc: docstring for `org-remark-notes-auto-delete`
   new  03828f44e4 docs: README to include use-package setup example
   new  16622af0c0 fix: add org-remark-find-overlay-at-point to local hook
   new  52cf20297b feat: #72 org-remark-open can open the marginal notes 
file
   new  4e57d99e2d fix: use space display specification instead of a string 
of \s
   new  73766a03f0 docs: update NEWS
   new  d72fa0ef45 fix: regression next/prev-view opens the notes when 

[elpa] externals/org-remark 73766a03f0 69/75: docs: update NEWS

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 73766a03f0c26d5f843cb2f7c8bd591b29a62584
Author: Noboru Ota 
Commit: Noboru Ota 

docs: update NEWS
---
 NEWS | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/NEWS b/NEWS
index c6aab5cb7a..f2dfedbc74 100644
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,13 @@ Under current development
 
  Features:
 
-   - (#21) Option to delete notes when highlight removed if the notes are empty
+   - Ability to highlight a whole line and show a mark on the margin (#71)
 
-   - (#71) Ability to highlight a whole line and show a mark on the margin
+   - Option to delete the whole notes entry when highlight is removed if
+ there is no notes body text (#21)
+
+   - `org-remark-open` to open the associated marginal notes file if
+ cursor outside a highlight (#72)
 
 Version 1.2.1 - 2023-08-20
 



[elpa] externals/org-remark a879b66013 59/75: docs: docstring for new auto-delete feature

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit a879b6601326164aa4379a0aa40bddf3d237c1eb
Author: Noboru Ota 
Commit: Noboru Ota 

docs: docstring for new auto-delete feature

`org-remark-remove` and `org-remark-delete` now have new functionality.
No breaking change to existing behavior or function's signature (except
an additional optional argument to the latter function).

Housekeeping can now use the new user option
`org-remark-notes-auto-delete` to automatically delete entries for which
there are no notes. This way, the marginal notes file can be kept with
less clutter (with less "orphan" headlines).
---
 org-remark.el | 124 --
 1 file changed, 77 insertions(+), 47 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 676b44c07e..a333651536 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -95,14 +95,19 @@ buffer with this name."
   :type 'string)
 
 (defcustom org-remark-notes-auto-delete nil
-  "How to remove notes entries when user removes them.
+  "How Org-remark removes entries when user deletes highlights.
 This controls the behavior of Org-remark when the user deletes
 the highlight in the source (for example, when deleting a whole
 line including a highlight). The default behavior is to remove
-only the properties in the notes buffer and keeping the
-entry (with using `org-remark-remove'). You can change the
-behavior to delete the entire entry when it contains no
-annotation without being asked with a prompt."
+only the properties in the notes buffer and keeping the headline
+title and any notes in the entry (with using
+`org-remark-remove').
+
+Set this customizing variable to \\=':auto-delete\\=' and you can
+change the behavior to delete the entire entry when it contains
+no notes without a prompt asking for confirmation. This is the
+same behavior as passing a single universal
+argument (\\[universal-argument]) to `org-remark-delete'."
   :type '(radio
   (const :tag "Keep entries (default)" nil)
   (const :tag "Delete entries automatically when no notes exist"
@@ -675,25 +680,43 @@ from."
 
 (defun org-remark-remove (point &optional delete)
   "Remove the highlight at POINT.
-It will remove the highlight and the properties from the
-marginalia, but will keep the headline and annotations.  This is
-to ensure to keep any notes you might have written intact.
+By default, it will remove the highlight and the properties from the marginal
+notes buffer, but will keep the headline title and any notes in
+it. This is to ensure to keep any notes you might have written
+intact.
 
-You can let this command DELETE the entire heading subtree for
-the highlight, along with the annotations you have written, by
-passing a universal argument with \\[universal-argument].
+Optionally, you can let this command delete the entire heading
+subtree for the highlight, along with the annotations you have
+written, by passing universal argument in DELETE.
 
-TODO Update with the new (16) and (4)
+This command differentiates a single or double universal
+arguments as follows:
+
+- \\[universal-argument]
+
+  Look for notes in the entry. If there is any, ask the user for
+  confirmation. Delete the entire entry only when the user
+  confirms with \\='y\\='. When \\='n\\=', remove the entry's
+  properties only. This is the same behavior as
+  function `org-remark-delete'.
+
+- \\[universal-argument] \\[universal-argument]
+
+  This is an automatic deletion. Delete the entry without asking
+  the user when there is no notes in the entry. If there are any
+  notes, remove the entry's properties only. This is the same
+  behavior as passing a single universal-argument to
+  function `org-remark-delete'.
 
 If you have done so by error, you could still `undo' it in the
-marginal notes buffer, but not in the current buffer as adding
+marginal notes buffer, and not in the current buffer as adding
 and removing overlays are not part of the undo tree."
   (interactive "d\nP")
   (let* ((ov (org-remark-find-dwim point))
  (id (overlay-get ov 'org-remark-id)))
 (when (and ov id)
-  ;; Remove the highlight overlay and id Where there is more than one,
-  ;; remove only one.  It should be last-in-first-out in general but
+  ;; Remove the highlight overlay and id. If there is more than one,
+  ;; remove only one. It should be last-in-first-out in general but
   ;; overlays functions don't guarantee it (when delete
   ;; (org-remark-open point :view-only))
   (org-remark-highlight-clear ov)
@@ -707,20 +730,29 @@ and removing overlays are not part of the undo tree."
   "Delete the highlight at POINT and marginal notes for it.
 
 This function will prompt for confirmation if there is any notes
-present in the marginal notes buffer.  When the marginal notes
-buffer is not displayed in the current frame, it will be
+present in the highlight's entry in the marginal notes buffer.
+When it is 

[elpa] externals/org-remark 03828f44e4 65/75: docs: README to include use-package setup example

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 03828f44e4512eec5aa0f1b15ad0a40809744209
Author: Noboru Ota 
Commit: Noboru Ota 

docs: README to include use-package setup example
---
 README-elpa | 28 
 README.org  | 26 ++
 2 files changed, 54 insertions(+)

diff --git a/README-elpa b/README-elpa
index eca34e0481..9a639b7ec5 100644
--- a/README-elpa
+++ b/README-elpa
@@ -146,6 +146,34 @@ _
   |   (define-key org-remark-mode-map (kbd "C-c n d") #'org-remark-delete))
   `
 
+  Alternatively, you can use `use-package' to set up Org-remark. The
+  example provided below should be equivalent to the setup described
+  above.
+
+  ,
+  | (use-package org-remark
+  |   :bind (;; :bind keyword also implicitly defers org-remark itself.
+  |  ;; Keybindings before :map is set for global-map.
+  |  ("C-c n m" . org-remark-mark)
+  |  :map org-remark-mode-map
+  |  ("C-c n o" . org-remark-open)
+  |  ("C-c n ]" . org-remark-view-next)
+  |  ("C-c n [" . org-remark-view-prev)
+  |  ("C-c n r" . org-remark-remove)
+  |  ("C-c n d" . org-remark-delete))
+  |   ;; Alternative way to enable `org-remark-global-tracking-mode' in
+  |   ;; `after-init-hook'.
+  |   ;; :hook (after-init . org-remark-global-tracking-mode)
+  |   :init
+  |   ;; It is recommended that `org-remark-global-tracking-mode' be
+  |   ;; enabled when Emacs initializes. Alternatively, you can put it to
+  |   ;; `:after-init-hook' to load it after Emacs has been initialized.
+  |   (org-remark-global-tracking-mode +1)
+  |   (use-package org-remark-info :after info :config (org-remark-info-mode 
+1))
+  |   (use-package org-remark-eww  :after eww  :config (org-remark-eww-mode 
+1))
+  |   (use-package org-remark-nov  :after nov  :config (org-remark-nov-mode 
+1)))
+  `
+
 
 [GNU-ELPA] 
 
diff --git a/README.org b/README.org
index 7a005d9409..c4d05de3e2 100644
--- a/README.org
+++ b/README.org
@@ -103,6 +103,32 @@ Below are example keybindings you might like to consider:
 (define-key org-remark-mode-map (kbd "C-c n d") #'org-remark-delete))
 #+end_src
 
+Alternatively, you can use ~use-package~ to set up Org-remark. The example 
provided below should be equivalent to the setup described above.
+
+#+begin_src emacs-lisp
+  (use-package org-remark
+:bind (;; :bind keyword also implicitly defers org-remark itself.
+   ;; Keybindings before :map is set for global-map.
+   ("C-c n m" . org-remark-mark)
+   :map org-remark-mode-map
+   ("C-c n o" . org-remark-open)
+   ("C-c n ]" . org-remark-view-next)
+   ("C-c n [" . org-remark-view-prev)
+   ("C-c n r" . org-remark-remove)
+   ("C-c n d" . org-remark-delete))
+;; Alternative way to enable `org-remark-global-tracking-mode' in
+;; `after-init-hook'.
+;; :hook (after-init . org-remark-global-tracking-mode)
+:init
+;; It is recommended that `org-remark-global-tracking-mode' be
+;; enabled when Emacs initializes. Alternatively, you can put it to
+;; `:after-init-hook' to load it after Emacs has been initialized.
+(org-remark-global-tracking-mode +1)
+(use-package org-remark-info :after info :config (org-remark-info-mode +1))
+(use-package org-remark-eww  :after eww  :config (org-remark-eww-mode +1))
+(use-package org-remark-nov  :after nov  :config (org-remark-nov-mode +1)))
+#+end_src
+
 * Contributing and Feedback
 
 Create issues, discussion, and/or pull requests in the GitHub repository. All 
welcome.



[elpa] externals/org-remark bdd54cf237 57/75: Merge branch 'main' into dev/1.3.0

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit bdd54cf2370246c3cbeebd521192bc22cde15581
Merge: 18f39bf119 248ec91193
Author: Noboru Ota 
Commit: Noboru Ota 

Merge branch 'main' into dev/1.3.0
---
 README.org | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/README.org b/README.org
index f007d8cb39..7a005d9409 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,9 @@
 #+options: toc:t creator:nil author:nil broken-links:t
 
 #+html: https://www.gnu.org/software/emacs/";>https://img.shields.io/static/v1?logo=gnuemacs&logoColor=fafafa&label=Made%20for&message=GNU%20Emacs&color=7F5AB6&style=flat"/>
-#+html: https://img.shields.io/badge/License-GPLv3-blue.svg";>
+#+html: https://github.com/nobiot/org-remark/blob/main/LICENSE";>https://img.shields.io/badge/License-GPLv3-blue.svg";>
+#+html: http://elpa.gnu.org/packages/org-remark.html";>https://elpa.gnu.org/packages/org-remark.svg"/>
+#+html: http://elpa.gnu.org/devel/org-remark.html";>https://elpa.gnu.org/devel/org-remark.svg"/>
 
 * Breaking Changes :noexport:
 



[elpa] externals/org-remark 6e3254d231 03/75: refactor: highlight headlne text

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 6e3254d231f63d9cca8c0a86d5f47233f98e27eb
Author: Noboru Ota 
Commit: Noboru Ota 

refactor: highlight headlne text
---
 org-remark-line-highlighter.el | 117 +
 org-remark.el  |  19 ---
 2 files changed, 48 insertions(+), 88 deletions(-)

diff --git a/org-remark-line-highlighter.el b/org-remark-line-highlighter.el
index 1b2fe949ea..25520d04ae 100644
--- a/org-remark-line-highlighter.el
+++ b/org-remark-line-highlighter.el
@@ -30,6 +30,17 @@
 
 ;;(require 'org-remark)
 
+(defface org-remark-line-highlighter
+  'class color) (min-colors 88) (background light))
+ :foreground "#e2d980")
+(((class color) (min-colors 88) (background dark))
+ :foreground "#e2d980")
+(t
+ :inherit highlight))
+  "Face for the default line highlighter pen.")
+
+(defvar org-remark-line-icon "*")
+
 (defun org-remark-line-pos-bol (pos)
   "Return the beginning of the line position for POS."
   (save-excursion
@@ -57,28 +68,6 @@ by `overlays-in'."
   #'(lambda (&rest args)
   (set-window-margins nil 2)))
 
-(defun test/overlay-put-line-highlight (ov)
-  (let* ((left-margin (or (car (window-margins))
-  ;; when nil = no margin, set to 1
-  (progn (set-window-margins nil 2)
- 2)))
- (spaces (- left-margin 2))
- (string (with-temp-buffer (insert-char ?\s spaces)
-   (insert "•")
-   (buffer-string
-(overlay-put ov 'before-string (propertize "! " 'display
-   `((margin left-margin)
- ,(propertize string 'face 
'modus-themes-diff-refine-removed
-;;(overlay-put ov 'category "org-remark-line") ;; need to fix property add 
logic
-ov))
-
-(defun org-remark-line-highlight-modified (ov after-p beg end &optional length)
-  "This is good! Move the overlay to follow the point when ENTER in the line."
-  (when after-p
-(save-excursion (goto-char beg)
-(when (looking-at "\n")
-  (move-overlay ov (1+ beg) (1+ beg))
-
 ;;;###autoload
 (defun org-remark-mark-line (beg end &optional id mode)
   (interactive (org-remark-beg-end 'line))
@@ -90,72 +79,38 @@ by `overlays-in'."
  ;; to call this correct function
  (list 'org-remark-type 'line)))
 
-;; (add-hook 'org-remark-beg-end-dwim-functions #'org-remark-line-beg-end)
-;; This is not a good solution. The normal highlight gets zero length with 
this.
-;; It needs to be "type" differentiated by a defmethod, etc.
-
-;; (remove-hook 'org-remark-beg-end-dwim-functions #'org-remark-line-beg-end)
-
-;; (defun org-remark-line-beg-end ()
-;;   "Return a list of beg and end both being the bol."
-;;   (let ((bol (org-remark-line-pos-bol (point
-;; (list bol bol)))
-
 (cl-defmethod org-remark-beg-end ((org-remark-type (eql 'line)))
 (let ((bol (org-remark-line-pos-bol (point
   (list bol bol)))
 
 (cl-defmethod org-remark-highlight-mark-overlay (ov face (org-remark-type (eql 
'line)))
-  (test/overlay-put-line-highlight ov) ;; LINE
+  (org-remark-line-highlight-overlay-put ov face) ;; LINE
   (overlay-put ov 'insert-in-front-hooks (list 
'org-remark-line-highlight-modified)))
 
-;; (defun org-remark-line-highlight-mark
-;; (beg end &optional id mode label face properties)
-;;   "Apply the FACE to the whole line that contains BEG."
-;;   ;; Ensure to turn on the local minor mode
-;;   (unless org-remark-mode (org-remark-mode +1))
-;;   ;; When highlights are toggled hidden, only the new one gets highlighted 
in
-;;   ;; the wrong toggle state.
-;;   (when org-remark-highlights-hidden (org-remark-highlights-show))
-;;   (let ((ov (make-overlay beg end nil :front-advance))
-;; ;; UUID is too long; does not have to be the full length
-;; (id (if id id (substring (org-id-uuid) 0 8)))
-;; (filename (org-remark-source-find-file-name)))
-;; (if (not filename)
-;; (message (format "org-remark: Highlights not saved.\
-;;  This buffer (%s) is not supported" (symbol-name major-mode)))
-;;   (org-with-wide-buffer
-;;(org-remark-highlight-mark-overlay ov face 'line)
-;;(while properties
-;;  (let ((prop (pop properties))
-;;(val (pop properties)))
-;;(overlay-put ov prop val)))
-;;(when label (overlay-put ov 'org-remark-label label))
-;;(overlay-put ov 'org-remark-id id)
-;;;; Keep track of the overlay in a local variable. It's a list that is
-;;;; guaranteed to contain only org-remark overlays as opposed to the 
one
-;;;; returned by `overlay-lists' that lists all overlays.
-;;(push ov org-remark-highlights)
-;;;; for mode, nil and :change result in sa

[elpa] externals/org-remark 2b68d4748c 51/75: Merge branch 'main' into dev/line-highlight

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 2b68d4748c74085550cd41cfe4a3297254436bbf
Merge: af03b2103e 91a56a77d1
Author: Noboru Ota 
Commit: Noboru Ota 

Merge branch 'main' into dev/line-highlight
---
 org-remark.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org-remark.el b/org-remark.el
index a272214ba8..57515240e0 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1483,7 +1483,7 @@ highlight is a property list in the following properties:
  (org-show-children)
  ;; Headline levels now can be dynamically changed via
  ;; highlight-constructors.
- (while (not (org-next-visible-heading 1))
+ (while (org-at-heading-p (org-next-visible-heading 1))
(let ((id (org-entry-get (point) org-remark-prop-id))
  (beg (org-entry-get (point)
  org-remark-prop-source-beg))



[elpa] externals/org-remark ceef4b537c 53/75: Merge branch 'main' into dev/line-highlight

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit ceef4b537cafd9b52725e2fce0e94b04bf869bf7
Merge: ace9570070 6b2bbe4edf
Author: Noboru Ota 
Commit: Noboru Ota 

Merge branch 'main' into dev/line-highlight
---
 NEWS |  18 ++
 README-elpa  |  41 ---
 README.org   |  34 ---
 docs/org-remark.org  |  25 +-
 org-remark.el|   2 +-
 resources/images/2023-08-20-epub-prince-icon.png | Bin 0 -> 151369 bytes
 6 files changed, 65 insertions(+), 55 deletions(-)

diff --git a/NEWS b/NEWS
index 613b051d8c..1dd79b04fd 100644
--- a/NEWS
+++ b/NEWS
@@ -1,13 +1,13 @@
-Current development version
+Version 1.2.0 - 2023-08-20
 
   - feat(info): Org-remark supports Info
 
-  Advice has been implemented. It is added and removed by
-  `org-remark-info-mode`.
+  + Advice has been implemented. It is added and removed by
+`org-remark-info-mode`.
 
-  No suitable hook is avaialble to trigger a function after the Info 
node
-  is rendered. This is necessary as Info renders a new node in the same
-  buffer (in the same way as Nov.el does).
+  + No suitable hook is avaialble to trigger a function after the Info 
node
+is rendered. This is necessary as Info renders a new node in the 
same
+buffer (in the same way as Nov.el does).
 
   - feat: icons for additional information for highlights
 
@@ -48,6 +48,10 @@ Current development version
   - feat: org-remark-highlights-after-load-functions
   Abnormal hook
 
+  Fixes:
+
+  - fix: org 9.6.7 breaks org-remark-highlights-get (#70)
+
   - fix: Make load process robust
 
  + When error occurs during the load process, instead of
@@ -76,7 +80,7 @@ Current development version
   No functional change. Changed the default color of the
   highlighter to be more visible in the dark theme.
 
-Version 1.1.0
+Version 1.1.0 - 2023-05-20
 
   Features:
 
diff --git a/README-elpa b/README-elpa
index 385e5d8853..0e1b7099a2 100644
--- a/README-elpa
+++ b/README-elpa
@@ -21,8 +21,8 @@ _
 1 Introduction
 ==
 
-  Org-remark lets you highlight and annotate text files, websites, and
-  EPUB books with using Org mode [1].
+  Org-remark lets you highlight and annotate text files, websites, EPUB
+  books and Info documentation with using Org mode.
 
   A user manual is available [online] or Emacs in-system as an Info node
   `(org-remark)': (`C-h i' and find the `Org-remark' node).
@@ -47,7 +47,7 @@ _
 
 [online] 
 
-[online] 
+[online] 
 
 [online] 
 
@@ -72,13 +72,12 @@ _
 
 + Websites when you use EWW to browse them
 
-+ EPUB books with [nov.el] (latest [GNU-devel ELPA] and is planned
-  to be part of v1.2.0.)
++ EPUB books with [nov.el]
 
++ Info documentation
 
-[nov.el] 
 
-[GNU-devel ELPA] 
+[nov.el] 
 
 
 3 Installation
@@ -108,6 +107,14 @@ _
   | ;; Optional if you would like to highlight websites via eww-mode
   | (with-eval-after-load 'eww
   |   (org-remark-eww-mode +1))
+  | 
+  | ;; Optional if you would like to highlight EPUB books via nov.el
+  | (with-eval-after-load 'nov
+  |   (org-remark-nov-mode +1))
+  | 
+  | ;; Optional if you would like to highlight Info documentation via Info-mode
+  | (with-eval-after-load 'info
+  |   (org-remark-info-mode +1))
   `
 
   Unless you explicitly load `org' during Emacs initialization, I
@@ -130,7 +137,8 @@ _
   |   (define-key org-remark-mode-map (kbd "C-c n o") #'org-remark-open)
   |   (define-key org-remark-mode-map (kbd "C-c n ]") #'org-remark-view-next)
   |   (define-key org-remark-mode-map (kbd "C-c n [") #'org-remark-view-prev)
-  |   (define-key org-remark-mode-map (kbd "C-c n r") #'org-remark-remove))
+  |   (define-key org-remark-mode-map (kbd "C-c n r") #'org-remark-remove)
+  |   (define-key org-remark-mode-map (kbd "C-c n d") #'org-remark-delete))
   `
 
 
@@ -165,6 +173,10 @@ _
   New features
 
 
+
+EPUB books (nov.el) support would not have been possible without
+collaboration with @sati-bodhi
+
 `echo-text' update from the marginal notes to the source buffer
 by marty hiatt (@mooseyboots)
 
@@ -172,10 +184,10 @@ _
 (@vedang)
 
   Bug fixes
-  Nan Jun Jie (@nanjj), @sgati-bodhi
+  @alan-w-255, Nan Jun Jie (@nanjj), @sgati-bodhi
 
   Documentation (including README, NEWS, CHANGELOG)
-  @randomwangran

[elpa] externals/org-remark da73102a2d 19/75: fix(line): When source is narrowed line-hl moves the wrong place

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit da73102a2d3da299ae26ed37e280ece1ac7fd82c
Author: Noboru Ota 
Commit: Noboru Ota 

fix(line): When source is narrowed line-hl moves the wrong place
---
 org-remark-line.el | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/org-remark-line.el b/org-remark-line.el
index 9e3ad39c51..7692829c80 100644
--- a/org-remark-line.el
+++ b/org-remark-line.el
@@ -5,7 +5,7 @@
 ;; Author: Noboru Ota 
 ;; URL: https://github.com/nobiot/org-remark
 ;; Created: 01 August 2023
-;; Last modified: 05 August 2023
+;; Last modified: 06 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp
 
@@ -184,10 +184,11 @@ end of overlay being identical."
   ;; always follow the point, keeping the original place unless you
   ;; directly change the notes. That's not really an intutive behaviour,
   ;; though in some cases, it imay be useful.
-  (let* ((ov-start (overlay-start ov))
- (ov-line-bol (org-remark-line-pos-bol ov-start)))
-(unless (= ov-start ov-line-bol)
-  (move-overlay ov ov-line-bol ov-line-bol
+  (org-with-wide-buffer
+   (let* ((ov-start (overlay-start ov))
+  (ov-line-bol (org-remark-line-pos-bol ov-start)))
+ (unless (= ov-start ov-line-bol)
+   (move-overlay ov ov-line-bol ov-line-bol)
 
 (cl-defmethod org-remark-icon-overlay-put (ov icon-string (org-remark-type 
(eql 'line)))
   ;; If the icon-string has a display properties, assume it is an icon image



[elpa] externals/org-remark d5a3fcf612 17/75: refactor(create): quoting org-remark-type value

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit d5a3fcf61250bd3c827a02af75ec6935247f8038
Author: Noboru Ota 
Commit: Noboru Ota 

refactor(create): quoting org-remark-type value
---
 org-remark.el | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index cb2e997f02..9e8cb1d8b4 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -220,7 +220,7 @@ property names with \"org-remark-\" or use \"CATEGORY\"."
   (if (or (not label) (stringp label)
   (user-error "org-remark-create: Label is missing or not string"))
   (let ((org-remark-type
- (symbol-name (plist-get (eval properties) 'org-remark-type
+ `(quote ,(plist-get (eval properties) 'org-remark-type
 `(progn
;; Define custom pen function
(defun ,(intern (format "org-remark-mark-%s" label))
@@ -248,7 +248,7 @@ highlight.  In this case, no new ID gets generated.
 When the pen itself defines the help-echo property, it will have
 the priority over the excerpt of the marginal notes."
   (or face "`org-remark-highlighter'") properties)
- (interactive (org-remark-beg-end (intern ,org-remark-type)))
+ (interactive (org-remark-beg-end ,org-remark-type))
  (org-remark-highlight-mark beg end id mode ,label ,face 
,properties))
 
;; Register to `org-remark-available-pens'
@@ -260,7 +260,7 @@ the priority over the excerpt of the marginal notes."
(when 'org-remark-type (function-put
(intern (format "org-remark-mark-%s" 
,label))
'org-remark-type
-   (intern ,org-remark-type)))
+   ,org-remark-type))
 
;; Add the custom pen function to the minor-mode menu
(define-key-after org-remark-pen-map
@@ -275,7 +275,7 @@ the priority over the excerpt of the marginal notes."
(interactive)
(org-remark-change
 #',(intern (format "org-remark-mark-%s" label
- :enable (org-remark-pen-same-type-at-point-p (intern 
,org-remark-type
+ :enable (org-remark-pen-same-type-at-point-p 
,org-remark-type)))
 
 
  Minor mode



[elpa] externals/org-remark 6364474a73 48/75: Merge branch 'main' into dev/line-highlight

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 6364474a73a9262bbea9987add3787082838b7a6
Merge: 8020d33380 5cd59e70ef
Author: Noboru Ota 
Commit: Noboru Ota 

Merge branch 'main' into dev/line-highlight
---
 docs/resources/manual.css | 100 +++---
 docs/resources/reset.css  | 114 ++
 docs/resources/style.css  | 175 ++
 3 files changed, 313 insertions(+), 76 deletions(-)

diff --git a/docs/resources/manual.css b/docs/resources/manual.css
index 88e7520229..944336e8aa 100644
--- a/docs/resources/manual.css
+++ b/docs/resources/manual.css
@@ -1,76 +1,24 @@
-/** Based on Org-roam's css
-https://github.com/org-roam/org-roam/blob/master/doc/assets/page.css
- **/
-:root {
-  --border: #526980;
-  --code: #007;
-}
-
-body {
-margin: 5ex auto;
-max-width: 850px;
-line-height: 1.5;
-font-family: sans-serif;
-font-size: 18px;
-}
-
-h1, h2, h3 {
-font-weight: normal;
-}
-
-.settitle {
-display: none;
-}
-
-pre, code {
-font-family: x, monospace;
-}
-
-pre {
-padding: 1ex;
-background: #eee;
-border: solid 1px #ddd;
-min-width: 0;
-font-size: 80%;
-overflow: auto;
-}
-
-code {
-color: var(--code);
-}
-
-img {
-max-width: 100%;
-}
-
-table {
-  border-collapse: collapse;
-  width: 100%;
-}
-
-pre.menu-comment {
-  background: none;
-  border: none;
-  font-family: sans-serif;
-  padding: 0;
-  margin: 0;
-  font-size: 100%;
-}
-
-thead {
-  border-bottom: 1px solid var(--border);
-}
-
-tfoot {
-  border-top: 1px solid var(--border);
-}
-
-blockquote {
-  margin-left: 1rem;
-  font-style: italic;
-  font-family: serif;
-  border-left: 3px solid;
-  border-left-color: currentcolor;
-  border-color: var(--text-color);
-  padding-left: 1em;
-}
+/* Style-sheet to use for Emacs manuals  */
+
+/* Copyright (C) 2013-2022 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without any warranty.
+*/
+
+@import url('style.css');
+
+/* makeinfo convert @deffn and similar functions to something inside
+   .  style.css uses italic for blockquote.  This looks poor
+   in the Emacs manuals, which make extensive use of @defun (etc).
+   In particular, references to function arguments appear as 
+   inside .  Since  is also italic, it makes it
+   impossible to distinguish variables.  We could change  to
+   e.g. bold-italic, or normal, or a different color, but that does
+   not look as good IMO.  So we just override blockquote to be non-italic.
+   */
+blockquote { font-style: normal; }
+
+var { font-style: italic; }
diff --git a/docs/resources/reset.css b/docs/resources/reset.css
new file mode 100644
index 00..9a6c3065f8
--- /dev/null
+++ b/docs/resources/reset.css
@@ -0,0 +1,114 @@
+/*
+Software License Agreement (BSD License)
+
+Copyright (c) 2006, Yahoo! Inc.
+All rights reserved.
+
+Redistribution and use of this software in source and
+binary forms, with or without modification, arepermitted
+provided that the following conditions are met:
+
+* Redistributions of source code must retain the above
+copyright notice, this list of conditions and the
+following disclaimer.
+
+* Redistributions in binary form must reproduce the above
+copyright notice, this list of conditions and the
+following disclaimer in the documentation and/or other
+materials provided with the distribution.
+
+* Neither the name of Yahoo! Inc. nor the names of its
+contributors may be used to endorse or promote products
+derived from this software without specific prior
+written permission of Yahoo! Inc.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+*/
+
+html {
+color: #000;
+background: #FFF;
+}
+
+body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4,
+h5, h6, pre, code, form, fieldset, legend, input,
+button, textarea, p, blockquote, th, td {
+margin: 0;
+padding: 0;
+}
+
+table {
+border-collapse: collapse;
+border-spacing: 0;
+}
+
+fieldset, img {
+border: 0;
+}
+
+address, caption, cite, code, dfn, em, strong,
+th, var, optgroup {
+font-style: inherit;
+font-weight: inher

[elpa] externals/org-remark 8c3238902b 54/75: docs: keybinding sync with README

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 8c3238902b3237349063e2984af13619a4e64386
Author: Noboru Ota 
Commit: Noboru Ota 

docs: keybinding sync with README
---
 docs/org-remark.org | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/org-remark.org b/docs/org-remark.org
index 956bc0a494..7c8bb15f90 100644
--- a/docs/org-remark.org
+++ b/docs/org-remark.org
@@ -90,7 +90,8 @@ Below are example keybindings you might like to consider:
 (define-key org-remark-mode-map (kbd "C-c n o") #'org-remark-open)
 (define-key org-remark-mode-map (kbd "C-c n ]") #'org-remark-view-next)
 (define-key org-remark-mode-map (kbd "C-c n [") #'org-remark-view-prev)
-(define-key org-remark-mode-map (kbd "C-c n r") #'org-remark-remove))
+(define-key org-remark-mode-map (kbd "C-c n r") #'org-remark-remove)
+(define-key org-remark-mode-map (kbd "C-c n d") #'org-remark-delete))
 #+end_src
 
 * Getting Started



[elpa] externals/org-remark 3ea41202e6 58/75: feat: #21 Delete notes when highlight removed if the notes are empty

2023-10-06 Thread ELPA Syncer
branch: externals/org-remark
commit 3ea41202e6ba7bcae28d16adf38746ee3708842a
Author: Noboru Ota 
Commit: Noboru Ota 

feat: #21 Delete notes when highlight removed if the notes are empty
---
 org-remark.el | 135 +-
 1 file changed, 96 insertions(+), 39 deletions(-)

diff --git a/org-remark.el b/org-remark.el
index 6a1233addc..676b44c07e 100644
--- a/org-remark.el
+++ b/org-remark.el
@@ -1,4 +1,4 @@
-;;; org-remark.el --- Highlight & annotate any text files -*- lexical-binding: 
t; -*-
+;;; org-remark.el --- Highlight & annotate text, Info, EPUB, EWW -*- 
lexical-binding: t; -*-
 
 ;; Copyright (C) 2020-2023 Free Software Foundation, Inc.
 
@@ -6,7 +6,7 @@
 ;; URL: https://github.com/nobiot/org-remark
 ;; Version: 1.2.1
 ;; Created: 22 December 2020
-;; Last modified: 20 August 2023
+;; Last modified: 21 August 2023
 ;; Package-Requires: ((emacs "27.1") (org "9.4"))
 ;; Keywords: org-mode, annotation, note-taking, marginal-notes, wp,
 
@@ -94,6 +94,19 @@ detail and expected elements of the list."
 buffer with this name."
   :type 'string)
 
+(defcustom org-remark-notes-auto-delete nil
+  "How to remove notes entries when user removes them.
+This controls the behavior of Org-remark when the user deletes
+the highlight in the source (for example, when deleting a whole
+line including a highlight). The default behavior is to remove
+only the properties in the notes buffer and keeping the
+entry (with using `org-remark-remove'). You can change the
+behavior to delete the entire entry when it contains no
+annotation without being asked with a prompt."
+  :type '(radio
+  (const :tag "Keep entries (default)" nil)
+  (const :tag "Delete entries automatically when no notes exist"
+ :auto-delete)))
 (defvaralias
   'org-remark-source-path-function 'org-remark-source-file-name)
 
@@ -567,6 +580,7 @@ Also see the documentation of `org-remark-open'."
   (interactive "d")
   (org-remark-open point :view-only))
 
+
 (defun org-remark-next ()
   "Move to the next highlight, if any.
 If there is none below the point but there is a highlight in the
@@ -668,24 +682,28 @@ to ensure to keep any notes you might have written intact.
 You can let this command DELETE the entire heading subtree for
 the highlight, along with the annotations you have written, by
 passing a universal argument with \\[universal-argument].
+
+TODO Update with the new (16) and (4)
+
 If you have done so by error, you could still `undo' it in the
 marginal notes buffer, but not in the current buffer as adding
 and removing overlays are not part of the undo tree."
   (interactive "d\nP")
-  (when-let ((ov (org-remark-find-dwim point))
- (id (overlay-get ov 'org-remark-id)))
-;; Remove the highlight overlay and id Where there is more than one,
-;; remove only one.  It should be last-in-first-out in general but
-;; overlays functions don't guarantee it (when delete
-;; (org-remark-open point :view-only))
-(org-remark-highlight-clear ov)
-;; Update the notes file accordingly
-(org-remark-notes-remove id delete)
-(org-remark-highlights-housekeep)
-(org-remark-highlights-sort)
-t))
-
-(defun org-remark-delete (point)
+  (let* ((ov (org-remark-find-dwim point))
+ (id (overlay-get ov 'org-remark-id)))
+(when (and ov id)
+  ;; Remove the highlight overlay and id Where there is more than one,
+  ;; remove only one.  It should be last-in-first-out in general but
+  ;; overlays functions don't guarantee it (when delete
+  ;; (org-remark-open point :view-only))
+  (org-remark-highlight-clear ov)
+  ;; Update the notes file accordingly
+  (org-remark-notes-remove id delete)
+  (org-remark-highlights-housekeep)
+  (org-remark-highlights-sort)
+  t)))
+
+(defun org-remark-delete (point &optional arg)
   "Delete the highlight at POINT and marginal notes for it.
 
 This function will prompt for confirmation if there is any notes
@@ -694,14 +712,20 @@ buffer is not displayed in the current frame, it will be
 temporarily displayed together with the prompt for the user to
 see the notes.
 
+TODO
+Now optionally takes \\[universal-argument].
+
 If there is no notes, this function will not prompt for
 confirmation and will remove the highlight and deletes the entry
 in the marginal notes buffer.
 
 This command is identical with passing a universal argument to
 `org-remark-remove'."
-  (interactive "d")
-  (org-remark-remove point :delete))
+  (interactive "d\nP")
+  (let ((optional-arg (if (eql 4 (prefix-numeric-value arg))
+  '(16) ;; make it universal-arg x 2
+:delete)))
+(org-remark-remove point optional-arg)))
 
 
  Private Functions
@@ -949,7 +973,8 @@ This function assumes the current buffer is the source 
buffer."
   (and org-remark-use-org-id
(org-entry-get point "ID" :inherit)))
 
-(define-obsolete-function-ali

  1   2   >