jkitchin / org-ref

org-mode modules for citations, cross-references, bibliographies in org-mode and useful bibtex tools to go with it.
GNU General Public License v3.0
1.36k stars 243 forks source link

org-ref-clean-bibtex-entry will destroy the reference created by doi-utils-add-bibtex-entry-from-doi #143

Closed xarthurx closed 8 years ago

xarthurx commented 8 years ago

So another issue:

I use "doi-utils-add-bibtex-entry-from-doi" to add most of the references that have DOI numbers. But when some paper doesn't, or some are parts of a book, I added the reference manually. Since the format are different, I use "org-ref-clean-bibtex-entry" to make the format homogeneous.

Then, the command will change all the references to a different format (custom ID is changed), and all the original link with "cite:xxx" in the note.org file is not working since the ID is changed.

xarthurx commented 8 years ago

Well, I figured out the command can be used on single entries. But is it better when calling "doi-utils-add-bibtex-entry-from-doi", the command will run the "clean" command automatically so that the entry it added to the reference will be a cleaned one?

jkitchin commented 8 years ago

doi-utils-add-bibtex-entry-from-doi does run the clean functions.

How were you running org-ref-clean-bibtex-entry on all the entries. It should only affect the entry at point.

xarthurx commented 8 years ago

This is the one added by doi-utils-add-bibtex-entry-from-doi:

