From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Add the capture feature "%(sexp)" to org-feed Date: Thu, 09 Aug 2012 16:53:10 +0200 Message-ID: <87liho86cp.fsf@gnu.org> References: <7822.1339898820@alphaville> <87y5lqe21l.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:58486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzU6M-0001wO-Vb for emacs-orgmode@gnu.org; Thu, 09 Aug 2012 10:52:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SzU6L-0003B2-F2 for emacs-orgmode@gnu.org; Thu, 09 Aug 2012 10:52:42 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:53702) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SzU6L-0003AT-83 for emacs-orgmode@gnu.org; Thu, 09 Aug 2012 10:52:41 -0400 Received: by wibhm11 with SMTP id hm11so300312wib.12 for ; Thu, 09 Aug 2012 07:52:39 -0700 (PDT) In-Reply-To: (Michael Brand's message of "Thu, 9 Aug 2012 16:07:41 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Michael Brand Cc: Org Mode Hi Michael, Michael Brand writes: > You omitted the Local variables sentence-end-double-space: t. Isn't > this a good idea for all the users like me that have set this to nil > in their config? I wanted to add it to more files as soon as I will > change them. I've check against current Emacs trunk, and only three files/packages uses this: rst.el, filesets.el and mh-e. So I'd rather not pollute the hundred files of Org with this. > “The current date.” is probably meant to remain “the current date.”. Yes. >> specifically, I used `org-at-regexp-p' instead of >> `org-capture-inside-embedded-elisp-p'. > > With `org-capture-inside-embedded-elisp-p' I wanted to be quite more > waterproof than `org-at-regexp-p' with the new additional closing > parenthesis in `org-capture-template-embedded-elisp-re'. See its > comment “to deal with for example %(length ")")”. Isn't it a good idea > to use `forward-sexp' in Emacs Lisp Mode for this? What can I improve? (org-at-regexp-p org-capture-template-embedded-elisp-re) already returns the correct value for %(length ")") -- but you're right there is a problem with my patch: `org-at-regexp-p' does not match over multiple lines. Maybe you can play with `org-in-regexp': (org-in-regexp org-capture-template-embedded-elisp-re 3) If using `forward-sexp' is necessary let's do so -- but I thought it was too complex first. Thanks, -- Bastien