pprevos / emacs-writing-studio

Emacs configuration for authors who research, write and publish articles, books and websites.
https://lucidmanager.org/tags/emacs/
GNU General Public License v3.0
454 stars 27 forks source link

Two suggestions #17

Closed zenny closed 2 months ago

zenny commented 2 months ago

Hi @pprevos

It would be nice to append a para in 06-production.org about the default location of the bib file or to allow user to specify a custom location. Else the reader of your config-book may get confused. The specific locations is as of below:

** EDITED Adding citations
:PROPERTIES:
:CUSTOM_ID: sec:citations
:END:
Citations are the essence of scholarly writing and the currency of an academic career, signifying the influence and impact of your work. Org mode can be your ally in this journey, offering a citation management tool that can read BibTeX, BibLaTex, or CSL files. To start, you'll need to create a bibliography. This can be done manually, or you can link a file from a bibliography management tool like Zotero, as discussed in chapter [[#chap:inspiration]].

#+begin_comment
Zenny: The following paragraph should precede with how to link the bib file, imho because C-c C-c @ reports bibliography missing. At least the users should be able to know the default location or specify custom location.
#+end_comment

When it comes to inserting citations, the ~org-cite-insert~ (=C-c C-x @=) command is your go-to. In /Emacs Writing Studio/, this command opens the Citar menu, allowing you to select one or more publications. To select multiple references, simply use the =TAB= key after each selection. Org mode inserts a citation, which looks something like this: =[cite:@einstein_1905; @newton_1728]=.

Though I pulled your repo, when I tried to load the bib file (which is assigned to library folder, it fails to recognize the location:

Beginning of buffer [2 times]
Wrote /home/zenny/.ihsec/ews/recentf
Beginning of buffer [6 times]
No BibTeX file(s) defined.
You can run the command ‘ews-bibtex-biblio-lookup’ with C-c w b b
No BibTeX file(s) defined.
Quit

So it would be nice to let the user choose the bib files from any directory, imho. Just my two cents. Cheers, /z

zenny commented 2 months ago

I also suggest to change the C-c C-x @ to C-c C-x i for org-cite-insert due to three reasons:

  1. The i part mnemonics insert,
  2. It reduces one less keystroke in odd place (Shift+2 for @) and
  3. The key binding (C-c C-x i) is not yet used.

Even better to reassign to C-c i to be used in the org files only as detailed in https://github.com/emacs-citar/citar/blob/07d2a63c99fe35cbd468f8e6a322de05f1a29469/README.org?plain=1#L116

:bind
(:map org-mode-map :package org ("C-c  i" . #'org-cite-insert)))

Thanks

pprevos commented 2 months ago

Hi Zenny,

You are right that it is a bit an an awkward binding.

C-c C-x @ is the default Org mode keybinding. One of the principles of EWS is not to change default keybindings. Feel free to change it to whatever you please in your personal config.

This will be better explained in the last chapter when completed.