Hi Bastien, Thanks for the feedback. I have attached the modified patch. All best, Leonard
On 18 April 2014 12:14, Bastien <b...@gnu.org> wrote: > Hi Leonard, > > thanks for starting this! A few stylistic comments inline. > > Leonard Randall <leonard.a.rand...@gmail.com> writes: > > > diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el > > index ed645e5..848d0e4 100644 > > --- a/lisp/org-bibtex.el > > +++ b/lisp/org-bibtex.el > > @@ -270,20 +270,31 @@ with underscores, and characters that are not > permitted in org > > tags will be removed. > > > > If t, local tags in an org entry will be exported as a > > -comma-separated string of keywords when exported to bibtex. Tags > > -defined in `org-bibtex-tags' or `org-bibtex-no-export-tags' will > > -not be exported." > > +comma-separated string of keywords when exported to bibtex. If > > Make sure to end sentences with two spaces. > > > (defcustom org-bibtex-no-export-tags nil > > "List of tag(s) that should not be converted to keywords. > > -This variable is relevant only if `org-bibtex-export-tags-as-keywords' > is t." > > +This variable is relevant only if `org-bibtex-tags-are-keywords' is t." > > :group 'org-bibtex > > :version "24.1" > > :type '(repeat :tag "Tag" (string))) > > I fixed this docstring from the maint branch, you may need to pull > again and rewrite your changes. > > > +(defcustom org-bibtex-inherit-tags nil > > + "This variable controlls whether inherited tags are included > > The first line of the docstring should be a sentence. > > > +when converting org tags to bibtex keywords. It is relevant only > > +if `org-bibtex-tags-are-keywords' is t. Tag inheritence itself is > > +controlled by `org-use-tag-inheritence' and > > +`org-exclude-tags-from-inheritence'" > > There is a missing fullstop at the end, and missing double-space > between sentences. > > > + :group 'org-bibtex > > + :version "24.1" > > + :type 'boolean) > > Use > > :version "25.1" > :package-version '(Org . "8.3") > > here, so that users will know the option is new in Org 8.3 (the next > version that will be released from the master branc) and in Emacs 25.1 > (the next Emacs stable version that will contain 8.3.) > > Otherwise, the patch looks good. Please resubmit it from a fresh pull > with the modifications I suggested. > > Thanks in advance! > > -- > Bastien >
diff --git a/lisp/org-bibtex.el b/lisp/org-bibtex.el index cdb12b7..516f2cf 100644 --- a/lisp/org-bibtex.el +++ b/lisp/org-bibtex.el @@ -270,9 +270,10 @@ with underscores, and characters that are not permitted in org tags will be removed. If t, local tags in an org entry will be exported as a -comma-separated string of keywords when exported to bibtex. Tags -defined in `org-bibtex-tags' or `org-bibtex-no-export-tags' will -not be exported." +comma-separated string of keywords when exported to bibtex. If +`org-bibtex-inherit-tags' is t, inherited tags will also be +exported as keywords. Tags defined in `org-bibtex-tags' or +`org-bibtex-no-export-tags' will not be exported." :group 'org-bibtex :version "24.1" :type 'boolean) @@ -284,6 +285,17 @@ This variable is relevant only if `org-bibtex-tags-are-keywords' is t." :version "24.1" :type '(repeat :tag "Tag" (string))) +(defcustom org-bibtex-inherit-tags nil + "Controls whether inherited tags are converted to bibtex keywords. +It is relevant only if `org-bibtex-tags-are-keywords' is t. Tag +inheritence itself is controlled by `org-use-tag-inheritence' and +`org-exclude-tags-from-inheritence'." + :group 'org-bibtex + :version "25.1" + :package-version '(Org . "8.3") + :type 'boolean) + + (defcustom org-bibtex-type-property-name "btype" "Property in which to store bibtex entry type (e.g., article)." :group 'org-bibtex @@ -332,7 +344,9 @@ This variable is relevant only if `org-bibtex-tags-are-keywords' is t." (append org-bibtex-tags org-bibtex-no-export-tags)) tag)) - (org-get-local-tags-at)))))) + (if org-bibtex-inherit-tags + (org-get-tags-at) + (org-get-local-tags-at))))))) (when type (let ((entry (format "@%s{%s,\n%s\n}\n" type id