* Capture tries to encrypt for no reason
@ 2012-12-24 20:00 Samuel Wales
2012-12-25 2:29 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Samuel Wales @ 2012-12-24 20:00 UTC (permalink / raw)
To: emacs-orgmode
Capture tries to encrypt for no reason.
(defun org-at-encrypted-entry-p ()
"Is the current entry encrypted?"
(unless (org-before-first-heading-p)
(save-excursion
(org-back-to-heading t)
(search-forward "-----BEGIN PGP MESSAGE-----"
(save-excursion (org-end-of-subtree t)) t))))
My guess is that going to the end of the subtree is wrong. It should
be to the end of the entry.
That should also speed up capture.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Capture tries to encrypt for no reason
2012-12-24 20:00 Capture tries to encrypt for no reason Samuel Wales
@ 2012-12-25 2:29 ` Bastien
0 siblings, 0 replies; 2+ messages in thread
From: Bastien @ 2012-12-25 2:29 UTC (permalink / raw)
To: Samuel Wales; +Cc: emacs-orgmode
Hi Samuel,
Samuel Wales <samologist@gmail.com> writes:
> Capture tries to encrypt for no reason.
>
> (defun org-at-encrypted-entry-p ()
> "Is the current entry encrypted?"
> (unless (org-before-first-heading-p)
> (save-excursion
> (org-back-to-heading t)
> (search-forward "-----BEGIN PGP MESSAGE-----"
> (save-excursion (org-end-of-subtree t)) t))))
>
> My guess is that going to the end of the subtree is wrong. It should
> be to the end of the entry.
Indeed. Fixed, thanks for catching this.
--
Bastien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-25 2:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-24 20:00 Capture tries to encrypt for no reason Samuel Wales
2012-12-25 2:29 ` Bastien
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).