[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-contacts 84436fd7bc 136/154: Fix org-contacts file
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-contacts 84436fd7bc 136/154: Fix org-contacts file narrowed not widen recovered bug. |
Date: |
Fri, 9 Sep 2022 15:58:55 -0400 (EDT) |
branch: externals/org-contacts
commit 84436fd7bcaf62747cb3199ab1ffa9c2a4b55dae
Author: stardiviner <numbchild@gmail.com>
Commit: stardiviner <numbchild@gmail.com>
Fix org-contacts file narrowed not widen recovered bug.
---
org-contacts.el | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/org-contacts.el b/org-contacts.el
index 0513df76ee..d51fda9ac4 100644
--- a/org-contacts.el
+++ b/org-contacts.el
@@ -646,16 +646,17 @@ description."
(org-contact-buffer (get-buffer (find-file-noselect file)))
;; get org-contact headline and property drawer.
(contents (with-current-buffer org-contact-buffer
- (goto-char position)
(when (derived-mode-p 'org-mode)
- ;; `org-edit-src-code' is not a real narrowing command.
- ;; Remove this first conditional if you don't want it.
- (cond ((ignore-errors (org-edit-src-code))
- (delete-other-windows))
- ((org-at-block-p)
- (org-narrow-to-block))
- (t (org-narrow-to-subtree)))
- (buffer-substring (point-min) (point-max))))))
+ (save-excursion
+ (goto-char position)
+ (cond ((ignore-errors (org-edit-src-code))
+ (delete-other-windows))
+ ((org-at-block-p)
+ (org-narrow-to-block))
+ (t (org-narrow-to-subtree)))
+ (let ((content (buffer-substring (point-min)
(point-max))))
+ (when (buffer-narrowed-p) (widen))
+ content))))))
(with-current-buffer doc-buffer
(read-only-mode 1)
(let ((inhibit-read-only t))
- [elpa] externals/org-contacts 507e48cbd1 116/154: add README.org, (continued)
- [elpa] externals/org-contacts 507e48cbd1 116/154: add README.org, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 986a5b3280 109/154: Prefer HTTPS to HTTP in most links, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 85dd965906 126/154: Remove testing code, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 39c7aba7dc 127/154: Remove all-completions code logic, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 0501463909 149/154: Also detect whether org API function `org-add-link-type' available., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts fe466ab2ae 139/154: Add org-mode mailto: link type :complete supporting, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 03a563b471 135/154: Add autoload cookies for org-link functions, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 3e075cdee4 123/154: Fix most of the compiler wanrings and add `Version:', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 919511eb86 154/154: Adding org-contacts to GNU ELPA, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2916aae933 144/154: Fix warning: Invalid face reference: quote. Invalid face attribute :inherit 'org-link, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 84436fd7bc 136/154: Fix org-contacts file narrowed not widen recovered bug.,
ELPA Syncer <=
- [elpa] externals/org-contacts e64df72db4 094/154: Rationalize `org-link-(un)escape', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 478dfcc9b7 096/154: org-contacts.el: Add new link type "contact:", ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 2f8b3f024c 108/154: Prefer HTTPS to HTTP for links to gnu.org, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f64d6edcd0 121/154: Update source code metadata keywords and usage description, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts bdf172eab8 129/154: Merge branch 'complete-contact', ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts dba21b4895 153/154: Decrease emacs and cl-lib version requirements., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts f5394bc0b6 147/154: Warning user that the custom variable `org-contacts-files' is nil., ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 3a24177c3a 070/154: un-hexify TEL links in vCard export, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 58edab6f69 134/154: Add autoload cookirs for completing functions, ELPA Syncer, 2022/09/09
- [elpa] externals/org-contacts 7ed94bcf72 140/154: Fix can't get-buffer when file is not opened which caused `buf` is nil., ELPA Syncer, 2022/09/09