all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: org-bibtex manual
@ 2023-07-20 18:42 Ypo
  2023-07-20 19:00 ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Ypo @ 2023-07-20 18:42 UTC (permalink / raw)
  To: yantar92, Org-mode

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

Hi Ihor.

Then, is it not possible to customize the entry generated with 
org-bibtex-create?

Bests


> >/#+begin_src emacs-lisp/
> >/(defun my-org-bibtex-headline-format (entry)/
> >/  "Custom function to generate the headline text for org-bibtex-write."/
> >/  (let* ((title (cdr (assoc :title entry)))/
> >/         (author (cdr (assoc :author entry))))/
> >/    (concat "Mi encabezado personalizado: " title " - " author)))/
> >
> >/(setq org-bibtex-headline-format #'my-org-bibtex-headline-format)/
> >/#+end_src/
>
> This is correct, but this customization only works in
> `org-bibtex-write', which works together with `org-bibtex-read-buffer' /
> `org-bibtex-read-file'.
>
> `org-bibtex-create' hard-codes heading to be the same with BiBTeX :title
> field.
>
> Yes, org-bibtex is not very polished.

[-- Attachment #2: Type: text/html, Size: 1222 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Re: org-bibtex manual
@ 2023-07-16 20:19 Ypo
  2023-07-16 20:28 ` Ihor Radchenko
  2023-07-16 20:34 ` Ihor Radchenko
  0 siblings, 2 replies; 10+ messages in thread
From: Ypo @ 2023-07-16 20:19 UTC (permalink / raw)
  To: yantar92, Org-mode

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

Thanks, Ihor.

I would like to customize the name of the heading. I think it should be 
customized this function: "Org Bibtex Headline Format Function".

Is there a guide to do this?

I can see the default is:

#[257 "\300\x01\236A\207"
       [:title]
       3 "\n\n(fn ENTRY)"]


But I don't know how to customize it.

ChatGPT says:

"Unless you are an advanced Emacs Lisp developer and have a specific 
need to work with byte-compiled code, you generally don't need to 
interact with or modify this representation directly. Instead, you can 
work with the function using its regular name and definition."


And ChatGPT offers me this alternative, which doesn't seem to work (BTW, 
I am not able to install asoc.el):

#+begin_src emacs-lisp
(defun my-org-bibtex-headline-format (entry)
   "Custom function to generate the headline text for org-bibtex-write."
   (let* ((title (cdr (assoc :title entry)))
          (author (cdr (assoc :author entry))))
     (concat "Mi encabezado personalizado: " title " - " author)))

(setq org-bibtex-headline-format #'my-org-bibtex-headline-format)
#+end_src


Best regards

[-- Attachment #2: Type: text/html, Size: 2247 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread
* org-bibtex manual
@ 2023-07-15 22:59 Ypo
  2023-07-16 10:00 ` Ihor Radchenko
  0 siblings, 1 reply; 10+ messages in thread
From: Ypo @ 2023-07-15 22:59 UTC (permalink / raw)
  To: Org-mode

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

Hi

I have been reading about org-bibtex, and I think the mail list were 
right when advised it to me 
(https://lists.gnu.org/archive/html/emacs-orgmode/2021-10/msg00621.html).

Now... I would like to start using it. I have seen it has a kind of 
org-capture template (M-x org-bibtex-create-in-current-entry).

If I wanted to add more properties:

- How should the different properties be named and filled to work correctly?

- Should the names of the properties be exactly like in Bibtex?

- Are there any existing org-capture templates with the properties each 
entry type could have? Or could you advise a manual of bibtex to create 
myself some complete templates?


Thanks!


[-- Attachment #2: Type: text/html, Size: 1613 bytes --]

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

end of thread, other threads:[~2023-07-25 10:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-20 18:42 org-bibtex manual Ypo
2023-07-20 19:00 ` Ihor Radchenko
2023-07-20 19:33   ` Ypo
2023-07-21  7:42     ` [FR] Respect `org-bibtex-headline-format-function' in `org-bibtex-create' (was: org-bibtex manual) Ihor Radchenko
  -- strict thread matches above, loose matches on Subject: below --
2023-07-16 20:19 org-bibtex manual Ypo
2023-07-16 20:28 ` Ihor Radchenko
2023-07-25 10:53   ` Ihor Radchenko
2023-07-16 20:34 ` Ihor Radchenko
2023-07-15 22:59 Ypo
2023-07-16 10:00 ` Ihor Radchenko

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.