emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-bibtex
@ 2011-07-13 19:01 Thomas S. Dye
  2011-07-15 15:04 ` org-bibtex Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas S. Dye @ 2011-07-13 19:01 UTC (permalink / raw)
  To: Org-mode

Aloha Eric,

I ran into an odd problem exporting org-bibtex references.  It turned
out that I had inadvertently added a space, ":TYPE: book " The space is
invisible in the Org-mode buffer, but it leads to an export like this:
@book {kirch10:_how_chief_becam_kings,
}

Note the lack of contents except for the bibkey and the space between
@book and the opening curly brace.

Would it be possible to trim this field for the pleasure of clumsy
typists like me?

All the best,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com

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

* Re: org-bibtex
  2011-07-13 19:01 org-bibtex Thomas S. Dye
@ 2011-07-15 15:04 ` Eric Schulte
  2011-07-18 16:39   ` org-bibtex Matt Lundin
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2011-07-15 15:04 UTC (permalink / raw)
  To: Thomas S. Dye; +Cc: Org-mode

Hi Tom,

I just pushed up a fix for this issue.

Thanks for suggesting this change. -- Eric

tsd@tsdye.com (Thomas S. Dye) writes:

> Aloha Eric,
>
> I ran into an odd problem exporting org-bibtex references.  It turned
> out that I had inadvertently added a space, ":TYPE: book " The space is
> invisible in the Org-mode buffer, but it leads to an export like this:
> @book {kirch10:_how_chief_becam_kings,
> }
>
> Note the lack of contents except for the bibkey and the space between
> @book and the opening curly brace.
>
> Would it be possible to trim this field for the pleasure of clumsy
> typists like me?
>
> All the best,
> Tom

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: org-bibtex
  2011-07-15 15:04 ` org-bibtex Eric Schulte
@ 2011-07-18 16:39   ` Matt Lundin
  2011-07-18 17:27     ` org-bibtex Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Lundin @ 2011-07-18 16:39 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode

Hi Eric,

Eric Schulte <schulte.eric@gmail.com> writes:

> I just pushed up a fix for this issue.
>
> Thanks for suggesting this change. -- Eric

This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
"". As a result, org-bibtex-fleshout believes that there are values for
all the required fields even though those fields are not defined.

Best,
Matt

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

* Re: org-bibtex
  2011-07-18 16:39   ` org-bibtex Matt Lundin
@ 2011-07-18 17:27     ` Eric Schulte
  2011-07-18 17:41       ` org-bibtex Matt Lundin
  0 siblings, 1 reply; 6+ messages in thread
From: Eric Schulte @ 2011-07-18 17:27 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Org-mode

Matt Lundin <mdl@imapmail.org> writes:

> Hi Eric,
>
> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> I just pushed up a fix for this issue.
>>
>> Thanks for suggesting this change. -- Eric
>
> This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
> "". As a result, org-bibtex-fleshout believes that there are values for
> all the required fields even though those fields are not defined.
>

Oh, thanks for catching this Matt, I've just pushed up a fix.

-- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

* Re: org-bibtex
  2011-07-18 17:27     ` org-bibtex Eric Schulte
@ 2011-07-18 17:41       ` Matt Lundin
  2011-07-18 18:08         ` org-bibtex Eric Schulte
  0 siblings, 1 reply; 6+ messages in thread
From: Matt Lundin @ 2011-07-18 17:41 UTC (permalink / raw)
  To: Eric Schulte; +Cc: Org-mode

[-- Attachment #1: Type: text/plain, Size: 685 bytes --]

Eric Schulte <schulte.eric@gmail.com> writes:

> Matt Lundin <mdl@imapmail.org> writes:
>
>> Hi Eric,
>>
>> Eric Schulte <schulte.eric@gmail.com> writes:
>>
>>> I just pushed up a fix for this issue.
>>>
>>> Thanks for suggesting this change. -- Eric
>>
>> This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
>> "". As a result, org-bibtex-fleshout believes that there are values for
>> all the required fields even though those fields are not defined.
>>
>
> Oh, thanks for catching this Matt, I've just pushed up a fix.

Thanks!

While we're on the subject of org-bibtex, I'm attaching a patch to fix
the tagging functionality I added a while back.

Best,
Matt


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Fix-argument-to-org-toggle-tag.patch --]
[-- Type: text/x-patch, Size: 1455 bytes --]

