From mboxrd@z Thu Jan 1 00:00:00 1970 From: tsd@tsdye.com (Thomas S. Dye) Subject: Re: ebib configuration for org-bibtex Date: Tue, 23 Aug 2011 13:17:26 -1000 Message-ID: References: <8739hfn4zc.fsf@gmail.com> <87hb57rgrx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:33990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qw0Dv-0001We-Ng for emacs-orgmode@gnu.org; Tue, 23 Aug 2011 19:17:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qw0Du-0005U7-Da for emacs-orgmode@gnu.org; Tue, 23 Aug 2011 19:17:35 -0400 Received: from oproxy5-pub.bluehost.com ([67.222.38.55]:48465) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Qw0Du-0005T2-3n for emacs-orgmode@gnu.org; Tue, 23 Aug 2011 19:17:34 -0400 In-Reply-To: <87hb57rgrx.fsf@gmail.com> (Eric Schulte's message of "Tue, 23 Aug 2011 14:53:38 -0600") 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: Eric Schulte Cc: Org-mode Eric Schulte writes: > tsd@tsdye.com (Thomas S. Dye) writes: > >> Eric Schulte writes: >> >>> tsd@tsdye.com (Thomas S. Dye) writes: >>> >>>> Aloha all, >>>> >>>> I'm trying, partially successfully, to configure org-bibtex so it mimics >>>> some useful features of ebib. In particular, I'm wanting to add several >>>> optional fields that ebib uses. >>>> >>>> >>>> I have this in .emacs: >>>> >>>> #+begin_src emacs-lisp :tangle yes >>>> (dolist (type org-bibtex-types) >>>> (push :url (cdr (assoc :optional (cdr type)))) >>>> (push :annote (cdr (assoc :optional (cdr type)))) >>>> (push :abstract (cdr (assoc :optional (cdr type)))) >>>> (push :keywords (cdr (assoc :optional (cdr type)))) >>>> (push :file (cdr (assoc :optional (cdr type)))) >>>> ) >>>> >>>> (push (cons :url "A URL for the reference") org-bibtex-fields) >>>> (push (cons :annote "Annotation is typically not exported") org-bibtex-fields) >>>> (push (cons :abstract "Abstract for annotated bibliography") org-bibtex-fields) >>>> (push (cons :keywords "Keywords for sorting with ebib") org-bibtex-fields) >>>> (push (cons :file "A local file path used by ebib to open the >>>> reference in an appropriate application") org-bibtex-fields) >>>> #+end_src >>>> >>>> Most of it works fine, but the optional :file field doesn't respect its >>>> argument. So, the following entry in the Org-mode file: >>>> >>> >>> Hi Tom, >>> >>> The :file property is treated in a special manner when Org-mode resolves >>> properties (notice it is an element of the `org-special-properties' >>> variable). I've just pushed up a change which temporarily removes :file >>> from this list while resolving bibtex entries. This change should fix >>> your reported problem -- please let me know if it doesn't. If any other >>> elements of `org-special-properties' seem likely to cause problems we >>> can temporarily remove them as well. >>> >>> Best -- Eric >> >> Hi Eric, >> >> I think this fix is causing some mischief. In the Org-mode file where >> a :FILE: property is set to preza-thesis.pdf R source code blocks >> misbehave, as follows: >> >> #+source: land-sale-plot >> #+begin_src R :var y=sales >> str(y) >> #+end_src >> >> #+results: land-sale-plot >> [[file:preza-thesis.pdf]] >> > > Hi Tom, > > Are you still experiencing the problem mentioned above? I'm unable to > reproduce it locally. If so, would you mind trying to recreate the > problem with an emacs session launched using "emacs -Q" to see if the > cause lies somewhere in your personal configuration? > > I *do* have a file header argument for code blocks inside of subtrees > which explicitly specify a file property (which can be easily checked > using C-c C-v I), e.g., > > > ** inheriting the file property > :PROPERTIES: > :FILE: something.png > :END: > > #+begin_src ditaa > +-----------------------------+ > | | > | +-----+ | > | | | +---------+ | > | | | | | | > | +-----+ | | | > | | | | > | file | | | > | inheritance +---------+ | > | | > +-----------------------------+ > #+end_src > > #+results: > [[file:something.png]] > > > However when I do not specify such a FILE property, then no :file entry > is present in the code blocks parameters. > > Thanks -- Eric Hi Eric, I think the confusion leading to my messages has been the cause of some mischief. Apologies for that. The change you implemented to let the :FILE: property work correctly with ebib does what it is supposed to do. It does not cause the "mischief" that I was experiencing. AFAICT, your re-reversion of the code back into Org-mode was the correct action. I ran into the problem when I tried to include in my reading notes an R graphic for some newly reported data. The R source block was immediately below the bibliographic subheading with the :FILE: property. Babel saw the :FILE: property for the bibliographic subheading and applied that to the R code block, as I now believe it is supposed to do. My confusion came from the fact that I didn't recognize at the time that Babel sees the :FILE: property for the bibliographic subheading the same way it sees the :FILE: property for any other heading. When I move the R code away from the bibliographic subheading it all works as expected, as you note. Again, sorry for my noise, and thanks for your fix for the ebib integration. All the best, Tom -- T.S. Dye & Colleagues, Archaeologists 735 Bishop St, Suite 315, Honolulu, HI 96813 Tel: 808-529-0866, Fax: 808-529-0884 http://www.tsdye.com