Re: [O] bibliographystyle in scimax
Dear Joseph, I'm not familiar with scimax, but if it uses org-ref to handle citations then you might give a try to citeproc-orgref (https://github.com/andras-simonyi/citeproc-orgref) which is able to format BibTeX citations in html exports according to any CSL style (Chicago author-date is the default). best wishes, András On 3 March 2018 at 09:22, Joseph Vidal-Rosset wrote: > Dear John, > > I am happy to tell you that your scimax > https://github.com/jkitchin/scimax is a wonderful tool for emacs, for > org-mode and for exporting in LaTeX with references. I advice strongly > its use. > > I am using Gnus and not mu4e to write emails and it works well now > thanks of the help of Eric Fraga. > > This email is just about a detail. I guess it would be possible in > theory to get the bibliography style that I want in email as well as > in any other exported document, but it is not the case for the html > export and therefore not for html email in Gnus. It is too bad, > because apalike for example is a good option that avoids Jan von > Plato’s reproach vonplato2017: > > A great disservice is being done to scholarship by the reference system > prevalent today that has running numbers, usually in square brackets, > for the items in the references. The defects of this system are twofold. > First, it is enormously disturbing for the reader to be constantly > checking the list of references to see what article or book is being > referred to. The reader’s memory is burdened with information that > has no meaning elsewhere. Second, the awareness of who did what > and when is eroded little by little. If we read Gödel (1931) or Gentzen > (1936), we know what that is, contrary to a plain [104] and [90], say, > and similarly with hundreds of other works. Such couplings of names > and years give us a timeline that is indispensable for an awareness of > the development of logic or any other part of science. The thoughtless > “bibtex” square bracket numbering system of references is destroying > such awareness and should therefore be universally abandoned. It has > just one, totally inessential advantage: that it saves some space. In a > standard article, that may be a few lines, and in a book, a page or two. > > So, do you think that it is possible to adopt the apalike bibliography > style in html document also? > > Best wishes, > > Jo. > > Bibliography > > [vonplato2017] Jan von Plato, The Great Formal Machinery Works: Theories of > Deduction and Computation at the Origins of the Digital Age, Princeton > University Press (2017). > >
Re: [O] what settings would make original export to pdf as good as pandoc conversion?
On Thursday, 8 Mar 2018 at 12:55, Samuel Wales wrote: > On 3/3/18, Eric S Fraga wrote: >> #+latex_header: \setlength{\parindent}{0pt}\setlength{\parskip}{6pt} >> >> might give you "unbunched" "unindented" paragraphs. > > thank you. i will try that when i can. > > are there settings in .emacs that will do the same thing? Yes, you can put such commands in the definition of the org-latex class. Check org-latex-classes. >> A table of contents will probably only be generated if you have not >> turned of heading numbering. You can turn this on explicitly by >> >> #+options: toc:t num:t > > interesting. i have 2 tables of contents for the same document. [1 > level at front and complete at end.] i have num:t in properties > drawer. > > in html, both export. in pdf, only the first exports. Cannot help here. Sorry. -- Eric S Fraga via Emacs 27.0.50, Org release_9.1.6-191-g90607d signature.asc Description: PGP signature
Re: [O] Bug: org-capture inserts empty line before title
On 04/03/18 08:13, Luke wrote: Hi, On 04/03/18 06:40, Nicolas Goaziou wrote: Hello, Luke writes: org-capture seems to be inserting an extra line before the task heading. So the narrowed buffer for editing the task looks something like this: Top of window --- ** TODO My new task [2018-03-02 Fri] [[file:~/.notes]] End of buffer --- I would expect the task heading to be the first line in the buffer. After pressing 'C-c C-c' the resulting file looks like this: -- * Tasks ** TODO My new task [2018-03-02 Fri] [[file:~/.notes]] -- Is this a bug? If not, how do I stop the blank line from being inserted before the heading. As far as I can tell, this is not related to org-blank-before-new-entry. Could you show the capture template you used? I do not notice anything like that with my templates. Regards, I've set up a minimal-org.el file with the following contents: ;; Minimal setup to load latest 'org-mode' ;; activate debugging (setq debug-on-error t debug-on-signal nil debug-on-quit t) ;; add latest org-mode to load path (add-to-list 'load-path (expand-file-name "~/elisp/org-mode/lisp")) (add-to-list 'load-path (expand-file-name "~/elisp/org-mode/contrib/lisp" t)) Then I've run emacs with `emacs -Q -l minimal-org.el`. So I'm just running the with org-mode default capture template, which (taken from org-capture.el) would be: ("t" "Task" entry (file+headline "" "Tasks") "* TODO %?\n %u\n %a") As a follow up, after running `git bisect` I've tracked down that the behavior that I describe starts to appear in commit 8ebf4b7274 ("Change `org-paste-subtree' behavior"). It doesn't seem to manifest in the commits previous to that. I'm not sure why though. Regards, -- Luke
[O] join on dates
just wondering if something like this already exists. i was going to do this with a keyboard macro, but i'm not sure if those are quite powerful enough. i won't be coding it. i have subtrees "collection" and "results". they both contain inactive timestamps [with or without time or day of week]. all that matters here is date. i want to make sure that every collection is accounted for in results. but results sometimes does not list the exact date [it's a few days later when i receieve results]. or sometimes it lists it only in a link description. so i maybe want to do a join on date and then manually check. i want 3 lists. these lists should contain non-id links to the relevant headers in a and b. then i can manually check. 1] headers that have the same date in both a and b 2] headers that have a date in a but not b 3] headers that have a date in b but not a
Re: [O] what settings would make original export to pdf as good as pandoc conversion?
On 3/3/18, Eric S Fraga wrote: > #+latex_header: \setlength{\parindent}{0pt}\setlength{\parskip}{6pt} > > might give you "unbunched" "unindented" paragraphs. thank you. i will try that when i can. are there settings in .emacs that will do the same thing? > A table of contents will probably only be generated if you have not > turned of heading numbering. You can turn this on explicitly by > > #+options: toc:t num:t interesting. i have 2 tables of contents for the same document. [1 level at front and complete at end.] i have num:t in properties drawer. in html, both export. in pdf, only the first exports.
Re: [O] how do you compose mails in Gnus with org-mode
Uwe Brauer writes: "Thorsten" == Thorsten Jolitz writes: > >> A good start would be to try outshine with emacs-lisp mode. >> With your outshine config done, write a file like foo.el > >> , >> | ;;; 1st level header >> | Sum >> | (+ 1 1) >> | Subtract >> | (- 2 1) >> ` > >> or > >> , >> | ;; * 1st level header >> | ;; ** Sum >> | (+ 1 1) >> | ;; ** Subtract >> | (- 2 1) >> ` > >> and see if you got headline fontification and all the outshine >> functionality. > > That seems to work, I opened your outorg buffer and there everything > worked as expected. > > >> If that works, its a message-mode problem. >> If not, a genereal problem with your config. When I do M-# # writing this mail I see: , | [ *unsent followup to Uwe Brauer on gmane.emacs.orgmode* ] Exit with M-# | (Meta-Key and #) | * --text follows this line-- | Uwe Brauer writes: ...[] ` I suggest edebug then, as written, this must run successfully: ,[ C-h f outorg-prepare-message-mode-buffer-for-editing RET ] | outorg-prepare-message-mode-buffer-for-editing is a Lisp function in | ‘outorg.el’. | | (outorg-prepare-message-mode-buffer-for-editing) | | Prepare an unsent-mail in a message-mode buffer for outorg. | | This function assumes that ’--text follows this line--’ (or | whatever is found inside variable ‘mail-header-separator’) is the | first line below the message header, is always present, and never | modified by the user. It turns this line into an ‘outshine’ | headline and out-comments all text below this line - if any. ` >>> [...] >>> BTW, you recommended >>> (require 'outorg-export) >>> >>> I installed your package via the package system, so I don't see that >>> file. Where can I obtain it from? > >> It's an extension to outorg: > > Where can I find it, only in that site? It seems not to be in elpa/melpa > and marmelade. Only available via github I think -- cheers, Thorsten
Re: [O] how do you compose mails in Gnus with org-mode
>>> "Tim" == Tim Cross writes: > Yes, you need to checkout the 26 branch to get the next version to be > released. A git branch -a will probably list all the branches and you > should see one labelled 26 (I'm not running emacs from git at present, so > cannot check). I believe git 26 has been in 'feature freeze' for a while > while they try to sort out the main bugs needing to be fixed before 26.1 > can be released. > Note also that I believe the template changes in org are not in > the maint branch, only master. So you could try the maint btranch > as that would at least have known bugs fixed. Problem with the main branch is that the nice feature for the org tables, namely very wide columns get somehow hidden, is not included
Re: [O] how do you compose mails in Gnus with org-mode
Yes, you need to checkout the 26 branch to get the next version to be released. A git branch -a will probably list all the branches and you should see one labelled 26 (I'm not running emacs from git at present, so cannot check). I believe git 26 has been in 'feature freeze' for a while while they try to sort out the main bugs needing to be fixed before 26.1 can be released. Note also that I believe the template changes in org are not in the maint branch, only master. So you could try the maint btranch as that would at least have known bugs fixed. On 8 March 2018 at 19:57, Uwe Brauer wrote: > >> Uwe Brauer writes: > >> To avoid confusion, the official release is still 25.3. The next >> release, which is probably still a ways off, will be 26.1 > > Thanks for the clarification. But in order to compile 26, I would need > to checkout the 26 from the git repo? Do I understand that correctly? > > >> The 27 version is really bleeding edge, containing changes which >> are considered too risky for the next release. I'm not sure how >> frequently bug fixes for 26.1 are merged into the development >> branch. > > Well I started to use that version at a time a specific BIDI function > was only in master but not in the official release. Later a similar > thing occurred with vc.el. > >> From a previous post, I think you mentioned you were running from >> git master from mid/late last year. If your running from git >> master, I think you need to pull fairly regularly as bugs are >> frequently fixed and you could be tripping over something which has >> already been addressed. > > Ah no. I am running emacs git master from end of January. I am running > the git/master version of org mode from last june. Why? Well Nic put in > some very useful stuff in org-table (not in the official release now), > but then later in September/October the whole template engine was > changed in master and I could not find out you to make it work again, > that is why I stick to that very particular org version. > >> I suspect you are likely to run into a number of bugs with the >> latest development version of emacs and you are probably one of the >> very few who are looking at bugs in that version. Good luck. > > > Yeah maybe. At least this way reporting them I could contribute a bit to > GNU emacs. :-D > > > > -- regards, Tim -- Tim Cross
Re: [O] Concatenating header args
Hello, Michael Welle writes: > Hm, the property values can be functions that get evaluated to get the > actual property values, can't it? I'm not sure though if something like > :flags (get-em "flags" '("-more" "-values")) is so much nicer to write. > Maybe it is, esp. if you want to change the base flags for a ton of > items. Today is teaching tuesday (even if it's wednesday ;)), so I'm a > bit short on time. But I will try that approach later this week and see > where that leads to. not too nice, but works good enough for me ;). (defun hmw/org-prop-append(prop value) (format "%s %s" value (cdr (assq prop (car (org-babel-params-from-properties)) (defalias 'A 'hmw/org-prop-append) * foo :PROPERTIES: :header-args: :flags -Wall :END: ** bar #+begin_src C :flags (A :flags "-lm") #+end_src Regards hmw
[O] [FEATURE] ob-js.el support :session with skewer-mode
I pushed code at this branch: https://code.orgmode.org/stardiviner/org-mode/src/ob-js-skewer Hope someone can review it. and merge it. (I found https://code.orgmode.org/ does not have the create PR button now. Is it disabled?) [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/
[O] [PATCH 2/3] ob-table: Fix org-sbe's handling of list arguments
* ob-table.el (org-sbe): Add an explicit case for handling list arguments. This avoids doing the wrong thing (%s-formatting a list, thus losing syntax like double-quotes). This enables passing org-table ranges through org-sbe in a simple and correct manner. * test-ob-table.el: Add test. --- lisp/ob-table.el | 17 +++-- testing/lisp/test-ob-table.el | 20 2 files changed, 31 insertions(+), 6 deletions(-) diff --git a/lisp/ob-table.el b/lisp/ob-table.el index 105aca5e2..17810dd74 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -132,12 +132,17 @@ as shown in the example below. "(" (mapconcat (lambda (var-spec) -(if (> (length (cdr var-spec)) 1) -(format "%S='%S" -(car var-spec) -(mapcar #'read (cdr var-spec))) - (format "%S=%s" - (car var-spec) (cadr var-spec +(cond +((> (length (cdr var-spec)) 1) + (format "%S='%S" + (car var-spec) + (mapcar #'read (cdr var-spec +((stringp (cadr var-spec)) + (format "%S=%s" + (car var-spec) (cadr var-spec))) +(t + (format "%S=%S" + (car var-spec) (cadr var-spec) ',variables ", ") ")") (org-babel-execute-src-block diff --git a/testing/lisp/test-ob-table.el b/testing/lisp/test-ob-table.el index 725cf6bdd..40cc877d8 100644 --- a/testing/lisp/test-ob-table.el +++ b/testing/lisp/test-ob-table.el @@ -40,6 +40,26 @@ (should (equal "a\"b\"c" (eval '(org-sbe identity (x $ "a\"b\"c"))) +(ert-deftest test-ob-table/sbe-list () + "Test that `org-sbe' can correctly handle list arguments." + (org-test-with-temp-text-in-file " +#+name: concat +#+begin_src emacs-lisp :eval yes + (mapconcat #'identity x \"\") +#+end_src" +(should (equal "foobar" + (eval '(org-sbe concat (x '("foo" "bar" + +(ert-deftest test-ob-table/sbe-$-list () + "Test that `org-sbe' can correctly handle $-prefixed list arguments." + (org-test-with-temp-text-in-file " +#+name: concat +#+begin_src emacs-lisp :eval yes + (mapconcat #'identity x \"\") +#+end_src" +(should (equal "foobar" + (eval '(org-sbe concat (x $ '("foo" "bar" + (provide 'test-ob-table) ;;; test-ob-table.el ends here -- 2.16.2
[O] [PATCH 1/3] ob-table: Fix org-sbe's handling of quotes in arguments
* ob-table.el (org-sbe): (org-sbe func (x $ "a\"b\"c")) did the wrong thing because org-sbe would simply wrap any $-prefixed value in quotes, without any escaping. Fix this by using "%S" (instead of "\"%s\""). * test-ob-table.el: Add test. --- lisp/ob-table.el | 2 +- testing/lisp/test-ob-table.el | 10 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lisp/ob-table.el b/lisp/ob-table.el index f6a5c88e4..105aca5e2 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -112,7 +112,7 @@ as shown in the example below. (prog1 nil (setq quote t)) (prog1 (cond -(quote (format "\"%s\"" el)) +(quote (format "%S" el)) ((stringp el) (org-no-properties el)) (t el)) (setq quote nil diff --git a/testing/lisp/test-ob-table.el b/testing/lisp/test-ob-table.el index da136cbee..725cf6bdd 100644 --- a/testing/lisp/test-ob-table.el +++ b/testing/lisp/test-ob-table.el @@ -30,6 +30,16 @@ ;; (org-test-at-id "6d2ff4ce-4489-4e2a-9c65-e3f71f77d975" ;; (should (= 2 (sbe take-sqrt (n "4")) +(ert-deftest test-ob-table/sbe-quote () + "Test that `org-sbe' can correctly handle string arguments containing quotes." + (org-test-with-temp-text-in-file " +#+name: identity +#+begin_src emacs-lisp :eval yes + x +#+end_src" +(should (equal "a\"b\"c" + (eval '(org-sbe identity (x $ "a\"b\"c"))) + (provide 'test-ob-table) ;;; test-ob-table.el ends here -- 2.16.2
[O] [PATCH 3/3] ob-table: Mention passing ranges as lists in org-sbe's documentation
* ob-table.el (org-sbe): Add documentation note. --- lisp/ob-table.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/ob-table.el b/lisp/ob-table.el index 17810dd74..d11df9abc 100644 --- a/lisp/ob-table.el +++ b/lisp/ob-table.el @@ -89,6 +89,8 @@ NOTE: By default, string variable names are interpreted as references to source-code blocks, to force interpretation of a cell's value as a string, prefix the identifier a \"$\" (e.g., \"$$2\" instead of \"$2\" or \"$@2$2\" instead of \"@2$2\"). +This will not work with a range; instead, pass it as a list, +e.g. (org-sbe fun (r (list $1..$2))). NOTE: It is also possible to pass header arguments to the code block. In this case a table cell should hold the string value of -- 2.16.2
[O] [PATCH 0/3] org-sbe fixes
Inspired by this SE question: https://emacs.stackexchange.com/questions/32895/how-to-feed-range-from-org-table-filled-with-strings-to-code-block-via-tblfm Passing table ranges through org-sbe is too hard, and even then the solution there was not fully correct (did not handle empty cells and '"' characters properly). As it turns out, we can improve the situation by addressing some critical shortcomings in the implementation of org-sbe itself. There are still quite a few "funny" things left about org-sbe: - How var and "var" (as the value for a variable) mean the same thing. This matches the syntax used in org-mode documents, but doesn't make much sense as part of an API. This creates an additional hurdle of using it in tables (references must be further $-prefixed, and this $-prefixing will fail in a bad way with ranges). - The confusing $"string" syntax (or $$3 in tables). It looks like some distinct syntax (like bash localizable strings), but $"string" is in fact parsed as two tokens ($ and "string"). - The undocumented syntax where using more than one value for a variable implicitly converts it into a list. - How these implicit lists are handled differently than single values, including when they are also lists. - The way it encodes its parameters into a string, just so another part of org-mode can decode it later. This happens on two levels, org-babel-parse-header-arguments (in org-sbe itself) and parsing of the actual argument values. - How there are no tests for the entire file, except one that has been disabled and left as a TODO since 2011. This is my first org-mode contribution. I've already done the copyright assignment process for my first Emacs contribution from last year, so hopefully that applies here as well. Vladimir Panteleev (3): ob-table: Fix org-sbe's handling of quotes in arguments ob-table: Fix org-sbe's handling of list arguments ob-table: Mention passing ranges as lists in org-sbe's documentation lisp/ob-table.el | 21 ++--- testing/lisp/test-ob-table.el | 30 ++ 2 files changed, 44 insertions(+), 7 deletions(-) -- 2.16.2
Re: [O] how do you compose mails in Gnus with org-mode
> Uwe Brauer writes: > To avoid confusion, the official release is still 25.3. The next > release, which is probably still a ways off, will be 26.1 Thanks for the clarification. But in order to compile 26, I would need to checkout the 26 from the git repo? Do I understand that correctly? > The 27 version is really bleeding edge, containing changes which > are considered too risky for the next release. I'm not sure how > frequently bug fixes for 26.1 are merged into the development > branch. Well I started to use that version at a time a specific BIDI function was only in master but not in the official release. Later a similar thing occurred with vc.el. > From a previous post, I think you mentioned you were running from > git master from mid/late last year. If your running from git > master, I think you need to pull fairly regularly as bugs are > frequently fixed and you could be tripping over something which has > already been addressed. Ah no. I am running emacs git master from end of January. I am running the git/master version of org mode from last june. Why? Well Nic put in some very useful stuff in org-table (not in the official release now), but then later in September/October the whole template engine was changed in master and I could not find out you to make it work again, that is why I stick to that very particular org version. > I suspect you are likely to run into a number of bugs with the > latest development version of emacs and you are probably one of the > very few who are looking at bugs in that version. Good luck. Yeah maybe. At least this way reporting them I could contribute a bit to GNU emacs. :-D
Re: [O] how do you compose mails in Gnus with org-mode
>>> "Thorsten" == Thorsten Jolitz writes: > Uwe Brauer writes: >> > Uwe Brauer writes: >> >> > Wow, emacs 27 ... I'm on Archlinux and always thought packages a >> > pretty >> > up-to-date. >> >> Right Ubuntu officially only ships 24, which is pretty old. >> >> Well it is directly form git master, so it is a pre release. >> The official release is 26. > Then Archlinux is not that much out of date. >> > Maybe outline has changed somehow between Emacs 25 and Emacs 27? >> > But I don't think so, the error you send is pretty typical for >> > incomplete configuration. >> >> I think at the weekend, I will debug the problem. It might be that there >> some parts of my init file which are in conflict with your package. > A good start would be to try outshine with emacs-lisp mode. > With your outshine config done, write a file like foo.el > , > | ;;; 1st level header > | Sum > | (+ 1 1) > | Subtract > | (- 2 1) > ` > or > , > | ;; * 1st level header > | ;; ** Sum > | (+ 1 1) > | ;; ** Subtract > | (- 2 1) > ` > and see if you got headline fontification and all the outshine > functionality. That seems to work, I opened your outorg buffer and there everything worked as expected. > If that works, its a message-mode problem. > If not, a genereal problem with your config. >> [...] >> BTW, you recommended >> (require 'outorg-export) >> >> I installed your package via the package system, so I don't see that >> file. Where can I obtain it from? > It's an extension to outorg: Where can I find it, only in that site? It seems not to be in elpa/melpa and marmelade. Thanks for the pointer Uwe