all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* 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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.