[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-contrib 5eabbf22bd: * lisp/org-annotate-file.el: Fix c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-contrib 5eabbf22bd: * lisp/org-annotate-file.el: Fix compiler warnings |
Date: |
Sun, 17 Sep 2023 06:59:56 -0400 (EDT) |
branch: elpa/org-contrib
commit 5eabbf22bdd4523c922a30787e98ee66c24221aa
Author: Ihor Radchenko <yantar92@posteo.net>
Commit: Ihor Radchenko <yantar92@posteo.net>
* lisp/org-annotate-file.el: Fix compiler warnings
(org-annotate-file-show-section): Do not use obsolete `point-at-bol'
and `point-at-eol'.
(org-annotate-file-annotate): Do no use obsolete function name.
(org-annotate-file-add-second-level): Use `forward-line' instead of
`point-at-eol'.
---
lisp/org-annotate-file.el | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/lisp/org-annotate-file.el b/lisp/org-annotate-file.el
index f932cac226..24567d53e3 100644
--- a/lisp/org-annotate-file.el
+++ b/lisp/org-annotate-file.el
@@ -111,7 +111,11 @@ The annotation will link to ANNOTATED-BUFFER if specified,
otherwise the current buffer is used."
(let ((filename (abbreviate-file-name (or annotated-buffer
(buffer-file-name))))
- (line (buffer-substring-no-properties (point-at-bol) (point-at-eol)))
+ (line
+ (let ((inhibit-field-text-motion t))
+ (buffer-substring-no-properties
+ (line-beginning-position)
+ (line-end-position))))
(annotation-buffer (find-file-noselect storage-file)))
(with-current-buffer annotation-buffer
(org-annotate-file-annotate filename line))
@@ -119,8 +123,8 @@ The annotation will link to ANNOTATED-BUFFER if specified,
(defun org-annotate-file-annotate (filename line)
"Add annotation for FILENAME at LINE using current buffer."
- (let* ((link (org-make-link-string (concat "file:" filename) filename))
- (search-link (org-make-link-string
+ (let* ((link (org-link-make-string (concat "file:" filename) filename))
+ (search-link (org-link-make-string
(concat "file:" filename "::" line)
(org-annotate-file-ellipsify-desc line))))
(unless (eq major-mode 'org-mode)
@@ -128,7 +132,7 @@ The annotation will link to ANNOTATED-BUFFER if specified,
(goto-char (point-min))
(widen)
(when org-annotate-file-always-open
- (show-all))
+ (org-show-all))
(unless (search-forward-regexp
(concat "^* " (regexp-quote link)) nil t)
(org-annotate-file-add-upper-level link))
@@ -148,7 +152,7 @@ The annotation will link to ANNOTATED-BUFFER if specified,
(defun org-annotate-file-add-second-level (link)
"Add and link subheading to LINK."
- (goto-char (point-at-eol))
+ (forward-line 0)
(call-interactively 'org-insert-subheading)
(insert link))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [nongnu] elpa/org-contrib 5eabbf22bd: * lisp/org-annotate-file.el: Fix compiler warnings,
ELPA Syncer <=