@article{yoshida-2015-archit, author = {Hironori Yoshida and Syunsuke Igarashi and Takeo Igarashi and Yusuke Obuchi and Yosuke Takami and Jun Sato and Mika Araki and Masaaki Miki and Kosuke Nagata and Kazuhide Sakai}, title = {Architecture-Scale Human-Assisted Additive Manufacturing}, journal = {TOG}, volume = 34, number = 4, pages = {88:1-88:8}, year = 2015, doi = {10.1145/2766951}, url = {http://dx.doi.org/10.1145/2766951}, date_added = {Sun Oct 25 15:01:03 2015},

This is the same one after I run "clean" command: @article{yoshida15_archit_scale_human_assis_addit_manuf, author = {Hironori Yoshida and Syunsuke Igarashi and Takeo Igarashi and Yusuke Obuchi and Yosuke Takami and Jun Sato and Mika Araki and Masaaki Miki and Kosuke Nagata and Kazuhide Sakai}, title = {Architecture-Scale Human-Assisted Additive Manufacturing}, journal = {TOG}, volume = 34, number = 4, pages = {88:1-88:8}, year = 2015, doi = {10.1145/2766951}, url = {http://dx.doi.org/10.1145/2766951}, date_added = {Sun Oct 25 15:01:03 2015},

The custom ID is changed.

On 17 February 2016 at 21:43, John Kitchin notifications@github.com wrote:

doi-utils-add-bibtex-entry-from-doi does run the clean functions.

How were you running org-ref-clean-bibtex-entry on all the entries. It should only affect the entry at point.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/143#issuecomment-185517133.

MA Zhao

"SAVE PAPER - PLEASE THINK BEFORE YOU PRINT!"

jkitchin commented 8 years ago

why are you running clean again?

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Wed, Feb 17, 2016 at 9:46 PM, X.Arthur notifications@github.com wrote:

This is the one added by doi-utils-add-bibtex-entry-from-doi:

@article{yoshida-2015-archit, author = {Hironori Yoshida and Syunsuke Igarashi and Takeo Igarashi and Yusuke Obuchi and Yosuke Takami and Jun Sato and Mika Araki and Masaaki Miki and Kosuke Nagata and Kazuhide Sakai}, title = {Architecture-Scale Human-Assisted Additive Manufacturing}, journal = {TOG}, volume = 34, number = 4, pages = {88:1-88:8}, year = 2015, doi = {10.1145/2766951}, url = {http://dx.doi.org/10.1145/2766951}, date_added = {Sun Oct 25 15:01:03 2015},

This is the same one after I run "clean" command: @article{yoshida15_archit_scale_human_assis_addit_manuf, author = {Hironori Yoshida and Syunsuke Igarashi and Takeo Igarashi and Yusuke Obuchi and Yosuke Takami and Jun Sato and Mika Araki and Masaaki Miki and Kosuke Nagata and Kazuhide Sakai}, title = {Architecture-Scale Human-Assisted Additive Manufacturing}, journal = {TOG}, volume = 34, number = 4, pages = {88:1-88:8}, year = 2015, doi = {10.1145/2766951}, url = {http://dx.doi.org/10.1145/2766951}, date_added = {Sun Oct 25 15:01:03 2015},

The custom ID is changed.

On 17 February 2016 at 21:43, John Kitchin notifications@github.com wrote:

doi-utils-add-bibtex-entry-from-doi does run the clean functions.

How were you running org-ref-clean-bibtex-entry on all the entries. It should only affect the entry at point.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/143#issuecomment-185517133.

MA Zhao

"SAVE PAPER - PLEASE THINK BEFORE YOU PRINT!"

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/143#issuecomment-185517835.

xarthurx commented 8 years ago

Well, it just because the first time I run it it changed all the entries in the reference. Though I cannot reproduce the problem and I don't need to run on a entry twice, it might just be a good idea that re-run the command will not change the entry (say if "doi" command has run once) and make all the reference the same format -- with "-" between the words, or "_" between the words.

On 17 February 2016 at 21:47, John Kitchin notifications@github.com wrote:

why are you running clean again?

John


Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu

On Wed, Feb 17, 2016 at 9:46 PM, X.Arthur notifications@github.com wrote:

This is the one added by doi-utils-add-bibtex-entry-from-doi:

@article{yoshida-2015-archit, author = {Hironori Yoshida and Syunsuke Igarashi and Takeo Igarashi and Yusuke Obuchi and Yosuke Takami and Jun Sato and Mika Araki and Masaaki Miki and Kosuke Nagata and Kazuhide Sakai}, title = {Architecture-Scale Human-Assisted Additive Manufacturing}, journal = {TOG}, volume = 34, number = 4, pages = {88:1-88:8}, year = 2015, doi = {10.1145/2766951}, url = {http://dx.doi.org/10.1145/2766951}, date_added = {Sun Oct 25 15:01:03 2015},

This is the same one after I run "clean" command: @article{yoshida15_archit_scale_human_assis_addit_manuf, author = {Hironori Yoshida and Syunsuke Igarashi and Takeo Igarashi and Yusuke Obuchi and Yosuke Takami and Jun Sato and Mika Araki and Masaaki Miki and Kosuke Nagata and Kazuhide Sakai}, title = {Architecture-Scale Human-Assisted Additive Manufacturing}, journal = {TOG}, volume = 34, number = 4, pages = {88:1-88:8}, year = 2015, doi = {10.1145/2766951}, url = {http://dx.doi.org/10.1145/2766951}, date_added = {Sun Oct 25 15:01:03 2015},

The custom ID is changed.

On 17 February 2016 at 21:43, John Kitchin notifications@github.com wrote:

doi-utils-add-bibtex-entry-from-doi does run the clean functions.

How were you running org-ref-clean-bibtex-entry on all the entries. It should only affect the entry at point.

— Reply to this email directly or view it on GitHub <https://github.com/jkitchin/org-ref/issues/143#issuecomment-185517133 .

MA Zhao

"SAVE PAPER - PLEASE THINK BEFORE YOU PRINT!"

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/143#issuecomment-185517835.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/143#issuecomment-185518167.

MA Zhao

"SAVE PAPER - PLEASE THINK BEFORE YOU PRINT!"

jkitchin commented 8 years ago

the keys are all determined by a bunch of bibtex variables, e.g. https://github.com/jkitchin/jmax/blob/master/jmax-org.el#L491

if you make keys not consistent with those rules, the key will change. You can customize what the clean function does in the variable org-ref-clean-bibtex-entry-hook. see https://github.com/jkitchin/org-ref/blob/1d7775b77d3041d08360136de6f7b9d3956af79b/org-ref.el#L314

if you want a different cleaning behavior, you can modify it.

xarthurx commented 8 years ago

Got it. Thank you.

On 17 February 2016 at 21:59, John Kitchin notifications@github.com wrote:

the keys are all determined by a bunch of bibtex variables, e.g. https://github.com/jkitchin/jmax/blob/master/jmax-org.el#L491

if you make keys not consistent with those rules, the key will change. You can customize what the clean function does in the variable org-ref-clean-bibtex-entry-hook. see https://github.com/jkitchin/org-ref/blob/1d7775b77d3041d08360136de6f7b9d3956af79b/org-ref.el#L314

if you want a different cleaning behavior, you can modify it.

— Reply to this email directly or view it on GitHub https://github.com/jkitchin/org-ref/issues/143#issuecomment-185520896.

MA Zhao

"SAVE PAPER - PLEASE THINK BEFORE YOU PRINT!"