From c935b2afcd7cf673fff15efd9766f2d081289358 Mon Sep 17 00:00:00 2001
From: Matt Lundin <mdl@imapmail.org>
Date: Mon, 18 Jul 2011 12:37:20 -0500
Subject: [PATCH] Fix argument to org-toggle-tag.

* lisp/org-bibtex.el: (org-bibtex-create, org-bibtex-write): Change
  argument of org-toggle-tag to 'on. (Other arguments, e.g., t, have
  no effect).
---
 lisp/org-bibtex.el |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el
index 6536917..165e96f 100644
--- a/lisp/org-bibtex.el
+++ b/lisp/org-bibtex.el
@@ -555,7 +555,7 @@ If nonew is t, add data to the headline of the entry at point."
 	(org-bibtex-put "TITLE" title)))
     (org-bibtex-put "TYPE" (substring (symbol-name type) 1))
     (org-bibtex-fleshout type arg)
-    (mapc (lambda (tag) (org-toggle-tag tag t)) org-bibtex-tags)))
+    (mapc (lambda (tag) (org-toggle-tag tag 'on)) org-bibtex-tags)))
 
 (defun org-bibtex-create-in-current-entry (&optional arg)
   "Add bibliographical data to the current entry.
@@ -594,7 +594,7 @@ This uses `bibtex-parse-entry'."
   (let ((entry (pop *org-bibtex-entries*))
 	(org-special-properties nil)) ; avoids errors with `org-entry-put'
     (flet ((val (field) (cdr (assoc field entry)))
-	   (togtag (tag) (org-toggle-tag tag t)))
+	   (togtag (tag) (org-toggle-tag tag 'on)))
       (org-insert-heading)
       (insert (val :title))
       (org-bibtex-put "TITLE" (val :title))
-- 
1.7.6


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

* Re: org-bibtex
  2011-07-18 17:41       ` org-bibtex Matt Lundin
@ 2011-07-18 18:08         ` Eric Schulte
  0 siblings, 0 replies; 6+ messages in thread
From: Eric Schulte @ 2011-07-18 18:08 UTC (permalink / raw)
  To: Matt Lundin; +Cc: Org-mode

Matt Lundin <mdl@imapmail.org> writes:

> Eric Schulte <schulte.eric@gmail.com> writes:
>
>> Matt Lundin <mdl@imapmail.org> writes:
>>
>>> Hi Eric,
>>>
>>> Eric Schulte <schulte.eric@gmail.com> writes:
>>>
>>>> I just pushed up a fix for this issue.
>>>>
>>>> Thanks for suggesting this change. -- Eric
>>>
>>> This fix broke org-bibtex-fleshout, since org-babel-trim converts nil to
>>> "". As a result, org-bibtex-fleshout believes that there are values for
>>> all the required fields even though those fields are not defined.
>>>
>>
>> Oh, thanks for catching this Matt, I've just pushed up a fix.
>
> Thanks!
>
> While we're on the subject of org-bibtex, I'm attaching a patch to fix
> the tagging functionality I added a while back.
>

Applied, Thanks -- Eric

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

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

end of thread, other threads:[~2011-07-18 18:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-13 19:01 org-bibtex Thomas S. Dye
2011-07-15 15:04 ` org-bibtex Eric Schulte
2011-07-18 16:39   ` org-bibtex Matt Lundin
2011-07-18 17:27     ` org-bibtex Eric Schulte
2011-07-18 17:41       ` org-bibtex Matt Lundin
2011-07-18 18:08         ` org-bibtex Eric Schulte

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