* [BUG] org remember broken
@ 2010-07-10 6:36 Thierry Volpiatto
2010-07-14 20:35 ` Carsten Dominik
0 siblings, 1 reply; 6+ messages in thread
From: Thierry Volpiatto @ 2010-07-10 6:36 UTC (permalink / raw)
To: emacs-orgmode
Hi,
org remember used with refile to (C-1 C-c C-c) and with org-crypt loaded
fail leaving an empty *remember* buffer with error: (Appear on Emacs24,
not on Emacs23.2)
,----
| Use C-c C-c to remember the data.
| Getting targets...done
| Copied: Subtree(s) with 186 characters
| Cut: Subtree(s) with 186 characters
| Refiled to "Emacs development (agenda.org)"
| Entering debugger...
`----
Here the backtrace
,----
| Debugger entered--Lisp error: (error "Before first headline at position 1 in buffer *Remember*")
| signal(error ("Before first headline at position 1 in buffer *Remember*"))
| error("Before first headline at position %d in buffer %s" 1 #<buffer *Remember*>)
| byte-code("\300\301`p#\207" [error "Before first headline at position %d in buffer %s"] 4)
| org-back-to-heading(t)
| org-decrypt-entry()
| run-hooks(org-reveal-start-hook)
| org-reveal()
| org-refile(nil #<buffer agenda.org>)
| byte-code("
| [...]
|
| " [org-note-abort org-jump-to-target-location visitp buffer-file-name
| org-remember-backup-directory backup-file throw quit t boundp
| file-name-directory file-name-as-directory expand-file-name string-match
| "^remember-[0-9]\\{4\\}" file-name-nondirectory "\\S-" buffer-string
| message "Nothing to remember" nil (byte-code " [...]
|
| " [backup-file delete-file "~"] 3) ((error)) set-buffer-modified-p ((16)
| 0) 2 3 org-xor 1 refile org-get-org-file org-find-base-buffer-visiting
| (4) marker-buffer re-search-forward "[ \n]+\\'" replace-match ""
| looking-at "* " current-time-string " (" remember-buffer-desc ")\n" -1
| "^" " " "\n[ ]*\n[ \n]*\\'" "\n\n" "[ \n]*\\'" ...] 6)
| org-remember-handler()
| run-hook-with-args-until-success(org-remember-handler)
| remember-region(1 545) remember-finalize() org-remember-finalize()
| call-interactively(org-remember-finalize nil nil)
`----
--
Thierry Volpiatto
Gpg key: http://pgp.mit.edu/
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] org remember broken
2010-07-10 6:36 [BUG] org remember broken Thierry Volpiatto
@ 2010-07-14 20:35 ` Carsten Dominik
2010-07-15 4:59 ` Thierry Volpiatto
2010-07-16 15:25 ` David Maus
0 siblings, 2 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-14 20:35 UTC (permalink / raw)
To: Thierry Volpiatto; +Cc: emacs-orgmode
Hi Thierry,
I cannot easily see why org-decrypt-entry is being called, and if it
is being called in
the remember buffer or where?
Anyway, most of us are moving to org-capture, so I would be more
inclined
to look into this if this is still an issue in org-capture....
- Carsten
On Jul 10, 2010, at 8:36 AM, Thierry Volpiatto wrote:
> Hi,
> org remember used with refile to (C-1 C-c C-c) and with org-crypt
> loaded
> fail leaving an empty *remember* buffer with error: (Appear on
> Emacs24,
> not on Emacs23.2)
>
> ,----
> | Use C-c C-c to remember the data.
> | Getting targets...done
> | Copied: Subtree(s) with 186 characters
> | Cut: Subtree(s) with 186 characters
> | Refiled to "Emacs development (agenda.org)"
> | Entering debugger...
> `----
>
> Here the backtrace
>
> ,----
> | Debugger entered--Lisp error: (error "Before first headline at
> position 1 in buffer *Remember*")
> | signal(error ("Before first headline at position 1 in buffer
> *Remember*"))
> | error("Before first headline at position %d in buffer %s" 1
> #<buffer *Remember*>)
> | byte-code("\300\301`p#\207" [error "Before first headline at
> position %d in buffer %s"] 4)
> | org-back-to-heading(t)
> | org-decrypt-entry()
> | run-hooks(org-reveal-start-hook)
> | org-reveal()
> | org-refile(nil #<buffer agenda.org>)
> | byte-code("
> | [...]
> |
> | " [org-note-abort org-jump-to-target-location visitp buffer-file-
> name
> | org-remember-backup-directory backup-file throw quit t boundp
> | file-name-directory file-name-as-directory expand-file-name string-
> match
> | "^remember-[0-9]\\{4\\}" file-name-nondirectory "\\S-" buffer-string
> | message "Nothing to remember" nil (byte-code " [...]
> |
> | " [backup-file delete-file "~"] 3) ((error)) set-buffer-modified-p
> ((16)
> | 0) 2 3 org-xor 1 refile org-get-org-file org-find-base-buffer-
> visiting
> | (4) marker-buffer re-search-forward "[ \n]+\\'" replace-match ""
> | looking-at "* " current-time-string " (" remember-buffer-desc ")
> \n" -1
> | "^" " " "\n[ ]*\n[ \n]*\\'" "\n\n" "[ \n]*\\'" ...] 6)
> | org-remember-handler()
> | run-hook-with-args-until-success(org-remember-handler)
> | remember-region(1 545) remember-finalize() org-remember-finalize()
> | call-interactively(org-remember-finalize nil nil)
> `----
>
> --
> Thierry Volpiatto
> Gpg key: http://pgp.mit.edu/
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] org remember broken
2010-07-14 20:35 ` Carsten Dominik
@ 2010-07-15 4:59 ` Thierry Volpiatto
2010-07-16 15:25 ` David Maus
1 sibling, 0 replies; 6+ messages in thread
From: Thierry Volpiatto @ 2010-07-15 4:59 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Hi Carsten,
Carsten Dominik <carsten.dominik@gmail.com> writes:
> Hi Thierry,
>
>
> I cannot easily see why org-decrypt-entry is being called, and if it
> is being called in
> the remember buffer or where?
I don't know, i didn't have time to look carefuly, just sent the
backtrace.
> Anyway, most of us are moving to org-capture, so I would be more
> inclined
> to look into this if this is still an issue in org-capture....
This is working fine and is very nice, like the facility to export my
remember templates :-).
Thanks.
--
Thierry Volpiatto
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] org remember broken
2010-07-14 20:35 ` Carsten Dominik
2010-07-15 4:59 ` Thierry Volpiatto
@ 2010-07-16 15:25 ` David Maus
2010-07-18 5:22 ` Patchwork: Patch 139 Accepted Carsten Dominik
2010-07-18 9:52 ` [BUG] org remember broken Carsten Dominik
1 sibling, 2 replies; 6+ messages in thread
From: David Maus @ 2010-07-16 15:25 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode, Thierry Volpiatto
[-- Attachment #1.1.1: Type: text/plain, Size: 1227 bytes --]
Carsten Dominik wrote:
>Hi Thierry,
>I cannot easily see why org-decrypt-entry is being called, and if it
>is being called in
>the remember buffer or where?
>Anyway, most of us are moving to org-capture, so I would be more
>inclined to look into this if this is still an issue in
>org-capture....
Looks like this is not a problem of org-remember. After archiving
DONE items (C-u C-c C-x C-s) I get a similar error:
,----
| Debugger entered--Lisp error: (error "Before first headline at position 1 in buffer projects.org")
| signal(error ("Before first headline at position 1 in buffer projects.org"))
| error("Before first headline at position %d in buffer %s" 1 #<buffer projects.org>)
| byte-code("\300\301`p#\207" [error "Before first headline at position %d in buffer %s"] 4)
| org-back-to-heading(t)
| org-decrypt-entry()
| run-hooks(org-reveal-start-hook)
| org-reveal()
| org-advertized-archive-subtree((4))
| call-interactively(org-advertized-archive-subtree nil nil)
`----
Attached patch fixes this by modifying `org-decrypt-entry' to silently
do nothing if point is before first heading.
HTH
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... dmaus@ictsoc.de
[-- Attachment #1.1.2: 0001-Don-t-throw-error-when-not-inside-a-subtree.patch --]
[-- Type: text/plain, Size: 2026 bytes --]
From aab3300517e3f3bd6a2807713bfc964bb7c3d8c5 Mon Sep 17 00:00:00 2001
From: David Maus <dmaus@ictsoc.de>
Date: Fri, 16 Jul 2010 17:23:31 +0200
Subject: [PATCH] Don't throw error when not inside a subtree
* org-crypt.el (org-decrypt-entry): Don't throw error when not inside
a subtree.
---
lisp/org-crypt.el | 39 ++++++++++++++++++++-------------------
1 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/lisp/org-crypt.el b/lisp/org-crypt.el
index 6411171..8b25213 100644
--- a/lisp/org-crypt.el
+++ b/lisp/org-crypt.el
@@ -137,25 +137,26 @@ This setting can also be overridden in the CRYPTKEY property."
"Decrypt the content of the current headline."
(interactive)
(require 'epg)
- (save-excursion
- (org-back-to-heading t)
- (forward-line)
- (when (looking-at "-----BEGIN PGP MESSAGE-----")
- (let* ((beg (point))
- (end (save-excursion
- (search-forward "-----END PGP MESSAGE-----")
- (forward-line)
- (point)))
- (epg-context (epg-make-context nil t t))
- (decrypted-text
- (decode-coding-string
- (epg-decrypt-string
- epg-context
- (buffer-substring-no-properties beg end))
- 'utf-8)))
- (delete-region beg end)
- (insert decrypted-text)
- nil))))
+ (unless (org-before-first-heading-p)
+ (save-excursion
+ (org-back-to-heading t)
+ (forward-line)
+ (when (looking-at "-----BEGIN PGP MESSAGE-----")
+ (let* ((beg (point))
+ (end (save-excursion
+ (search-forward "-----END PGP MESSAGE-----")
+ (forward-line)
+ (point)))
+ (epg-context (epg-make-context nil t t))
+ (decrypted-text
+ (decode-coding-string
+ (epg-decrypt-string
+ epg-context
+ (buffer-substring-no-properties beg end))
+ 'utf-8)))
+ (delete-region beg end)
+ (insert decrypted-text)
+ nil)))))
(defun org-encrypt-entries ()
"Encrypt all top-level entries in the current buffer."
--
1.7.1
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Patchwork: Patch 139 Accepted
2010-07-16 15:25 ` David Maus
@ 2010-07-18 5:22 ` Carsten Dominik
2010-07-18 9:52 ` [BUG] org remember broken Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-18 5:22 UTC (permalink / raw)
To: emacs-orgmode
Patch 139 (http://patchwork.newartisans.com/patch/139/) is now Accepted.
This relates to the following submission:
http://mid.gmane.org/%3C8739vjbg92.wl%25dmaus%40ictsoc.de%3E
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [BUG] org remember broken
2010-07-16 15:25 ` David Maus
2010-07-18 5:22 ` Patchwork: Patch 139 Accepted Carsten Dominik
@ 2010-07-18 9:52 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-07-18 9:52 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode, Thierry Volpiatto
Applied, thanks.
- Carsten
On Jul 16, 2010, at 5:25 PM, David Maus wrote:
> Carsten Dominik wrote:
>> Hi Thierry,
>
>
>> I cannot easily see why org-decrypt-entry is being called, and if it
>> is being called in
>> the remember buffer or where?
>
>> Anyway, most of us are moving to org-capture, so I would be more
>> inclined to look into this if this is still an issue in
>> org-capture....
>
> Looks like this is not a problem of org-remember. After archiving
> DONE items (C-u C-c C-x C-s) I get a similar error:
>
> ,----
> | Debugger entered--Lisp error: (error "Before first headline at
> position 1 in buffer projects.org")
> | signal(error ("Before first headline at position 1 in buffer
> projects.org"))
> | error("Before first headline at position %d in buffer %s" 1
> #<buffer projects.org>)
> | byte-code("\300\301`p#\207" [error "Before first headline at
> position %d in buffer %s"] 4)
> | org-back-to-heading(t)
> | org-decrypt-entry()
> | run-hooks(org-reveal-start-hook)
> | org-reveal()
> | org-advertized-archive-subtree((4))
> | call-interactively(org-advertized-archive-subtree nil nil)
> `----
>
> Attached patch fixes this by modifying `org-decrypt-entry' to silently
> do nothing if point is before first heading.
>
> HTH
> -- David
> --
> OpenPGP... 0x99ADB83B5A4478E6
> Jabber.... dmjena@jabber.org
> Email..... dmaus@ictsoc.de
> <0001-Don-t-throw-error-when-not-inside-a-subtree.patch>
- Carsten
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-07-19 7:03 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-10 6:36 [BUG] org remember broken Thierry Volpiatto
2010-07-14 20:35 ` Carsten Dominik
2010-07-15 4:59 ` Thierry Volpiatto
2010-07-16 15:25 ` David Maus
2010-07-18 5:22 ` Patchwork: Patch 139 Accepted Carsten Dominik
2010-07-18 9:52 ` [BUG] org remember broken Carsten Dominik
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).