emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-encrypt-entries seems to break perl- and cperl-mode
@ 2010-01-18 21:00 Jeffrey Ratcliffe
  2010-01-19 15:10 ` Carsten Dominik
  0 siblings, 1 reply; 6+ messages in thread
From: Jeffrey Ratcliffe @ 2010-01-18 21:00 UTC (permalink / raw)
  To: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 366 bytes --]

With

(add-hook 'before-save-hook 'org-encrypt-entries)

and a file with the following contents:

package G;

in perl- or cperl-mode, when saving, I get the following error
message:

org-scan-tags: Wrong type argument: consp, nil

Can I make the add-hook org-mode specific, or this is a bug in
org-mode?

Please cc on replies, as I am not subscribed.

Regards

Jeff

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 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	[flat|nested] 6+ messages in thread

* Re: org-encrypt-entries seems to break perl- and cperl-mode
  2010-01-18 21:00 org-encrypt-entries seems to break perl- and cperl-mode Jeffrey Ratcliffe
@ 2010-01-19 15:10 ` Carsten Dominik
  2010-01-19 18:38   ` Richard Riley
  2010-01-24 12:02   ` Jeffrey Ratcliffe
  0 siblings, 2 replies; 6+ messages in thread
From: Carsten Dominik @ 2010-01-19 15:10 UTC (permalink / raw)
  To: Jeffrey Ratcliffe; +Cc: emacs-orgmode

Hi Jeffrey,

indeed you need to make sure that this hook runs only in Org-mode files.
This is automatically done by calling

(org-crypt-use-before-save-magic)

after loading org-crypt.el.

Internally, this achieves it's goal by installing
a function into `org-mode-hook', which will then install
a function into the buffer-local version of before-save-hook.

This information is also
given in the file commentary in org-crypt.el, but I think
we should get this info also into WOrg, or maybe even
into the manual.  I'd be happy to accept a patch in
this direction.

Hope this helps

- Carsten


On Jan 18, 2010, at 10:00 PM, Jeffrey Ratcliffe wrote:

> With
>
> (add-hook 'before-save-hook 'org-encrypt-entries)
>
> and a file with the following contents:
>
> package G;
>
> in perl- or cperl-mode, when saving, I get the following error
> message:
>
> org-scan-tags: Wrong type argument: consp, nil
>
> Can I make the add-hook org-mode specific, or this is a bug in
> org-mode?
>
> Please cc on replies, as I am not subscribed.
>
> Regards
>
> Jeff
> _______________________________________________
> 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: org-encrypt-entries seems to break perl- and cperl-mode
  2010-01-19 15:10 ` Carsten Dominik
@ 2010-01-19 18:38   ` Richard Riley
  2010-01-19 19:15     ` Matt Lundin
  2010-01-24 12:02   ` Jeffrey Ratcliffe
  1 sibling, 1 reply; 6+ messages in thread
From: Richard Riley @ 2010-01-19 18:38 UTC (permalink / raw)
  To: emacs-orgmode

Carsten Dominik <carsten.dominik@gmail.com> writes:

> Hi Jeffrey,
>
> indeed you need to make sure that this hook runs only in Org-mode files.
> This is automatically done by calling
>
> (org-crypt-use-before-save-magic)
>
> after loading org-crypt.el.
>
> Internally, this achieves it's goal by installing
> a function into `org-mode-hook', which will then install
> a function into the buffer-local version of before-save-hook.
>
> This information is also
> given in the file commentary in org-crypt.el, but I think
> we should get this info also into WOrg, or maybe even
> into the manual.  I'd be happy to accept a patch in
> this direction.
>
> Hope this helps


A quick note to say how wonderful this mode is. I had been using a .gpg
file with the mode in  a file variable. This thread pushed me to try
org-crypt. Amazingly good and well thought out!

,----
| (require 'org-crypt)
| (org-crypt-use-before-save-magic)
| (setq org-crypt-key "rgr@richardriley.net")
`----

And encryption "just works" when I add the tag :crypt:.

The only slight hiccup I saw was that when I added the crypt tag to
another element in another org file and saved it, it did not encrypt 
that after the initial encryption of the first file I had tagged. When I
restarted emacs and rewrote it it did.

Which brings up my next query : when does org reread tags? I added a
filetag  (#+FILETAGS) to an open org file and saved it but the agenda
match did not find it. How can I force a refresh of the tags buffer when
I save a file? 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: org-encrypt-entries seems to break perl- and cperl-mode
  2010-01-19 18:38   ` Richard Riley
@ 2010-01-19 19:15     ` Matt Lundin
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Lundin @ 2010-01-19 19:15 UTC (permalink / raw)
  To: Richard Riley; +Cc: emacs-orgmode

Richard Riley <rileyrgdev@gmail.com> writes:

> Which brings up my next query : when does org reread tags? I added a
> filetag  (#+FILETAGS) to an open org file and saved it but the agenda
> match did not find it. How can I force a refresh of the tags buffer when
> I save a file? 

You can type C-c C-c on the #+FILETAGS line to refresh the buffer. This
applies to all settings added at the top of a file.

Best,
Matt

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: org-encrypt-entries seems to break perl- and cperl-mode
  2010-01-19 15:10 ` Carsten Dominik
  2010-01-19 18:38   ` Richard Riley
@ 2010-01-24 12:02   ` Jeffrey Ratcliffe
  2010-02-16 20:18     ` Jeffrey Ratcliffe
  1 sibling, 1 reply; 6+ messages in thread
From: Jeffrey Ratcliffe @ 2010-01-24 12:02 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 367 bytes --]

On Tue, Jan 19, 2010 at 04:10:08PM +0100, Carsten Dominik wrote:
> indeed you need to make sure that this hook runs only in Org-mode files.
> This is automatically done by calling
> 
> (org-crypt-use-before-save-magic)
> 
> after loading org-crypt.el.

This doesn't fix things for me. Have you any other suggestions how I
might fix this?

Regards

Jeff

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 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	[flat|nested] 6+ messages in thread

* Re: org-encrypt-entries seems to break perl- and cperl-mode
  2010-01-24 12:02   ` Jeffrey Ratcliffe
@ 2010-02-16 20:18     ` Jeffrey Ratcliffe
  0 siblings, 0 replies; 6+ messages in thread
From: Jeffrey Ratcliffe @ 2010-02-16 20:18 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode


[-- Attachment #1.1: Type: text/plain, Size: 274 bytes --]

On Sun, Jan 24, 2010 at 01:02:53PM +0100, Jeffrey Ratcliffe wrote:
> This doesn't fix things for me. Have you any other suggestions how I
> might fix this?

I got it working with some help from the Debian maintainer:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569947

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 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	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-02-16 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-18 21:00 org-encrypt-entries seems to break perl- and cperl-mode Jeffrey Ratcliffe
2010-01-19 15:10 ` Carsten Dominik
2010-01-19 18:38   ` Richard Riley
2010-01-19 19:15     ` Matt Lundin
2010-01-24 12:02   ` Jeffrey Ratcliffe
2010-02-16 20:18     ` Jeffrey Ratcliffe

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).