Re: forms and org-mode
So you are asking about using Emacs forms for data input into an org table? Just not clear on what exactly your asking about. Jude DaShiell writes: > A table with a time stamp column, a text column for notes and an interval > column rounded to nearest hour. Any statistics to be calculated on that > intervals column. > > > On Sat, 21 Aug 2021, Ihor Radchenko wrote: > >> Can you elaborate? >> >>
Re: forms and org-mode
Jude DaShiell writes: > A table with a time stamp column, a text column for notes and an interval > column rounded to nearest hour. Any statistics to be calculated on that > intervals column. I am still not sure if I understand you clearly. Does clocktable do what you want? Best, Ihor
Re: forms and org-mode
A table with a time stamp column, a text column for notes and an interval column rounded to nearest hour. Any statistics to be calculated on that intervals column. On Sat, 21 Aug 2021, Ihor Radchenko wrote: > Can you elaborate? > >
Re: forms and org-mode
Can you elaborate?
forms and org-mode
Would it even be useful to write a set of forms files and use those to populate an org-mode table?
Functions for inserting name of code blocks
This thread asks for feedback on functions that I've created. These 2 functions have to do with inserting, at point, the name of a code block which exists in the current buffer or in the library of babel. You can find the functions below. #+begin_src elisp (defun my/org-babel-insert-name-src-block-current-buffer () "Prompts for the name of a code block in the current buffer and insert it at point." (interactive) (let* ((names (org-babel-src-block-names)) (selected-name (completing-read "Names: " names nil t))) (insert selected-name))) #+end_src #+begin_src elisp (define-key org-mode-map (kbd "C-c M-n b") 'my/org-babel-insert-name-src-block-current-buffer) #+end_src #+begin_src elisp (defun my/org-babel-insert-name-src-block-lob () "Prompts for the name of a code block in `org-babel-library-of-babel' and insert it at point." (interactive) (unless org-babel-library-of-babel (error "The variable \"org-babel-library-of-babel\" is empty.")) (let* ((names (mapcar 'car org-babel-library-of-babel)) (selected-name (completing-read "Names: " names nil t))) (insert selected-name))) #+end_src #+begin_src elisp (define-key org-mode-map (kbd "C-c M-n l") 'my/org-babel-insert-name-src-block-lob) #+end_src
[org-cite] citations in property drawers?
So this is a tentative request/question; I'm not really sure the best approach here. This is based on discussion with one of the org-roam-bibtex developers about what the proper way to indicate an org-roam note is a bibliographic note; e.g. a note about a bibliographic source. Traditionally in org-roam, that is in a property drawer; like: :ROAM_REFS: cite:wallace-wells2019 That is using org-ref syntax there. So the obvious question is should one just put an org-cite citation there to do the same thing? Right now, the answer is clearly no, since they aren't allowed in property drawers. But perhaps they should be, just as any link can be? Except if they are, I recognize, they need to be treated as special cases; e.g ignored for the purposes of export and such. WDYT? Bruce
Re: [wip-cite-new] Merging tomorrow?
On Friday, 20 Aug 2021 at 09:47, Bruce D'Arcus wrote: > Though for ODT, you might want to look into oc-csl; citeproc-el just > got improved ODF support. So I decided to try this out. Not working for me, but early days in debugging. For some reason, when I export to ODT, the "format" for the export is "org" and not "org-odt" in citeproc, specifically in the call to =citeproc-formatter-for-format=. I haven't figured out how this format is set; early days, as I said. It's now the weekend and I need a break but if I learn anything, I'll update on the list. -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-628-g366444 : Latest paper written in org: https://arxiv.org/abs/2106.05096
Re: [wip-cite-new] Merging tomorrow?
On Fri, Aug 20, 2021 at 11:21 AM John Kitchin wrote: > I think bibtex-completion is agnostic of ivy or helm, and doesn't require > either of them to work. You can use it for candidates to selectrum if you > want, and the other many features it offers for notes, pdf, etc... Sorry; meant to send that off-list. But yes, to clarify: bibtex-completion is independent of the frontend. I was mostly removing my dependency on it to get some of the benefits of the new parsebib release (namely CSL JSON support), and because I had some ideas I wanted to explore. But in any case, bibtex-completion provides no front-end; you still need a completing-read function for that, and I think bibtex-actions provides a good one. Also, you need to wrap it's functions to get interactive commands.
Re: [wip-cite-new] Merging tomorrow?
I think bibtex-completion is agnostic of ivy or helm, and doesn't require either of them to work. You can use it for candidates to selectrum if you want, and the other many features it offers for notes, pdf, etc... On Fri, Aug 20, 2021 at 11:07 AM Bruce D'Arcus wrote: > I think so. > > I actually just started the process of removing the bibtex-completion > dependency. > > Give it a try in any case. It should work well with org-cite, and you > can even use pieces of org-ref-cite if you prefer that to my > (currently) more minimal embark-based approach. > > On Fri, Aug 20, 2021 at 10:53 AM Eric S Fraga wrote: > > > > Bruce, > > > > off-list, I notice that bibtex-actions has been updated. I have been > > using bibtex-completions but as I now longer use either ivy or helm, > > having switched to selectrum, I should probably switch to your > > package. Would this be a correct view/conclusion? > > > > Thank you, > > eric > > > > -- > > : Professor Eric S Fraga > > : Fresa black box optimization: doi:10.5281/zenodo.5045812 > > : PGP/GnuPG key: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D > > > > Latest publications: doi:10.3303/CET2186011 & arxiv:2106.05096 > >
[SOLVED] Re: [QUESTION] Add advice on command org-add-note not working
Thanks Samuel, using `org-store-log-note’ indeed solved the problem. Great solution. > On Aug 20, 2021, at 4:45 PM, Samuel Loury wrote: > > "Christopher M. Miles" writes: > >> <#secure method=pgpmime mode=sign> > > Beware this did not actually sign your message. > >> I have following advice code: >> >> #+begin_src emacs-lisp >> (defun my/org-add-note--auto-add-tag () >> "Auto add tag 'LOG' when add note log." >> (org-back-to-heading) >> ;; DEBUG: the following code is not executed. >> (message "DEBUG") >> (require 'seq) >> (org-set-tags (seq-uniq (cons "LOG" (org-get-tags nil t) >> >> (advice-add 'org-add-note :after #'my/org-add-note--auto-add-tag) >> #+end_src >> >> With Emacs Edebug, I found it only executed to ~(org-back-to-heading)~, then >> stopped. The following >> "DEBUG" message is not printed and tag "LOG" is not added. >> >> Does anybody have some clue for this issue? > > `org-add-note` only sets up a side buffer to write the content of the > note. The "go back to the heading to actually write the note" is done by > `org-store-log-note`, invoked using C-c C-c on your note. > > So it is normal that `org-back-to-heading` fails in the org-note buffer > that indeed does not have a heading. > > Hint: press p when in edebug session to find out in which buffer context > the code will apply. > > I just tried applying the advice to `org-store-log-note` instead of > `org-add-note` and it worked fine :-). > > My best, > -- > Konubinix > GPG Key: 7439106A > Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
Re: [wip-cite-new] Merging tomorrow?
I think so. I actually just started the process of removing the bibtex-completion dependency. Give it a try in any case. It should work well with org-cite, and you can even use pieces of org-ref-cite if you prefer that to my (currently) more minimal embark-based approach. On Fri, Aug 20, 2021 at 10:53 AM Eric S Fraga wrote: > > Bruce, > > off-list, I notice that bibtex-actions has been updated. I have been > using bibtex-completions but as I now longer use either ivy or helm, > having switched to selectrum, I should probably switch to your > package. Would this be a correct view/conclusion? > > Thank you, > eric > > -- > : Professor Eric S Fraga > : Fresa black box optimization: doi:10.5281/zenodo.5045812 > : PGP/GnuPG key: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D > > Latest publications: doi:10.3303/CET2186011 & arxiv:2106.05096
Re: [wip-cite-new] Merging tomorrow?
On Friday, 20 Aug 2021 at 09:47, Bruce D'Arcus wrote: > Though for ODT, you might want to look into oc-csl; citeproc-el just > got improved ODF support. Thank you for the heads up on this. Looks promising for those that regularly export to ODT! In my case, I just need a quick and dirty draft so that I can get the core of the text into a Word document being worked on by several people. I hate writing in a word processor (my fingers just know Emacs so I often end up deleting whole sections of text when I type C-x... not to mention C-q ;-)) so prefer doing the bulk of the writing in org. Once in the Word document, references etc. will be re-formatted manually by others. Thanks again, eric -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-625-ge7454c : Latest paper written in org: https://arxiv.org/abs/2106.05096
Re: [wip-cite-new] Merging tomorrow?
Though for ODT, you might want to look into oc-csl; citeproc-el just got improved ODF support. https://github.com/andras-simonyi/citeproc-el/pull/45 On Fri, Aug 20, 2021 at 9:46 AM Eric S Fraga wrote: > > Ignore my question. The following works (had to look at the source, > which I should have done in the first place, of course ): > > #+cite_export: basic numeric nb > > Thank you and back to your normal programme ... ;-) > > -- > : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-625-ge7454c > : Latest paper written in org: https://arxiv.org/abs/2106.05096 >
Re: [wip-cite-new] Merging tomorrow?
Ignore my question. The following works (had to look at the source, which I should have done in the first place, of course ): #+cite_export: basic numeric nb Thank you and back to your normal programme ... ;-) -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-625-ge7454c : Latest paper written in org: https://arxiv.org/abs/2106.05096
Re: [wip-cite-new] Merging tomorrow?
Hello all, A quick question: I am exporting to ODT and am happy with the basic cite exporter. I want numeric citations. Does oc-basic allow me to somehow specify that the reference (in the text) be numeric by default and not authors and year? I can use [@cite/nb:...] with #+cite-export: basic numeric but if I forget the /nb, I get (author year) in the text. Am I missing something obvious? The documentation is obviously still lacking (not a complaint, just reality). Thank you, eric PS - I normally export to LaTeX which is working just fine, by the way! -- : Eric S Fraga via Emacs 28.0.50, Org release_9.4.6-625-ge7454c : Latest paper written in org: https://arxiv.org/abs/2106.05096
Bug: org-src-font-lock-fontify-block should be wrapped with save-match-data [9.3.7 (9.3.7-4-gba6ca7-elpaplus @ mixed installation! /mnt/c/Users/toz/Weiterbildung/Soft/Emacs/ and /mnt/c/Users/toz/.emac
~org-src-font-lock-fontify-block~ modifies ~match-data~ through the fontification of the temporary source buffer. But ~org-src-font-lock-fontify-block~ is also called in ~org-fontify-meta-lines-and-blocks-1~ by ~font-lock-fontify-region~. There it puts the text property ~font-lock-multiline~ on some text from the beginning up to the end of the last match in the Org buffer. Since the source buffer is smaller than the Org buffer ~match-beginning~ is smaller than it should be. This can slow down editing operations in org-mode with large source blocks to an extent to which org-mode becomes unusable. An easy workaround is: #+begin_src emacs-lisp (defun org+-with-save-match-data (fun &rest args) "Run FUN with ARGS but save `match-data'." (save-match-data (apply fun args))) (advice-add 'org-src-font-lock-fontify-block :around #'org+-with-save-match-data) #+end_src Emacs : GNU Emacs 27.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, cairo version 1.16.0) of 2020-09-19 Package: Org mode version 9.3.7 (9.3.7-4-gba6ca7-elpaplus @ mixed installation! /mnt/c/Users/toz/Weiterbildung/Soft/Emacs/ and /mnt/c/Users/toz/.emacs.d/elpa/org-plus-contrib-20200615/)
Re: [QUESTION] Add advice on command org-add-note not working
"Christopher M. Miles" writes: > <#secure method=pgpmime mode=sign> Beware this did not actually sign your message. > I have following advice code: > > #+begin_src emacs-lisp > (defun my/org-add-note--auto-add-tag () > "Auto add tag 'LOG' when add note log." > (org-back-to-heading) > ;; DEBUG: the following code is not executed. > (message "DEBUG") > (require 'seq) > (org-set-tags (seq-uniq (cons "LOG" (org-get-tags nil t) > > (advice-add 'org-add-note :after #'my/org-add-note--auto-add-tag) > #+end_src > > With Emacs Edebug, I found it only executed to ~(org-back-to-heading)~, then > stopped. The following > "DEBUG" message is not printed and tag "LOG" is not added. > > Does anybody have some clue for this issue? `org-add-note` only sets up a side buffer to write the content of the note. The "go back to the heading to actually write the note" is done by `org-store-log-note`, invoked using C-c C-c on your note. So it is normal that `org-back-to-heading` fails in the org-note buffer that indeed does not have a heading. Hint: press p when in edebug session to find out in which buffer context the code will apply. I just tried applying the advice to `org-store-log-note` instead of `org-add-note` and it worked fine :-). My best, -- Konubinix GPG Key: 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A signature.asc Description: PGP signature