[O] Org-file "path"-type links
Hey. New to this list this time around... I've been tinkering with a custom link-type and I'm curious if anyone else is at all interested in it. I use org-mode (among other things) to keep a sort of log or daily journal at work. Things are entered in by date: I have "* 2019" as a top-level head, then "** 2019-07 July" and "*** 2019-07-25 Þursday" (actually not exactly that since I use odd-only mode, but not the point), and so forth. (Note that the headlines are *not* date-links; the docs say that's a Bad Thing.) My formatting is pretty free-form beyond that, and I don't always remember to sub-head subjects below that, or I use plain lists or whatever... also not the point. What matters is that sometimes I *do* make proper sub-headings, and sometimes I may want to link to them. I know I can make a link to [[*Best Firing Ever]] to link to a particular headline, but often there are many headlines with the same text, like " Weekly Shouting at Boss" or something, and [[*Weekly Shouting at Boss]] won't necessarily link to the one I want. I want the one that was under "2019-07-24 Wednesday" for this link, and not any other. I don't know of any way that org-mode has to distinguish such things (apart from "name the headlines uniquely, moron," which to be sure is one way to do it), so I have been making a "path"-type or "tree"-type link. So I can have a hyperlink that links to [[tree:2019*2019-07 July*2019-07-24 Wednesday*Weekly Shouting at Boss][really told him off this time]] and that links to *this* particular headline, following the tree down link by link, separated by *'s. And you can also have a filename, of course, like say [[tree:/home/me/bestofjournal.org::Successes*Solitaire Games*Best One Ever]] or something. The code at this point works, including the store-link code (though adding it in overshadows the default store-link code for org-mode, which might be a problem), but it's still just a PoC, needs documentation, etc. And probably a better name; I have "tree:" as the keyword but it's probably awful... maybe something like "orglink:"? I know there's already a library by that name. I'm just wondering if anyone else thinks this is a good idea. Maybe it's just for my unusual way of using org. There are other ways to do this, probably (maybe a "link-store" function that stores an ordinary org-mode link *and* also creates a unique target at the point?); this is what I did. If I put this up on github or elpa, would anyone else use it? ~mark
Re: [O] Two bibliography slides using org-reveal
Thank you Jens für your hint. I downloaded [1] but when I try M-x load-library followed by org-re-reveal-ref I get "Cannot open load file: No such file or directory, org-re-reveal" although I’ve org-ref installed. What is going wrong? Johannes > Am 25.07.2019 um 19:00 schrieb Jens Lechtenboerger > : > > I created org-re-reveal-ref [1] based on my fork org-re-reveal for > bibliographies with org-ref. I only use it for export to reveal.js and > PDF, but HTML seems fine as well. That package is part of emacs-reveal > [2]. > > Best wishes > Jens > > [1] https://gitlab.com/oer/org-re-reveal-ref > [2] https://gitlab.com/oer/emacs-reveal > > John Kitchin writes: > >> the bibliography export is not too fancy. It is defined in the function >> org-ref-bibliography-format. >> >> I am not sure you can win, for latex export it doesn't make sense to put the >> bibliography link in a heading. you might be able to add a specific reveal >> export >> option to the export function though. >> >> 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 Thu, Jul 25, 2019 at 9:55 AM Johannes Brauer >> wrote: >> >> Yes, I have tried that and indeed then I get only one bib slide. But then, >> in normal Html export, the bibliography appears under the preceding headline, >> that’s ugly. >> >>> Am 25.07.2019 um 14:41 schrieb Fraga, Eric : >>> >>> I have no idea but, on the off-chance, maybe don't make that line a >>> headline? >>> -- >>> Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222
Re: [O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
On 2019-07-25 at 12:24 -04, Joseph Vidal-Rosset wrote... > Documentation to create a todo.org list that provides links to email as > tasks is not seldom on the web. I recommend for example > [[http://pragmaticemacs.com/]]. > > But for gnus-imap-gmail users, it is more difficult to get the same > thing. FYI, here is the mu4e implementation defined so that the standard org-store-link properly work based on msgid: https://github.com/djcb/mu/blob/master/mu4e/org-mu4e.el#L117 When viewing email I use the same keybindings as elswhere, C-l to store link, and C-c C-l to paste it and I get: [[mu4e:msgid:325foo...@mx.google.com][SUBJECT OF EMAIL]] -k.
Re: [O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
Joseph Vidal-Rosset writes: > Le jeu. 07/25/19 juil. 2019 à 05:33:57 , "Fraga, Eric" > a envoyé ce message: > >> Okay, yes, if you move it, the link needs to be updated. I wonder if >> the gnus registery could help with this? But that's well beyond my >> gnus-fu. > > The only mention of gnus registry in my setup is the following one: > > (setq gnus-registry-max-entries 5) > > and, by the way, it is maybe inconsistent with > > (setq gnus-newsgroup-maximum-articles 7) You'd have to put (gnus-registry-initialize) in your gnus.el init file to make use of the registry. And no, I don't think the above settings have anything to do with one another. Eric
Re: [O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
Le jeu. 07/25/19 juil. 2019 à 05:33:57 , "Fraga, Eric" a envoyé ce message: > Okay, yes, if you move it, the link needs to be updated. I wonder if > the gnus registery could help with this? But that's well beyond my > gnus-fu. The only mention of gnus registry in my setup is the following one: (setq gnus-registry-max-entries 5) and, by the way, it is maybe inconsistent with (setq gnus-newsgroup-maximum-articles 7) But without the trick that I just gave, I had no solution, and my knowledge of gnus is too weak to reply about gnus-registry. Best wishes, -- Jo.
Re: [O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
On Thursday, 25 Jul 2019 at 19:24, Joseph Vidal-Rosset wrote: > Of course, INBOX works for you if you do not archive the message in All > emails folder or elsewhere. If you move it from INBOX, in case where you > like to have the cleanest INBOX that is the empty one, you won't get no > more the email via this link. Okay, yes, if you move it, the link needs to be updated. I wonder if the gnus registery could help with this? But that's well beyond my gnus-fu. -- : Professor Eric S Fraga, http://www.homepages.ucl.ac.uk/~ucecesf : PGP/GPG key: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D : Use plain text email when possible: https://useplaintext.email/
Re: [O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
Le jeu. 07/25/19 juil. 2019 à 04:47:14 , "Fraga, Eric" a envoyé ce message: > On Thursday, 25 Jul 2019 at 18:24, Joseph Vidal-Rosset wrote: >> But for gnus-imap-gmail users, it is more difficult to get the same >> thing. > > [...] > >> But I need to change the mention of INBOX in the link to John's >> email. > > Why is that? If I create a link to an email from gmail using %a, this > seems to work (having just tested it). Am I missing something? I don't > often link to gmail messages as they are mostly junk emails (in my > case). I know that gmail does not really have imap folders but uses > tags (of a sort) to make it look like emails are in different folders > (or in more than one folder simultaneously) but INBOX seems to work for > me. > > Just curious. Thanks for your question Eric. :) Of course, INBOX works for you if you do not archive the message in All emails folder or elsewhere. If you move it from INBOX, in case where you like to have the cleanest INBOX that is the empty one, you won't get no more the email via this link. I wanted to have in IMAP the shortest list to see only three folders in my Gnus INBOX [Gmail]/Tous les messages [Gmail]/Corbeille I have defined shortucts: key "Inser" archives email into [Gmail]/Tousles messagesand "Suppr"sends emailinto [Gmail]/Corbeille. The most tricky is to get the Summary [Gmail]/Tous les messages in a reasonable time, because with a lot of emails, Gnus in imap can be too slow. My solution is in this line: (setq gnus-newsgroup-maximum-articles 7) and it works. For people who are reluctant to use offlineimap or mbsync and who therefore prefer Gnus over mu4e , it makes almost the same job, via imap. I can share of course all my setup and I am also curious of improving it. Best wishes, -- Jo.
Re: [O] Two bibliography slides using org-reveal
I created org-re-reveal-ref [1] based on my fork org-re-reveal for bibliographies with org-ref. I only use it for export to reveal.js and PDF, but HTML seems fine as well. That package is part of emacs-reveal [2]. Best wishes Jens [1] https://gitlab.com/oer/org-re-reveal-ref [2] https://gitlab.com/oer/emacs-reveal John Kitchin writes: > the bibliography export is not too fancy. It is defined in the function > org-ref-bibliography-format. > > I am not sure you can win, for latex export it doesn't make sense to put the > bibliography link in a heading. you might be able to add a specific reveal > export > option to the export function though. > > 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 Thu, Jul 25, 2019 at 9:55 AM Johannes Brauer > wrote: > > Yes, I have tried that and indeed then I get only one bib slide. But then, > in normal Html export, the bibliography appears under the preceding headline, > that’s ugly. > > > Am 25.07.2019 um 14:41 schrieb Fraga, Eric : > > > > I have no idea but, on the off-chance, maybe don't make that line a > > headline? > > -- > > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222
Re: [O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
On Thursday, 25 Jul 2019 at 18:24, Joseph Vidal-Rosset wrote: > But for gnus-imap-gmail users, it is more difficult to get the same > thing. [...] > But I need to change the mention of INBOX in the link to John's > email. Why is that? If I create a link to an email from gmail using %a, this seems to work (having just tested it). Am I missing something? I don't often link to gmail messages as they are mostly junk emails (in my case). I know that gmail does not really have imap folders but uses tags (of a sort) to make it look like emails are in different folders (or in more than one folder simultaneously) but INBOX seems to work for me. Just curious. -- Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222
[O] org-links for Gnus in imap with Gmail (for a convenient todo.org list)
Hello, Documentation to create a todo.org list that provides links to email as tasks is not seldom on the web. I recommend for example [[http://pragmaticemacs.com/]]. But for gnus-imap-gmail users, it is more difficult to get the same thing. Here is a the lines of code in my setup (user.el in Kitchin's scimax) that work for gnus in imap: #+BEGIN_SRC elisp ;;capture todo items using C-c c t (define-key global-map (kbd "C-c c") 'org-capture) (setq org-capture-templates '(("t" "todo" entry (file+headline "~/Dropbox/Orgzly/todo.org" "Tasks") "* TODO [#A] %?\n [[~/Dropbox/Orgzly/links.org::%(org-insert-time-stamp (org-read-date nil t \"%:date\"))]] \n* %(org-insert-time-stamp (org-read-date nil t \"%:date\")) %a "))) (defun hs/replace () (interactive) (goto-char 1) (let ((search-invisible t)) (replace-string "gnus:INBOX#" "gnus:%5BGmail%5D/Tous les messages#"))) (define-key global-map (kbd "C-c r") 'hs/replace) (add-hook 'org-capture-prepare-finalize-hook 'hs/replace) (defun my/refile (file headline arg) (let ((pos (save-excursion (find-file file) (org-find-exact-headline-in-buffer headline (org-refile arg nil (list headline file nil pos))) (switch-to-buffer (current-buffer))) (defhydra jo/org-refile-hydra (:foreign-keys run) "Refile" ("l" (my/refile "~/Dropbox/Orgzly/links.org" "Links") "Links") ("j" org-refile-goto-last-stored "Jump to last refile") ("q" nil "cancel")) ;; Or whatever you want your keybinding to be (global-set-key (kbd " r") 'jo/org-refile-hydra/body) (global-set-key (kbd " a") 'org-archive-subtree) ;;refile https://blog.aaronbieber.com/2017/03/19/organizing-notes-with-refile.html (setq org-refile-targets '((org-agenda-files :maxlevel . 2))) (setq org-refile-use-outline-path 'file) (setq org-outline-path-complete-in-steps nil) (setq org-refile-allow-creating-parent-nodes 'confirm) (setq org-refile-targets '((nil :maxlevel . 2) (org-agenda-files :maxlevel . 2))) (setq org-outline-path-complete-in-steps nil) ; Refile in a single go (setq org-refile-use-outline-path t) ; Show full paths for refiling (setq org-refile-targets (quote (("todo.org" :maxlevel . 2) ("links.org" :level . 2) ))) #+END_SRC with any file open in emacs, like for example this email, C-c c t gives the following result that I paste below: #+BEGIN_SRC elisp ** TODO [#A] [[~/Dropbox/Orgzly/links.org::<2019-07-25 jeu.>]] ** <2019-07-25 jeu.> [[file:~/News/drafts/drafts/129]] #+END_SRC Because I like to see my todo list with conky on my wallpaper, I refile the second link into links.org and it is now easy to get immediately from todo.org the correct entry that have the appropriate link in links.org. In Gnus, it is the same thing. For example C-c c t in reading the last email that I received from John Kitchin provides: #+BEGIN_SRC elisp ** TODO [#A] [[~/Dropbox/Orgzly/links.org::<2019-07-25 jeu.>]] ** <2019-07-25 jeu.> [[gnus:INBOX#caj51etqlcftezvpyg0auzzl2hgwvgcoewkem8okznll-es5...@mail.gmail.com][Email from John Kitchin: Re: scimax question]] #+END_SRC But I need to change the mention of INBOX in the link to John's email. Hence the function hs/replace via C-c r with the cursor on the link that gives the wanted result: #+BEGIN_SRC elisp ** TODO [#A] [[~/Dropbox/Orgzly/links.org::<2019-07-25 jeu.>]] ** <2019-07-25 jeu.> [[gnus:%5BGmail%5D/Tous les messages#caj51etqlcftezvpyg0auzzl2hgwvgcoewkem8okznll-es5...@mail.gmail.com][Email from John Kitchin: Re: scimax question]] #+END_SRC and then the email can be archived in Tous les messages, Gnus will find it, via imap.gmail.com . That's it. I hope some of you will find this useful. Let me know. Of course the code must be adapted according to the language of the gmail user, it goes without saying. (In refiling, I do not succeed to get other level that level one for sections, but it is a detail. ) Best wishes, -- Jo.
Re: [O] Two bibliography slides using org-reveal
Am 25.07.2019 um 15:59 schrieb John Kitchin mailto:jkitc...@andrew.cmu.edu>>: the bibliography export is not too fancy. It is defined in the function org-ref-bibliography-format. I am not sure you can win, for latex export it doesn't make sense to put the bibliography link in a heading I am using only Html export (which works correctly) and org-reveal (with 2 bib slides) . you might be able to add a specific reveal export option to the export function though. I haven’t a clue how to do that Johannes On Thu, Jul 25, 2019 at 9:55 AM Johannes Brauer mailto:bra...@nordakademie.de>> wrote: Yes, I have tried that and indeed then I get only one bib slide. But then, in normal Html export, the bibliography appears under the preceding headline, that’s ugly. > Am 25.07.2019 um 14:41 schrieb Fraga, Eric > mailto:e.fr...@ucl.ac.uk>>: > > I have no idea but, on the off-chance, maybe don't make that line a > headline? > -- > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222
Re: [O] Two bibliography slides using org-reveal
the bibliography export is not too fancy. It is defined in the function org-ref-bibliography-format. I am not sure you can win, for latex export it doesn't make sense to put the bibliography link in a heading. you might be able to add a specific reveal export option to the export function though. 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 Thu, Jul 25, 2019 at 9:55 AM Johannes Brauer wrote: > Yes, I have tried that and indeed then I get only one bib slide. But then, > in normal Html export, the bibliography appears under the preceding > headline, that’s ugly. > > > > Am 25.07.2019 um 14:41 schrieb Fraga, Eric : > > > > I have no idea but, on the off-chance, maybe don't make that line a > > headline? > > -- > > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222 > >
Re: [O] Two bibliography slides using org-reveal
Yes, I have tried that and indeed then I get only one bib slide. But then, in normal Html export, the bibliography appears under the preceding headline, that’s ugly. > Am 25.07.2019 um 14:41 schrieb Fraga, Eric : > > I have no idea but, on the off-chance, maybe don't make that line a > headline? > -- > Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222
[O] hwo to use different font size and emphasis in src snippets?
Hi all, I'd like to make my presentations a little more appealing. I've got code snippets like the following: #+begin_src shell % pgbench -i -s 30 -F 100 --foreign-keys -h 127.0.0.1 -U luca pgbench generating data... 10 of 300 tuples (3%) done (elapsed 0.09 s, remaining 2.64 s) 20 of 300 tuples (6%) done (elapsed 0.14 s, remaining 1.94 s) 30 of 300 tuples (10%) done (elapsed 0.18 s, remaining 1.66 s) ... vacuuming... creating primary keys... creating foreign keys... done. #+end_src I would like to: 1) put an emphasis on the command line (first line), let's say to put it in bold; 2) use a smaller font for the command output without reducing the font size of the command line. Of course, the export is in beamer. Is it possible? Any suggestions? Thanks, Luca
Re: [O] Two bibliography slides using org-reveal
I have no idea but, on the off-chance, maybe don't make that line a headline? -- Eric S Fraga via Emacs 27.0.50, Org release_9.2.4-399-g4e6222
[O] Two bibliography slides using org-reveal
Hi, I am not sure wether this is the right place for my question. I am using org-reveal for building reveal.js slides. The last line of my org file is something like that: * bibliography:referenzen.bib Since I am using reveal.js-3.8.0 I get two bibliography slides instead of one at the end of the slide deck. Normal Html export works correctly, there I see only one bibliography header. Any hints what's going wrong? Johannes
Re: [O] from org to openoffice presentations (or make org looks like openoffice)
On Thursday, 25 Jul 2019 at 09:53, Luca Ferrari wrote: > Thanks a lot, I'm refactoring it to my needs but it is a very good > starting point. However, I had to place a > \usepackage{tikz} > in the theme file to make it compile. Yes, indeed; I have that as a default package to load by org for all LaTeX export cases as I use tikz all the time. > Now, the first question is: is there a way I define the image width to > automatically adjust to the slide size? > Something like the following almost work: > > \node[inner sep=0pt,above,left] (logo) at (\paperwidth,8pt) > {\includegraphics[width=\paperwidth]{images/logo.png}}; > > but the image does not keep proportions. It would be better to enlarge > the image from right to left up to all the space before the page > numbering. Any hint? Nothing beyond what you have already done. I am surprised that the image proportions are not preserved. Maybe post a minimal example (including an image)? -- : Professor Eric S Fraga, http://www.homepages.ucl.ac.uk/~ucecesf : Required hieroglyphics follow: ∀ε>0,∃δ>0∋|x-x₀|<δ⇒|f(x)-f(x₀)|<ε : PGP/GPG key: 8F5C 279D 3907 E14A 5C29 570D C891 93D8 FFFC F67D
Re: [O] from org to openoffice presentations (or make org looks like openoffice)
On Wed, Jul 24, 2019 at 2:12 PM Fraga, Eric wrote: > I've attached three files: an org file, the resulting PDF, and a very > minimal beamer theme that may be of use. That theme puts an image (UCL > logo) at the bottom right of the slide and a page number at the bottom > left side. Maybe you can modify this to your satisfaction. Note the > naming of the beamer theme file and how you refer to it in the org file. Thanks a lot, I'm refactoring it to my needs but it is a very good starting point. However, I had to place a \usepackage{tikz} in the theme file to make it compile. Now, the first question is: is there a way I define the image width to automatically adjust to the slide size? Something like the following almost work: \node[inner sep=0pt,above,left] (logo) at (\paperwidth,8pt) {\includegraphics[width=\paperwidth]{images/logo.png}}; but the image does not keep proportions. It would be better to enlarge the image from right to left up to all the space before the page numbering. Any hint? Thanks, Luca