Re: [O] newbye questions [the nnir-article-group issue]
alain.coch...@unistra.fr writes: >>Fran?ois Patte writes: >> >>> Le 05/06/2017 ? 12:07, Eric Abrahamsen a ?crit : Fran?ois Patte writes: > Le 05/06/2017 ? 01:33, Eric Abrahamsen a ?crit : >> Fran?ois Patte writes: >> >>> Bonjour, >>> >>> Ijust discovered org-mode for emacs and I want to explore the >>> capabilities of this mode for LaTeX documents. >>> >>> I have a few preliminary questions: >>> >>> 1- I installed org-mode from ELPA and I get a warning message >>> when I open a *.org file: >>> Eager macro-expansion failure: (error "Autoloading failed to >>> define function nnir-article-group") >>> >>> What does it mean and how to get rid of this message. [...] > I certainly don't have more experience, but maybe it will help if I > report my own. > > I have the very same problem with the following configuration: > > Org mode version 9.0.8 (9.0.8-elpa @ > /home/cochard/.emacs.d/elpa/org-20170606/) > > GNU Emacs 24.5.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.12) of > 2015-05-07 on buildvm-08.phx2.fedoraproject.org > > 'uname -a' gives: Linux frac.u-strasbg.fr 4.1.13-100.fc21.x86_64 #1 > SMP Tue Nov 10 13:13:20 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux > > I've had this problem since I updated org ELPA on 24 dec 2016 (NB: I > have not changed my GNU emacs version or GNU/Linux distribution). > > > I performed the following tests (all independently from one another), > all with a void .emacs file. > > (1) With 'emacs --no-site-file' > > -> the error is present. > > (2) With 'emacs --no-site-file' > > and after commenting the line > > (autoload 'nnir-article-group "nnir" nil nil 'macro) > > in file /usr/share/emacs/24.5/lisp/gnus/gnus-sum.el (after having > gunzip'ed it) and also after having hidden the corresponding .elc file > > -> the error is not present. > > (3) With 'emacs --no-site-file --no-site-lisp' > > -> the error is not present. > > (4) With 'emacs --no-site-file' > > and after hiding files nnir.el and nnir.elc, which are in dir > /usr/share/emacs/site-lisp/gnus-bonus > > -> the error is not present. > > The begining of file /usr/share/emacs/site-lisp/gnus-bonus/ is > > ;;; nnir.el --- search mail with various search engines -*- coding: > iso-8859-1 -*- > ;; Copyright (C) 1998 Kai Großjohann > > ;; $Id: nnir.el,v 1.1.1.1 2003-04-04 20:16:09 lolando Exp $ > > This file contains: (require 'gnus-sum) That was very useful, thanks for the detailed report! Looks like it's the same as this: https://bugzilla.redhat.com/show_bug.cgi?id=1177978 Looks like uninstalling an emacs-goodies package might do the trick? Anyway, you're meant to be loading nnir.el from emacs//lisp/gnus/nnir.el, not site/lisp/gnus-bonus. Eric
Re: [O] Org Protocol error, does not recognize template
> Samuel W Flint writes: SF> Hello, I have an issue with org-protocol at the moment. If SF> using new-style links, one of my templates is not recognized. SF> If I try the following link: SF> org-protocol://capture?template=b&title=FlintFam.org+Home&url=http%3A%2F%2Fflintfam.org SF> I get an error: SF> *ERROR*: Capture template ‘b’: nil As it turns out, it can't find that template in any situation (including if it's called accurately). org-capture-templates is set as follows: (setq org-capture-templates `(("a" "Create Appointment" entry (file+olp "~/org/agenda.org" "Main Agenda, including diary" "Current") (file "~/.emacs.d/org-capture-templates/appointment-template.org") :empty-lines 1 :prepend nil) ("t" "TODO Items") ("tt" "Standard TODO" entry (file+headline "~/org/main.org" "To Do") (file "~/.emacs.d/org-capture-templates/todo-template.org") :empty-lines 1) ("td" "Deadline TODO" entry (file+headline "~/org/main.org" "To Do") (file "~/.emacs.d/org-capture-templates/todo-deadline-template.org") :empty-lines 1) ("tl" "Linked TODO" entry (file+headline "~/org/main.org" "To Do") (file "~/.emacs.d/org-capture-templates/todo-link-template.org") :empty-lines 1) ("n" "Notes") ("nn" "General Notes" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/notes-journal-template.org") :empty-lines 1) ("nl" "Linked Note" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/linked-note-journal-template.org") :empty-lines 1) ("nq" "Quoting Note" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/quoting-note-journal-template.org") :empty-lines 1) ("nt" "Linked/Quoted Notes" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/technical-journal-template.org") :empty-lines 1) ("nd" "Note on Date" entry (file+datetree+prompt ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/notes-journal-template.org") :empty-lines 1) ("nc" "Clocking Notes") ("ncn" "General Notes" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/notes-journal-template-clocking.org") :empty-lines 1) ("ncl" "Linked Note" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/linked-note-journal-template-clocking.org") :empty-lines 1) ("ncq" "Quoting Note" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/quoting-note-journal-template-clocking.org") :empty-lines 1) ("nct" "Linked/Quoted Notes" entry (file+datetree ,(format-time-string "~/org/notes/%Y.org")) (file "~/.emacs.d/org-capture-templates/technical-journal-template-clocking.org") :empty-lines 1) ("A" "Assignment" entry (file "~/org/school.org") (file "~/.emacs.d/org-capture-templates/assignment-template.org") :empty-lines 1) ("j" "Journal Entry" entry (file+datetree ,(format-time-string "~/org/journal/%Y.org.gpg")) (file "~/.emacs.d/org-capture-templates/journal-template.org") :empty-lines 1) ("c" "calfw2org" entry (file+olp "~/org/agenda.org" "Main Agenda, including diary" "Current") (file "~/.emacs.d/org-capture-templates/clfw-template.org") :empty-lines 1) ("b" "Bookmark" item (file+olp "~/org/bookmarks.org" "Unsorted Bookmarks") "%a" :immediate-finish t) ("m" "Mail Message Follow-up" entry (file+olp "~/org/agenda.org" "Main Agenda, including diary" "Mail Message Follow-up") (file "~/.emacs.d/org-capture-templates/mail-followup-template.org") :immediate-finish t :empty-lines 1))) SF> What can I do to fix this? SF> Thanks, SF> Sam Flint SF> -- Samuel W. Flint 4096R/266596F4 (9477 D23E 389E 40C5 2F10 DE19 SF> 68E5 318E 2665 96F4) λs.(s s) λs.(s s) -- Samuel W. Flint 4096R/266596F4 (9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4) λs.(s s) λs.(s s)
[O] Org Protocol error, does not recognize template
Hello, I have an issue with org-protocol at the moment. If using new-style links, one of my templates is not recognized. If I try the following link: org-protocol://capture?template=b&title=FlintFam.org+Home&url=http%3A%2F%2Fflintfam.org I get an error: *ERROR*: Capture template ‘b’: nil What can I do to fix this? Thanks, Sam Flint -- Samuel W. Flint 4096R/266596F4 (9477 D23E 389E 40C5 2F10 DE19 68E5 318E 2665 96F4) λs.(s s) λs.(s s)
Re: [O] Add ob-sclang.el for sclang Org-mode babel support in contrib/
Yeah, I have used to contrib to org-mode, but need to sign FSF papers spend my time, and I don't know how. So I decide to move code in `contrib/`. When I back home, I will try to sign FSF papers, because I have time and fixed location. If I move code into `contrib/`, do I need to do more in this code? I will add `lexical-binding`, but don't know how to write test for this. Could org-mode team pull branch code on my github repo directory? Or should I send a patch from `git format-patch`? [stardiviner] GPG key ID: 47C32433 IRC(freeenode): stardiviner Twitter: @numbchild Key fingerprint = 9BAA 92BC CDDD B9EF 3B36 CB99 B8C4 B8E5 47C3 2433 Blog: http://stardiviner.github.io/ On Sat, Jun 10, 2017 at 4:17 PM, Nicolas Goaziou wrote: > Hello, > > "numbch...@gmail.com" writes: > > > Here is my branch > > https://github.com/stardiviner/org-mode/tree/feature/ob-sclang > > Merge this branch? > > Thank you for your work. > > I'd like to refrain more packages to contrib, unless the intent is to > eventually merge them into core later. > > However, I think this can go into core. Would you like to clean it up > a bit, activate lexical-binding, provide some tests, and send a patch > (using git format-patch)? > > You will need to sign FSF papers to do that, if you haven't done > already. If you are willing to do this, we can also move your library to > "contrib/" temporarily. > > Regards, > > -- > Nicolas Goaziou >
Re: [O] Custom keymaps on org blocks
In case anyone would like to try this themselves, I documented what I tried here: http://kitchingroup.cheme.cmu.edu/blog/2017/06/10/Adding-keymaps-to-src-blocks-via-org-font-lock-hook/ 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 Sat, Jun 10, 2017 at 9:58 AM, John Kitchin wrote: > > Nicolas Goaziou writes: > > > Hello, > > > > John Kitchin writes: > > > >> On the other hand, there are times when I am working on a document that > has > >> a lot of short code blocks, e.g. for lecture notes or blog posts, where > it > >> is sufficiently tedious to me to switch in and out of the special edit > mode > >> that I wanted to try this solution out, and it became clear you can't > >> really try it out without modifying the core org code that does the > >> font-locking on a block. > > > > Are you sure about it? There are two hooks related to fontification: > > `org-font-lock-set-keywords-hook' and `org-font-lock-hook'. I'm > > surprised none can help you in this case. > > You are totally right on this. I can use org-font-lock-hook to take care > of this. Thanks for the pointer. > > > > >> I don't think we have to go so far as to say we make multiple major mode > >> keybindings available, so much as context specific keybindings available > >> where there is value in it. We already have this in org-speed keys for > >> example, and even these can be context specific to do different things > on > >> headings (even different things on headings with specific properties) > and > >> blocks ( > >> http://kitchingroup.cheme.cmu.edu/blog/2016/12/22/Context- > specific-org-mode-speed-keys/ > >> ). > > > > Neat hack. > > Thanks! > > > > >> If there was a change to org to enable this, I wouldn't expect the core > to > >> change behavior for anyone, it would just make it possible for users to > >> change this if they wanted to. The same way they can customize the face > of > >> a code block for different languages. > > > > Fair enough. Would you want to provide a proper patch? > > With the hook I don't think it is necessary. Thanks for all the > discussion though (everyone) it was helpful to think it through. > > > > Thank you. > > > > > > Regards, > > > -- > 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 >
Re: [O] org to static site?
On 06/10/2017 05:21 AM, Nicolas Goaziou wrote: > Hello, > > Scott Randby writes: > >> On 06/05/2017 05:16 PM, Nick Dokos wrote: > >>> Can this paragraph please be added to >>> http://orgmode.org/worg/org-quotes.html? >>> It certainly added a smile to my day. >> >> Sure, it can be added. I'm glad you liked it. > > I added it. Thank you. Just one comment. When I click on the "Show Org source" button at the bottom of the page, it doesn't work. The button works on the Worg index page, and the file org-quotes.org.html exists, so I don't know what the problem is. Scott > > Regards, >
Re: [O] How to export LaTeX amsmath align bmatrix to ODT?
On 2017-06-10 04:54, ed...@openmail.cc wrote: Hello, I have been making progress with my export procedure to ODT. I would like to know if someone knows how to export the following LaTeX block to ODT correctly: \[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4 \end{bmatrix} \end{align}\] https://www.vfemail.net/roundcube/?_task=mail&_action=compose&_id=289067995593b7fd683a1f# \[\begin{align} a = & 1 + 2 + 3 + 4 \\ c = & 4 \end{bmatrix} \end{align}\] As always, any help is welcome :) . Edgar By the way, I tried with latexmlmath and mathtoweb.jar without success. - ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!
[O] How to export LaTeX amsmath align bmatrix to ODT?
Hello, I have been making progress with my export procedure to ODT. I would like to know if someone knows how to export the following LaTeX block to ODT correctly: \[\begin{align} \begin{bmatrix} a = 1 & b=2 \\ c=3 & d = 4 \end{bmatrix} \end{align}\] \[\begin{align} a = & 1 + 2 + 3 + 4 \\ c = & 4 \end{bmatrix} \end{align}\] As always, any help is welcome :) . Edgar - ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the NSA's hands! $24.95 ONETIME Lifetime accounts with Privacy Features! 15GB disk! No bandwidth quotas! Commercial and Bulk Mail Options!
Re: [O] Custom keymaps on org blocks
Nicolas Goaziou writes: > Hello, > > John Kitchin writes: > >> On the other hand, there are times when I am working on a document that has >> a lot of short code blocks, e.g. for lecture notes or blog posts, where it >> is sufficiently tedious to me to switch in and out of the special edit mode >> that I wanted to try this solution out, and it became clear you can't >> really try it out without modifying the core org code that does the >> font-locking on a block. > > Are you sure about it? There are two hooks related to fontification: > `org-font-lock-set-keywords-hook' and `org-font-lock-hook'. I'm > surprised none can help you in this case. You are totally right on this. I can use org-font-lock-hook to take care of this. Thanks for the pointer. > >> I don't think we have to go so far as to say we make multiple major mode >> keybindings available, so much as context specific keybindings available >> where there is value in it. We already have this in org-speed keys for >> example, and even these can be context specific to do different things on >> headings (even different things on headings with specific properties) and >> blocks ( >> http://kitchingroup.cheme.cmu.edu/blog/2016/12/22/Context-specific-org-mode-speed-keys/ >> ). > > Neat hack. Thanks! > >> If there was a change to org to enable this, I wouldn't expect the core to >> change behavior for anyone, it would just make it possible for users to >> change this if they wanted to. The same way they can customize the face of >> a code block for different languages. > > Fair enough. Would you want to provide a proper patch? With the hook I don't think it is necessary. Thanks for all the discussion though (everyone) it was helpful to think it through. > > Thank you. > > > Regards, -- 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
Re: [O] order of evaluation upon export: macros are evaluated too soon
(Nicolas, forgot to send this to the list so apologies if you get this twice) On Thursday, 8 Jun 2017 at 12:36, Nicolas Goaziou wrote: > Macros are expanded prior to Babel code evaluation—they can make nice > shortcuts for long Babel calls—so they have to obey to the same rules as > Babel code evaluation, which ignores ":noexport:" directive. I do Ah, okay, this is a reasonable use case for ignoring the noexport directive. Thanks for this. > Of course, if we accept to limit more macro expansion scope, we get more > latitude in choosing the position of the expansion stage during the > export process. I'm open to discussions about it, and more generally, > about macros' features. Consistency is the most important feature, in many ways, especially as the (eco-)system grows. For my own use case, the little bit of elisp posted earlier is sufficient for me so I'm happy with the current configuration, especially as I like hiding babel blocks in non-exported subtrees but still want them executed on export. Thanks again, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-425-gf4fca1 signature.asc Description: PGP signature
Re: [O] org to static site?
Hello, Scott Randby writes: > On 06/05/2017 05:16 PM, Nick Dokos wrote: >> Can this paragraph please be added to >> http://orgmode.org/worg/org-quotes.html? >> It certainly added a smile to my day. > > Sure, it can be added. I'm glad you liked it. I added it. Thank you. Regards, -- Nicolas Goaziou
Re: [O] Custom keymaps on org blocks
Hello, John Kitchin writes: > On the other hand, there are times when I am working on a document that has > a lot of short code blocks, e.g. for lecture notes or blog posts, where it > is sufficiently tedious to me to switch in and out of the special edit mode > that I wanted to try this solution out, and it became clear you can't > really try it out without modifying the core org code that does the > font-locking on a block. Are you sure about it? There are two hooks related to fontification: `org-font-lock-set-keywords-hook' and `org-font-lock-hook'. I'm surprised none can help you in this case. > I don't think we have to go so far as to say we make multiple major mode > keybindings available, so much as context specific keybindings available > where there is value in it. We already have this in org-speed keys for > example, and even these can be context specific to do different things on > headings (even different things on headings with specific properties) and > blocks ( > http://kitchingroup.cheme.cmu.edu/blog/2016/12/22/Context-specific-org-mode-speed-keys/ > ). Neat hack. > If there was a change to org to enable this, I wouldn't expect the core to > change behavior for anyone, it would just make it possible for users to > change this if they wanted to. The same way they can customize the face of > a code block for different languages. Fair enough. Would you want to provide a proper patch? Thank you. Regards, -- Nicolas Goaziou
Re: [O] Add ob-sclang.el for sclang Org-mode babel support in contrib/
Hello, "numbch...@gmail.com" writes: > Here is my branch > https://github.com/stardiviner/org-mode/tree/feature/ob-sclang > Merge this branch? Thank you for your work. I'd like to refrain more packages to contrib, unless the intent is to eventually merge them into core later. However, I think this can go into core. Would you like to clean it up a bit, activate lexical-binding, provide some tests, and send a patch (using git format-patch)? You will need to sign FSF papers to do that, if you haven't done already. If you are willing to do this, we can also move your library to "contrib/" temporarily. Regards, -- Nicolas Goaziou
Re: [O] Moving and resetting attachments
Hello, Florian Lindner writes: > Ok, my new version is here. It should be able to replace > org-attach-set-directory Thank you. Comments follow. > Some questions about the code > > * Is that the correct way to deal with a boolean prefix arg? I'm not > interested in the value of the prefix arg, only if > it's given or not. No, it should be (interactive "P") so PREFIX, or more commonly, ARG, is nil when not provided. > * The code changes the semantics of org-attach-set-directory, because it > creates the newly set attach dir. IMHO this > makes more sense. OK. > * It deletes only the first part of the dir, e.g. data/83/1234567, it only > deletes the 1234567 dir, even if 83 is empty > afterwards. But I think that's ok. OK. Here is an update of your function, with comments and FIXME. The docstring could certainly be improved, but you get the idea. (defun flo/org-attach-move (&optional arg) "Move current attachements to another directory. When ARG is non-nil, reset attach directory. Create directory if needed." (interactive "P") (let ((old (org-attach-dir)) (new (progn (if arg (org-entry-delete nil "ATTACH_DIR") (let ((dir (read-directory-name "Attachment directory: " (org-entry-get nil "ATTACH_DIR" (and org-attach-allow-inheritance t) (org-entry-put nil "ATTACH_DIR" dir))) (org-attach-dir t (message "old-attach-dir = %S" old) ;FIXME: remove? (message "new-attach-dir = %S" new) ;FIXME: remove? (unless (or (string= old new) (not old)) ;; FIXME: Need a special case for directory reset (non-nil ARG). ;; FIXME: Maybe `yes-or-no-p' is safer when moving data around? (when (y-or-n-p "Copy over attachments from old directory? ") (copy-directory old-attach-dir new t nil t)) (when (y-or-n-p (concat "Delete " old)) ;; FIXME: Why not `delete-directory'? (shell-command (format "rm -fr %s" old)) Regards, -- Nicolas Goaziou