From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: org-encrypt-entries seems to break perl- and cperl-mode Date: Tue, 19 Jan 2010 16:10:08 +0100 Message-ID: <26E21E93-84E6-40DA-B87D-52EDC8A4A193@gmail.com> References: <20100118210029.GA2044@eeepc> Mime-Version: 1.0 (Apple Message framework v936) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NXFil-0000cs-7i for emacs-orgmode@gnu.org; Tue, 19 Jan 2010 10:10:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NXFig-0000bh-Lk for emacs-orgmode@gnu.org; Tue, 19 Jan 2010 10:10:18 -0500 Received: from [199.232.76.173] (port=36629 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NXFig-0000bX-GZ for emacs-orgmode@gnu.org; Tue, 19 Jan 2010 10:10:14 -0500 Received: from gv-out-0910.google.com ([216.239.58.189]:65298) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NXFig-0006Sy-2Y for emacs-orgmode@gnu.org; Tue, 19 Jan 2010 10:10:14 -0500 Received: by gv-out-0910.google.com with SMTP id n29so37265gve.17 for ; Tue, 19 Jan 2010 07:10:12 -0800 (PST) In-Reply-To: <20100118210029.GA2044@eeepc> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Jeffrey Ratcliffe Cc: emacs-orgmode@gnu.org 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