Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2
Hello, Well, actually, it seems that I did not understand anything at all :-) Sorry about that, but I am new to the source code, and it is not very clear to me. So if I try to summarize what I have got: - In the past, what I could see with the standard 'M-x fill-region' over paragraphs or lists with empty lines between each inner items, was probably performed thanks to several calls to org-fill-paragraph. Removing the org-fill-paragraph-separate-nobreak-p function simply highlights that I was fortunate to use it this way before, and there is just no org-fill-region. - There are no unit tests, nor past discussions about how different text block contents should be filled with this new function Please tell if I am still wrong, and otherwise I gonna try to implement some unit tests over different cases I may think about. Have a nice day, 2015-11-30 15:53 GMT+01:00 Nicolas Goaziou : > Hello, > > Steve Moreau writes: > > > Thanks for you answer. > > OK, I understand. That explains why I needed to add blank lines between > > list items before to fill region, such as: > > > > - item1 > > > > - item2 > > > > This is a new paragraph > > > > I have 2 more questions for you please. > > Let say I would like to give a hand and try to improve the > org-fill-region > > to deal with this case. > > Actually, there is nothing to improve. It needs to be built from > scratch. There is no function in Org to fill a region ATM. > > > - Would it be local to fill-region only, as I would suspect, or would it > > put a mess around because it is used in some other contexts I am not > aware > > of, and would it be something interesting for the org-mode according > > to you? > > I think we should bind M-q to org-fill-paragraph. This function could > delegate the work to `org-fill-region' when a region is active. > > > - If you wanted to develop it, would you surround it with a when > condition > > so that user can disable it? > > Why would someone want to disable it? > > Regards, > > -- > Nicolas Goaziou > >
Re: [O] How to hide past days in Agenda view
Thank you Charlie! >Hi, >On 11/27/2015 08:45 AM, sgeorgii . wrote: >> Hello! >> >> The subject question. When I >> >> M-x org-agenda >> >> and it is now Friday - in my weekly agenda view I want only to see >> Friday (today), Saturday and Sunday. I.e. only remaining part of the week. >> >> By default my agenda shows from Monday till Sunday regardless of >> current day. How do I filter our days which are in past in my Agenda? >> >> Any help? >As to agenda starting today I have the following in my init.el >(setq org-agenda-start-on-weekday nil) ;starts agenda week view "today" > ;rather than a fixed day each week >Perhaps you can set org-agenda-span someway to show only the remaining >days in the week. I set it to >(setq org-agenda-span 14) >so that I see the next 14 days I believe setting it to 'fortnight also >works. >Charlie Millar On 27 November 2015 at 16:45, sgeorgii . wrote: > > Hello! > > The subject question. When I > > M-x org-agenda > > and it is now Friday - in my weekly agenda view I want only to see Friday (today), Saturday and Sunday. I.e. only remaining part of the week. > > By default my agenda shows from Monday till Sunday regardless of current day. How do I filter our days which are in past in my Agenda? > > Any help?
Re: [O] Citation processing via Zotero + zotxt
Hi John and all, Thanks for your input! John Kitchin writes: > This really means you are using bibtex as the reference database > backend, and probably helm-bibtex to insert citations as org-mode links. > Bibliography generation is probably managed by LaTeX/Bibtex. org-ref > mostly provides the functionality of the links, and some utility > functions to help build and maintain bibtex files, and to check all the > cross-reference, label and citation links in the document. > > Ideally, something like zotxt would enable Zotero as the reference > database backend with some selection mechanism (it could be helm, or > ido, or some other interface) to insert citation syntax This is pretty much what the zotxt-emacs package does. It communicates with the zotxt API, and it defines a minor mode for use with Org. This minor mode provides functions for querying the zotxt database (by default, it searches by author, title and year) and for inserting and updating Org links that point to items in the Zotero database. It should be straightforward to extend these capabilities to insert citation syntax instead of, or in addition to, links. > , and at export time also leverage Zotero to generate the > bibliography. I guess this would not too often be export to LaTeX, > since that would require syncing with a Bibtex file. For quick and > dirty work this would be fine, but my experience is converted bibtex > files are never clean enough for production publication, and require a > lot of manual cleaning of capitalization, journal abbreviations, math, > etc... It is ok to do it once, but not every time you build a > document! Hmm, that is interesting and a bit concerning. Zotero has the ability to export sets of items to a BibTeX file. Ideally this kind of cleanup should, and in principle could, be dealt with `upstream' in the Zotero database. The CSL representation of items allows for pretty fine-grained and explicit control over things like capitalization and abbreviations. But I do not know how much of that is exposed in Zotero, and I don't know how well it is preserved upon export to BibTeX. Certainly, I'd want export to LaTeX to be just as quick and painless as export to other backends in general. Some manual cleanup of the .bib file seems acceptable to me as a final step before publication, but I think it would count against Zotero if it was too annoying to Zotero can also import BibTeX, so it would also be possible in principle to go in the other direction: keep your database as .bib, but convert it on the fly when exporting to other backends. > A minimal, generalized interface that would probably work with org-ref > would look something like (* is some prefix name like org-cite-): > > *-select-citations-from-db opens some selection interface with > candidates from the db-backend ((org-)bibtex, Zotero, Mendeley, RIS, > ...), allows user to select some citations with some filtering > capability then inserts citation syntax into org file. This function > should allow multiple selections, and allow appending to an existing > citation. org-ref supports reftex and helm-bibtex for this, and ebib > would also work. As I mentioned above, zotxt-emacs already provides an API in this direction. > *-export-citations This is the most difficult part, this code would have > to functionally do what LaTeX/BibTex accomplishes, and probably with > multiple passes to collect citations, get formatted bibliographic > entries, replace citations in the text (eg with numbers, au-year, > etc...), and insert the formatted bibliography in the right place. If > Zotero can give the formatted entry for each citation, this might be a > good start. It would be integrated into the export process. It might > even be backend-agnostic if the formatting was just plain or in org > markup text. Yep, this is the hard one, but there is some more-or-less working code to do this (via my org-citeproc script) in the in-progress org-cite.el. I'm proposing reworking this code to communicate with Zotero, rather than org-citeproc or another citeproc implementation. > *-on-cite-click-func This is technically optional, but it is what makes > org-ref so great. Figures out what citation was clicked on, and runs > some action on that citation, e.g. open citation, find related > articles in google scholar, open browser to citation url, open notes > to the citation, etc... This is org-ref's most clever code, figuring > out what was clicked on, and providing multiple actions on that > citation key. This needs more work, in org-element. Right now, as far as I know, there's no support for making citation-reference objects clickable. On the other hand, it doesn't seem like it should be that difficult. > It is pretty easy to use zotero. I couldn't figure out zotxt though. Hmm, where did you have trouble? I was able to install it via this link https://addons.mozilla.org/en-US/firefox/addon/zotxt/ and that was pretty
Re: [O] Scripting with org-mode
Hi, --- On Tue, Dec 1, 2015 at 1:52 AM, Nick Dokos wrote: | IIUC, org-babel-execute-buffer is exactly what the OP | needs. \-- Yes, that did it. Thanks! SK -- Shakthi Kannan http://www.shakthimaan.com
Re: [O] Citation processing via Zotero + zotxt
Martin Yrjölä writes: > Hi Richard. > > Thank you for your work on improving citation support for org-mode. I > have some experiences from using Zotero, but for the moment I'm using > org-ref[1] to manage my citations. This really means you are using bibtex as the reference database backend, and probably helm-bibtex to insert citations as org-mode links. Bibliography generation is probably managed by LaTeX/Bibtex. org-ref mostly provides the functionality of the links, and some utility functions to help build and maintain bibtex files, and to check all the cross-reference, label and citation links in the document. Ideally, something like zotxt would enable Zotero as the reference database backend with some selection mechanism (it could be helm, or ido, or some other interface) to insert citation syntax, and at export time also leverage Zotero to generate the bibliography. I guess this would not too often be export to LaTeX, since that would require syncing with a Bibtex file. For quick and dirty work this would be fine, but my experience is converted bibtex files are never clean enough for production publication, and require a lot of manual cleaning of capitalization, journal abbreviations, math, etc... It is ok to do it once, but not every time you build a document! A minimal, generalized interface that would probably work with org-ref would look something like (* is some prefix name like org-cite-): *-select-citations-from-db opens some selection interface with candidates from the db-backend ((org-)bibtex, Zotero, Mendeley, RIS, ...), allows user to select some citations with some filtering capability then inserts citation syntax into org file. This function should allow multiple selections, and allow appending to an existing citation. org-ref supports reftex and helm-bibtex for this, and ebib would also work. *-export-citations This is the most difficult part, this code would have to functionally do what LaTeX/BibTex accomplishes, and probably with multiple passes to collect citations, get formatted bibliographic entries, replace citations in the text (eg with numbers, au-year, etc...), and insert the formatted bibliography in the right place. If Zotero can give the formatted entry for each citation, this might be a good start. It would be integrated into the export process. It might even be backend-agnostic if the formatting was just plain or in org markup text. *-on-cite-click-func This is technically optional, but it is what makes org-ref so great. Figures out what citation was clicked on, and runs some action on that citation, e.g. open citation, find related articles in google scholar, open browser to citation url, open notes to the citation, etc... This is org-ref's most clever code, figuring out what was clicked on, and providing multiple actions on that citation key. most other stuff in org-ref covers cross-references, labels and eqn labels, or is very specific to bibtex. > Richard Lawrence writes: > >> For the past few days, I've been looking more closely at using the >> combination of Zotero [1] with Erik Hetzner's zotxt plugin [2] as a >> means of processing citations when exporting to non-LaTeX backends. I >> am now thinking that this is probably our best option, but I'd like to >> know what other people think before I sink a lot of work into it. >> >> Here are the reasons I think this is the best option: >> >> 1) It is really easy for users. It is pretty easy to use zotero. I couldn't figure out zotxt though. > > I think ease of use is very important. Maybe some day we can talk with > Zotero directly from Emacs, but installing a browser extension seems to > be the easiest we can do for now. It is possible to talk directly to the Zotero sqlite database, but you need the browser extension or standalone to make it! >> I know that many people (perhaps especially the `power users' who have >> been active in the citations discussion so far) prefer to maintain their >> reference database without the aid of a GUI reference manager like >> Zotero. These are people who use bibtex I think. I don't think its practical to directly edit the sqlite database ;) > Maybe two way sync between BibTeX and Zotero would be sufficient for > power users? I know there is already automatic exporters to BibTex for > Zotero, but some work needs to be done to make it a two-way sync. I am personally skeptical of this, having "translated" Endnote libraries to Bibtex and back. The simple stuff mostly works, but accented names, chemical formulas, and many other things tend to not translate very well. > I don't mind the GUI for editing the bibliography database, especially > when the Zotero Translators [2] make such a good job for scraping > citation metadata directly from web pages. you should try doi-utils-add-bibtex-entry-from-doi in org-ref ;) it does a lot of those things too! maybe i will get some good ideas there ;) > I wouldn't like to use the Zotero GUI f
Re: [O] inserting a copy of an element at point (timestamps)
Hi, Matt Price writes: > Every time I think I'm starting to learn org Mode, I find I'm actually > really ignorant. > > I want to write a simple function that inserts a timestamp at point for a > date one week after the previous timestamp. I'm sure it's very simple. But > I can't figure out how to do it. > > i have this: > > (defun mwp/one-week-later () > "add a new timestamp a week later than the previous one" > > (interactive) > (save-excursion > (let ((curpos (point))) aka save-excursion. Also, you should limit your search to the current heading. > (re-search-backward "<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" ) org-ts-regexp or maybe org-ts-regexp-both. > (let* ((previous-ts (org-element-context))) > (goto-char curpos) > (INSERT COPY OF PREVIOUS-TS) ;; obviously this is fake. But what to > replace it with? (save-excursion (insert (org-element-interpret-data previous-ts)) (org-timestamp-change 7 'day)) > (org-timestamp-change 7 'dat) ))) You need to use ’day. You probably don’t need org-element in this case, but then again why not... Rasmus -- Warning: Everything saved will be lost
Re: [O] inserting a copy of an element at point (timestamps)
Try this. You may want use <> intead of [], and you can see org-re-timestamp for other options than all. (defun insert-ts+7 () (interactive) (insert (concat "[" (save-excursion (re-search-backward (org-re-timestamp 'all)) (match-string 0))) "]") (org-timestamp-change 7 'day)) Matt Price writes: > Every time I think I'm starting to learn org Mode, I find I'm actually > really ignorant. > > I want to write a simple function that inserts a timestamp at point for a > date one week after the previous timestamp. I'm sure it's very simple. But > I can't figure out how to do it. > > i have this: > > (defun mwp/one-week-later () > "add a new timestamp a week later than the previous one" > > (interactive) > (save-excursion > (let ((curpos (point))) > (re-search-backward "<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" ) > (let* ((previous-ts (org-element-context))) > (goto-char curpos) > (INSERT COPY OF PREVIOUS-TS) ;; obviously this is fake. But what to > replace it with? > (org-timestamp-change 7 'dat) ))) > ) > > What's the real solution? Thank you, > Matt -- 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
[O] inserting a copy of an element at point (timestamps)
Every time I think I'm starting to learn org Mode, I find I'm actually really ignorant. I want to write a simple function that inserts a timestamp at point for a date one week after the previous timestamp. I'm sure it's very simple. But I can't figure out how to do it. i have this: (defun mwp/one-week-later () "add a new timestamp a week later than the previous one" (interactive) (save-excursion (let ((curpos (point))) (re-search-backward "<[0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}" ) (let* ((previous-ts (org-element-context))) (goto-char curpos) (INSERT COPY OF PREVIOUS-TS) ;; obviously this is fake. But what to replace it with? (org-timestamp-change 7 'dat) ))) ) What's the real solution? Thank you, Matt
[O] Issues w/ hacking Org font-lock for variable pitch prose
Hello, /I’ll first explain the situation and append the code to the message./ Go to code: [ M-x re-search-forward RET ^CODE RET ] I read in Org mode a lot, and I dislike reading prose in monospace fonts. So I have turned on ‘variable-pitch-mode’ for Org mode. But because some stuff has to stay in stoichedon, so I set some faces to be monospace: I have also add a keyword to font-lock keywords as part of the Org hook, so that I can have a face attached to initial whitespace and lists (-, and 1., 2. etc). I set this face to monospace too, so that I have nice aligned left line, while the actual prose stays in variable pitch. I just updated today, from the default Org mode of Emacs 24.5 to the latest release (8.3.2, from git). The problems are as follows: 1. My code is buggy, and I can’t understand why. With previous Org some font-lock actions were happening only after I hit enter at the end of a line, and if I have less than 3 newlines at the end of the file sometimes font-locking of headings didn’t work. For example, if I’m writing a paragraph, I write it in a single physical line, and I use word wrapping. If that paragraph happended to contain an inline footnote, which I use very often, that note is not highlighted until I insert a line-feed. And with the new version, while the problem persists, when I hit enter, thus inserting a newline at the end of a line, Emacs hangs up, and sometimes I see this error: org-element--current-element: Wrong type argument: integer-or-marker-p, nil ;; See end of message for the backtrace… ;; [ M-x re-search-forward RET ^BACK RET ] But if I go to the next line and ‘open-line’, everything is O.K. Maybe my keyword regex has a mistake? 2. In the new version of org mode, ‘org-block-background’ face is gone, and I can’t set the face for block to use a monospace font. There is the org-block face, which doesn’t affect the contents of org blocks, e.g. src block. Basically, the text between the org-block delimiters don’t get a face, so I can’t set the font for them. Any workarounds? 3. I do not know how to hook in properly to the org font-lock mechanism. I read the code a bit, and apparently org builds the font-lock keywords list local to the buffer when it is booting up as its major mode. I know barely anything about font-lock, but from this fact I deduce that I have to push in my keywords in a hook after it’s initialisation, but I do not know if I do it properly. I’ve written a wall of text, I’m sorry. I hope there’ll be someone to help me out though, because the solution is beyond my comprehension of Org and Emacs Lisp. Thanks in advance. CODE ;; ‘gk-font’ merely returns a font from a plist with the given keyword. (defvar gk-org-hide-leading-stuff-in-headers nil) (defface gk-org-initial-space-and-list-stuff-face `((t . (:family ,(gk-font :mono "Face for initial space and list item bullets. This face is used to keep them in monospace even when variable-pitch mode is used in the org buffer.") (defvar gk-org-font-lock-keywords `(;; Initial space is monospace ("^\s*\\([0-9-]+[) ] ?\\(\\[[X ]\\]\\)?\\)?" (0 (put-text-property (match-beginning 0) (match-end 0) 'face 'gk-org-initial-space-and-list-stuff-face))) ;; Hide leading stars and space in headings. ("^\\*+ " (0 (when gk-org-hide-leading-stuff-in-headers (put-text-property (match-beginning 0) (match-end 0) 'display '(space . (width 0 (defvar gk-org-mono-faces '(org-table org-code org-special-keyword org-verbatim org-meta-line org-block org-block-begin-line org-block-end-line)) (defun gk-org-visuals-hook () "Set up how an Org buffer look." (when (window-system) ;; Variable pitch in general, monospace in tables. (variable-pitch-mode 1) (set-face-attribute 'variable-pitch nil :font (gk-font :serif) :height gk-font-org-variable-pitch-height) (set-face-attribute 'org-todo nil :font (gk-font :sans)) (mapc (lambda (x) (set-face-attribute x nil :font (gk-font :mono))) gk-org-mono-faces) (set-face-attribute 'org-footnote nil :underline nil) (dolist (face org-level-faces) (set-face-attribute face nil :family (gk-font :sans))) (font-lock-add-keywords nil gk-org-font-lock-keywords))) (add-hook 'org-mode-hook 'gk-org-visuals-hook) ;;; Code block ends here BACKTRACE ;;; Some non-printables are replaced with dots, because Gnus wanted so. ;;; If necessary, I can send in the full traceback. Debugger entered--Lisp error: (wrong-type-argument integer-or-marker-p nil) org-element-item-parser(41809 ((41306 0 "- " nil nil nil 41341) (41341 0 "- " nil nil nil 41486) (41367 2 "- " nil nil nil 41486) (41403 4 "- " nil nil nil 41446) (41446 4 "- " nil nil nil 41486) (41
[O] [PATCH] ox-html.el: Add lang attribute to html tag
* lisp/ox-html.el (org-html-template): Add lang attribute to exported html tag. Some features of the CSS Text Module (Level 3) require this attribute to be present (for example, so that the browser knows how to hyphenate the text). For more info, please take a look here: https://drafts.csswg.org/css-text-3/#languages TINYCHANGE --- lisp/ox-html.el | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index effd387..074cced 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1911,10 +1911,12 @@ holding export options." (org-html-doctype info) "\n" (concat "http://www.w3.org/1999/xhtml\"; lang=\"%s\" xml:lang=\"%s\"" - (plist-get info :language) (plist-get info :language))) + (cond ((org-html-xhtml-p info) + (format + " xmlns=\"http://www.w3.org/1999/xhtml\"; lang=\"%s\" xml:lang=\"%s\"" + (plist-get info :language) (plist-get info :language))) +((org-html-html5-p info) + (format " lang=\"%s\"" (plist-get info :language ">\n") "\n" (org-html--build-meta-info info) -- 2.6.2
Re: [O] [PATCH] ox-html.el: Add lang attribute to html tag
Added TINYCHANGE cookie.
Re: [O] asynchronous python code blocks in org-mode
Karl Voit writes: > * John Kitchin wrote: >> Hi everyone, > > Hi John! > >> I worked out some ideas on running Python blocks asynchronously in >> org-mode, while seeing the output of the code, /and/ still capturing the >> output in org-mode! > > Found the link to your video + blog on Twitter. On the weekend, I > watched it with big eyes and tried your code on my side as well: > great work! > >> It seems to work pretty well as a proof of concept, but the present >> approach has some limitations, e.g. no sessions, no src-block :var, and >> maybe others. These might be fixable at some point. >> >> Anyway, I thought I would share it, to see if anyone has thoughts on >> it, and in case it looks useful to you. > > I'm loving it. > > I'd love to see this async method for shell script as well. Many > shell snippets I am using do take some time: backup, audio > conversion, bulk image conversion, ... It turns out to be pretty trivial to modify this for sh. Change change org-babel-variable-assignments:python to org-babel-variable-assignments:sh and python to bash, and rename the function to org-babel-async-execute:sh, and you should have it. If you don't mind redefining an org command, this will let you put :async in the header to trigger the asynchronous mode, otherwise, run the usual way: (defun org-babel-execute:sh (body params) "Execute a block of Shell commands with Babel. This function is called by `org-babel-execute-src-block'." (let* ((session (org-babel-sh-initiate-session (cdr (assoc :session params (async (assoc :async params)) (stdin (let ((stdin (cdr (assoc :stdin params (when stdin (org-babel-sh-var-to-string (org-babel-ref-resolve stdin) (full-body (org-babel-expand-body:generic body params (org-babel-variable-assignments:sh params (if async ;; run asynchronously (org-babel-async-execute:sh) ;; else run regularly (org-babel-reassemble-table (org-babel-sh-evaluate session full-body params stdin) (org-babel-pick-name (cdr (assoc :colname-names params)) (cdr (assoc :colnames params))) (org-babel-pick-name (cdr (assoc :rowname-names params)) (cdr (assoc :rownames params))) I have not thought about sessions and asynchronous execution. It would mean a queue and a different way to pass code to the process, which I have not thought through yet. What to do when there are dependencies for example,... > > 1) How big is the chance that we're going to see async babel block > execution by default in a future org-mode release? > > 2) In the meantime: Wouldn't it be nice to have additional > source-block definitions like python + apython (for asynchronous > python) or sh + ash? -- 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
[O] [PATCH] ox-html.el: Remove superflous whitespace
* lisp/ox-html.el: Remove superfluous whitespace from meta tags, put there by `org-html--buld-meta-info' and `org-html--build-head'. `org-html-close-tag' already inserts a space, so it is not necessary to add another. Previously these affected tags would look like . TINYCHANGE --- lisp/ox-html.el | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index effd387..8f9fe99 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -1711,9 +1711,9 @@ INFO is a plist used as a communication channel." " -->\n"))) (format (if (org-html-html5-p info) - (org-html-close-tag "meta" " charset=\"%s\"" info) + (org-html-close-tag "meta" "charset=\"%s\"" info) (org-html-close-tag -"meta" " http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"" +"meta" "http-equiv=\"Content-Type\" content=\"text/html;charset=%s\"" info)) charset) "\n" (let ((viewport-options @@ -1723,33 +1723,33 @@ INFO is a plist used as a communication channel." (concat (org-html-close-tag "meta" - (format " name=\"viewport\" content=\"%s\"" + (format "name=\"viewport\" content=\"%s\"" (mapconcat (lambda (elm) (format "%s=%s" (car elm) (cadr elm))) viewport-options ", ")) info) "\n"))) (format "%s\n" title) - (org-html-close-tag "meta" " name=\"generator\" content=\"Org-mode\"" info) + (org-html-close-tag "meta" "name=\"generator\" content=\"Org-mode\"" info) "\n" (and (org-string-nw-p author) (concat (org-html-close-tag "meta" - (format " name=\"author\" content=\"%s\"" + (format "name=\"author\" content=\"%s\"" (funcall protect-string author)) info) "\n")) (and (org-string-nw-p description) (concat (org-html-close-tag "meta" - (format " name=\"description\" content=\"%s\"\n" + (format "name=\"description\" content=\"%s\"\n" (funcall protect-string description)) info) "\n")) (and (org-string-nw-p keywords) (concat (org-html-close-tag "meta" - (format " name=\"keywords\" content=\"%s\"" + (format "name=\"keywords\" content=\"%s\"" (funcall protect-string keywords)) info) "\n") @@ -1766,7 +1766,7 @@ INFO is a plist used as a communication channel." (when (and (plist-get info :html-htmlized-css-url) (eq org-html-htmlize-output-type 'css)) (org-html-close-tag "link" - (format " rel=\"stylesheet\" href=\"%s\" type=\"text/css\"" + (format "rel=\"stylesheet\" href=\"%s\" type=\"text/css\"" (plist-get info :html-htmlized-css-url)) info)) (when (plist-get info :html-head-include-scripts) org-html-scripts -- 2.6.2
Re: [O] Scripting with org-mode
of course there is a simpler way ;) 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 Mon, Nov 30, 2015 at 3:22 PM, Nick Dokos wrote: > John Kitchin writes: > > > I think one of these will do what you want: > > > > ** Rerun all src blocks > > > > #+BEGIN_SRC emacs-lisp > > (defun run-blocks () > > (interactive) > > (save-excursion > > (org-element-map (org-element-parse-buffer) 'src-block > > (lambda (src-block) > > (goto-char (org-element-property :begin src-block)) > > (org-babel-execute-src-block) > > > > > > #+END_SRC > > > > #+RESULTS: > > : run-blocks > > > > > > #+BEGIN_SRC emacs-lisp > > (defun run-blocks-2 () > > (interactive) > > (save-excursion > > (goto-char (point-min)) > > (while (re-search-forward "^#\\+BEGIN_SRC" nil t) > > (org-babel-execute-src-block > > #+END_SRC > > #+RESULTS: > > > > > > > > > > > > Shakthi Kannan writes: > > > >> Hi, > >> > >> Is there a way to execute all the org-mode code blocks in a file, and > >> send the output to stdout? > >> > >> For example, I have the following org file: > >> > >> === BEGIN === > >> > >> * Greeting > >> > >> #+BEGIN_SRC sh :results output > >> echo "Hello $USER! Today is `date`" > >> #+END_SRC > >> > >> * Current directory > >> > >> #+BEGIN_SRC sh :results output > >> pwd > >> #+END_SRC > >> > >> === END === > >> > >> I could go to each code block, and type C-c C-c to produce an output. > >> But, I just want to be able to execute the entire file, and produce > >> one single output. > >> > >> Is this possible? > >> > > > IIUC, org-babel-execute-buffer is exactly what the OP > needs. > > -- > Nick > > >
Re: [O] Scripting with org-mode
John Kitchin writes: > I think one of these will do what you want: > > ** Rerun all src blocks > > #+BEGIN_SRC emacs-lisp > (defun run-blocks () > (interactive) > (save-excursion > (org-element-map (org-element-parse-buffer) 'src-block > (lambda (src-block) > (goto-char (org-element-property :begin src-block)) > (org-babel-execute-src-block) > > > #+END_SRC > > #+RESULTS: > : run-blocks > > > #+BEGIN_SRC emacs-lisp > (defun run-blocks-2 () > (interactive) > (save-excursion > (goto-char (point-min)) > (while (re-search-forward "^#\\+BEGIN_SRC" nil t) > (org-babel-execute-src-block > #+END_SRC > #+RESULTS: > > > > > > Shakthi Kannan writes: > >> Hi, >> >> Is there a way to execute all the org-mode code blocks in a file, and >> send the output to stdout? >> >> For example, I have the following org file: >> >> === BEGIN === >> >> * Greeting >> >> #+BEGIN_SRC sh :results output >> echo "Hello $USER! Today is `date`" >> #+END_SRC >> >> * Current directory >> >> #+BEGIN_SRC sh :results output >> pwd >> #+END_SRC >> >> === END === >> >> I could go to each code block, and type C-c C-c to produce an output. >> But, I just want to be able to execute the entire file, and produce >> one single output. >> >> Is this possible? >> IIUC, org-babel-execute-buffer is exactly what the OP needs. -- Nick
Re: [O] syntax for remote table/cell references
You may want to give the orgtbl-aggregate package a try. (Available on http://melpa.org, documentation here: https://github.com/tbanel/orgaggregate) It creates the following table: #+BEGIN: aggregate :table "grades" :cols "Precis count()" | Precis | count() | |-+-| | A- | 7 | | A | 7 | | B | 2 | | B+? A-? | 1 | | B+ | 4 | #+END: Read it as: - the "aggregate" function - uses the "grades" table, - groups rows with the same "Precis" value - and "counts()" rows in each group. There is a wizard to create it: - M-x org-insert-dblock:aggregate - C-c C-x i aggregate You may add an ASCII-art plot by hitting: C-c " a #+BEGIN: aggregate :table "grades" :cols "Precis count()" | Precis | count() | | |-+-+-| | A- | 7 | WWW | | A | 7 | WWW | | B | 2 | WW | | B+? A-? | 1 | W | | B+ | 4 | | #+TBLFM: $3='(orgtbl-ascii-draw $2 0 7 7) #+END: Have fun Thierry Le 30/11/2015 17:36, Matt Price a écrit : > Hello everyone, > > I'm trying to simulate a simple "COUNT" spreadsheet function with the > following two tables: > > #+TBLNAME: grades > | Student | Precis | POV PAPER | > |---+-+---| > | | A- | A-| > | | A | A-/B+ | > | | A- | A | > | | B | B+| > | | A- | B+| > | | A | A | > | | A | A-| > | | A- | B+| > | | A- | A-| > | | A | A | > | | A | A | > | | B+? A-? | A-| > | | A- | B+| > | | B | B+| > | | B+ | A-| > | | A- | A-| > | | A | B+| > | | B+ | B | > | | B+ | B+| > | | B+ | B | > | | A | A-| > > > | Grade | Count in Precis | Percent | > |---++-| > | A+| #ERROR | | > | A | #ERROR | | > | A-| #ERROR | | > | B+| #ERROR | | > | B | #ERROR | | > | B-| #ERROR | | > | C+| #ERROR | | > | C | #ERROR | | > | C-| #ERROR | | > | F | #ERROR | | > #+TBLFM: $2='(length (org-lookup-all $1 '(remote(grades,$2;E > > Sorry for the ugly formatting. > I want to just count the number of As, A-'s, etc, so I can see how > badly I've messed up my distribution, and how much regrading I need to > do. I don't understand the syntax for referencing cell ranges in > org-lookup-all, nor do I quite get how "remote" works (doesn't seem to > be a normal function?). Am trying to follow worg tutorials but not > having much luck. > > Thanks, > Matt >
Re: [O] Scripting with org-mode
I think one of these will do what you want: ** Rerun all src blocks #+BEGIN_SRC emacs-lisp (defun run-blocks () (interactive) (save-excursion (org-element-map (org-element-parse-buffer) 'src-block (lambda (src-block) (goto-char (org-element-property :begin src-block)) (org-babel-execute-src-block) #+END_SRC #+RESULTS: : run-blocks #+BEGIN_SRC emacs-lisp (defun run-blocks-2 () (interactive) (save-excursion (goto-char (point-min)) (while (re-search-forward "^#\\+BEGIN_SRC" nil t) (org-babel-execute-src-block #+END_SRC #+RESULTS: Shakthi Kannan writes: > Hi, > > Is there a way to execute all the org-mode code blocks in a file, and > send the output to stdout? > > For example, I have the following org file: > > === BEGIN === > > * Greeting > > #+BEGIN_SRC sh :results output > echo "Hello $USER! Today is `date`" > #+END_SRC > > * Current directory > > #+BEGIN_SRC sh :results output > pwd > #+END_SRC > > === END === > > I could go to each code block, and type C-c C-c to produce an output. > But, I just want to be able to execute the entire file, and produce > one single output. > > Is this possible? > > SK -- 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] Scripting with org-mode
* Assuming that entire file is made up of shell commands (like the ones in the example you gave) since, in such a case as your example the "#" in the first column would ignore the rest of the lines as comments: M< Mx set-mark M> Mx shell-command-on-region On Mon, Nov 30, 2015 at 11:43 AM, Shakthi Kannan wrote: > Hi, > > Is there a way to execute all the org-mode code blocks in a file, and > send the output to stdout? > > For example, I have the following org file: > > === BEGIN === > > * Greeting > > #+BEGIN_SRC sh :results output > echo "Hello $USER! Today is `date`" > #+END_SRC > > * Current directory > > #+BEGIN_SRC sh :results output > pwd > #+END_SRC > > === END === > > I could go to each code block, and type C-c C-c to produce an output. > But, I just want to be able to execute the entire file, and produce > one single output. > > Is this possible? > > SK > > -- > Shakthi Kannan > http://www.shakthimaan.com > >
Re: [O] Lisp error: (void-function org-babel-get-header)
Aloha Kyle, Kyle Meyer writes: > Hi Tom, > > Thomas S. Dye writes: > >> Aloha all, >> >> After updating Org mode this weekend and exporting a document that >> exported on Friday, I get the error in the subject. > > Any chance you have (sh . t) in org-babel-do-load-languages? If so, > s/sh/shell/ should fix it. > > See http://thread.gmane.org/gmane.emacs.orgmode/102877/focus=102882 for > an explanation. That was the problem. I'm up and running again. Thanks for your help. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Lisp error: (void-function org-babel-get-header)
Hi Tom, Thomas S. Dye writes: > Aloha all, > > After updating Org mode this weekend and exporting a document that > exported on Friday, I get the error in the subject. Any chance you have (sh . t) in org-babel-do-load-languages? If so, s/sh/shell/ should fix it. See http://thread.gmane.org/gmane.emacs.orgmode/102877/focus=102882 for an explanation. -- Kyle
[O] Scripting with org-mode
Hi, Is there a way to execute all the org-mode code blocks in a file, and send the output to stdout? For example, I have the following org file: === BEGIN === * Greeting #+BEGIN_SRC sh :results output echo "Hello $USER! Today is `date`" #+END_SRC * Current directory #+BEGIN_SRC sh :results output pwd #+END_SRC === END === I could go to each code block, and type C-c C-c to produce an output. But, I just want to be able to execute the entire file, and produce one single output. Is this possible? SK -- Shakthi Kannan http://www.shakthimaan.com
[O] syntax for remote table/cell references
Hello everyone, I'm trying to simulate a simple "COUNT" spreadsheet function with the following two tables: #+TBLNAME: grades | Student | Precis | POV PAPER | |---+-+---| | | A- | A-| | | A | A-/B+ | | | A- | A | | | B | B+| | | A- | B+| | | A | A | | | A | A-| | | A- | B+| | | A- | A-| | | A | A | | | A | A | | | B+? A-? | A-| | | A- | B+| | | B | B+| | | B+ | A-| | | A- | A-| | | A | B+| | | B+ | B | | | B+ | B+| | | B+ | B | | | A | A-| | Grade | Count in Precis | Percent | |---++-| | A+| #ERROR | | | A | #ERROR | | | A-| #ERROR | | | B+| #ERROR | | | B | #ERROR | | | B-| #ERROR | | | C+| #ERROR | | | C | #ERROR | | | C-| #ERROR | | | F | #ERROR | | #+TBLFM: $2='(length (org-lookup-all $1 '(remote(grades,$2;E Sorry for the ugly formatting. I want to just count the number of As, A-'s, etc, so I can see how badly I've messed up my distribution, and how much regrading I need to do. I don't understand the syntax for referencing cell ranges in org-lookup-all, nor do I quite get how "remote" works (doesn't seem to be a normal function?). Am trying to follow worg tutorials but not having much luck. Thanks, Matt
[O] Lisp error: (void-function org-babel-get-header)
Aloha all, After updating Org mode this weekend and exporting a document that exported on Friday, I get the error in the subject. I ran grep org-babel-get-header *.el in org-mode/lisp and didn't get a result. I'm still working on my first cup of coffee this AM, so I might have missed something obvious. Here is a backtrace: Debugger entered--Lisp error: (void-function org-babel-get-header) org-babel-get-header(((:var x . "joint-posteriors") (:colname-names) (:rowname-names) (:result-params "silent") (:result-type . value) (:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "silent") (:hlines . "no") (:session . "none")) :var) org-babel-variable-assignments:sh(((:var x . "joint-posteriors") (:colname-names) (:rowname-names) (:result-params "silent") (:result-type . value) (:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "silent") (:hlines . "no") (:session . "none"))) org-babel-execute:sh("texcount -1 -sum=1,0,0,0,0,0,0 $x.tex" ((:var x . "joint-posteriors") (:colname-names) (:rowname-names) (:result-params "silent") (:result-type . value) (:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "silent") (:hlines . "no") (:session . "none"))) org-babel-execute-src-block(nil ("sh" "texcount -1 -sum=1,0,0,0,0,0,0 $x.tex" ((:comments . "") (:shebang . "") (:cache . "no") (:padline . "") (:noweb . "no") (:tangle . "no") (:exports . "code") (:results . "replace") (:var . "x=(file-name-sans-extension (buffer-name))") (:session . "none") (:hlines . "no")) "" "code-tex-count" 0 64783) ((:results . "silent"))) #[0 "\305\302\306\307#\203h\310 \204 \311 \312\313\"\300\242\232\203d\312\314\"b\210\315!\211\316=\2033\317\320\321\322 !\"\210\202c\211\323=\203J\317\320\324\306\211?\205D\301#\"\210\202c\325!\211\211\262\203^\211\317\320\"\266\202b\326\327!\210\210\210\210\202 \330\300\242!\203u\317\320\331 \"\210\332\300\242!\f\236A\211\203\211\317\320\324\306\301#\"\210\210\326\333\300\242\"\207" [("code-tex-count") ((:results . "silent")) "^[ ]*#\\+\\(name\\|results\\|tblname\\)\\(\\[\\(<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^ \n>]*?\\)> \\)?\\([[:alnum:]]+\\)\\]\\)?\\:[]*code-tex-count\\([ ]\\|$\\)" org-babel-update-intermediate org-babel-library-of-babel re-search-forward nil t org-in-commented-heading-p org-element-at-point org-element-property :name :post-affiliated org-element-type babel-call throw :found org-babel-lob-execute org-babel-lob-get-info src-block org-babel-execute-src-block org-babel-read-element error "Reference not found" org-babel-ref-goto-headline-id org-babel-ref-headline-body intern "Reference `%s' not found in this buffer"] 8 "\n\n(fn)"]() funcall(#[0 "\305\302\306\307#\203h\310 \204 \311 \312\313\"\300\242\232\203d\312\314\"b\210\315!\211\316=\2033\317\320\321\322 !\"\210\202c\211\323=\203J\317\320\324\306\211?\205D\301#\"\210\202c\325!\211\211\262\203^\211\317\320\"\266\202b\326\327!\210\210\210\210\202 \330\300\242!\203u\317\320\331 \"\210\332\300\242!\f\236A\211\203\211\317\320\324\306\301#\"\210\210\326\333\300\242\"\207" [("code-tex-count") ((:results . "silent")) "^[ ]*#\\+\\(name\\|results\\|tblname\\)\\(\\[\\(<\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\} ?[^ \n>]*?\\)> \\)?\\([[:alnum:]]+\\)\\]\\)?\\:[]*code-tex-count\\([ ]\\|$\\)" org-babel-update-intermediate org-babel-library-of-babel re-search-forward nil t org-in-commented-heading-p org-element-at-point org-element-property :name :post-affiliated org-element-type babel-call throw :found org-babel-lob-execute org-babel-lob-get-info src-block org-babel-execute-src-block org-babel-read-element error "Reference not found" org-babel-ref-goto-headline-id org-babel-ref-headline-body intern "Reference `%s' not found in this buffer"] 8 "\n\n(fn)"]) org-babel-ref-resolve("code-tex-count()") org-babel-ref-parse("results=code-tex-count()") #[(el) ":\203\207\301!\207" [el org-babel-ref-parse] 2]("results=code-tex-count()") mapcar(#[(el) ":\203\207\301!\207" [el org-babel-ref-parse] 2] ("results=code-tex-count()")) All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] fails to start on 32 bit
Hello, Sam Halliday writes: > I discovered an error on startup on a 32 bit Windows build. > > The line in org-footnote.el > > (format "fn:%x" (random #x1)) > > is too large and this fails with an overflow. > > Please consider using a number that is 32bit compatible, I'm sure there > are plenty of integers in the 32bit range for footnote IDs :-) Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] Bug: Avoid following link when using org-return-follows-link and point is at end of line [8.3.2 (8.3.2-39-gd537a3-elpaplus @ /home/Erik/.emacs.d/elpa/org-plus-contrib-20151123/)]
Erik Anderson writes: > Not a bug per se, but a tweak to existing behavior which I think most > people would prefer. The option org-return-follows-link is wonderfully > convenient except when the point is at the end of the line where the > intention is usually to insert a carriage return. I don't think I understand the problem. Consider, * test [[test]] When I click enter on the link it goes to the expected place. When I click C-e RET on the second line it inserts a newline, which I guess is what you want? Can you give an example of how Your bug might relate to the fact that when using e.g. C-f you can end up with the cursor between the two closing brackets. But that’s a different problem and I doubt your patch would fix this problem, since that point is not the end of the line, though I haven’t tested it. Rasmus -- Got mashed potatoes. Ain't got no T-Bone. No T-Bone
[O] Moving from org-mode 6.33 to 8.3.2
Hi, Moving from an emacs with an old org-mode (6.33) to the latest stable one currently (8.3.2), I noticed two changes which made me out of my comfort area. 1. Demoting/promoting a header now changes the indentation of text below. I reverted to the previous mode with '(setf org-adapt-indentation nil)' in ~/.emacs, and that's fine but I mentioned it in case it has an impact on point#2. 2. 'M-x fill-region' does not fill custom lists as before. In the previous version, I could select and fill several mixed paragraphs/lists directly. For example, filling the following block (without --- separator added as a delimiter in this message) --- # a very long comment a long sentence that should be filled over 2 lines - a looong item that should be filled over 2 lines - a looong item that should be filled over 2 lines a long sentence that should be filled over 2 lines --- resulted in (version 6.33): --- # a very long comment a long sentence that should be filled over 2 lines - a looong item that should be filled over 2 lines - a looong item that should be filled over 2 lines a long sentence that should be filled over 2 lines --- and now results in (version 8.3.2): --- # a very long comment a long sentence that should be filled over 2 lines - a looong item that should be filled over 2 lines - a looong item that should be filled over 2 lines a long sentence that should be filled over 2 lines --- Lists are not filled anymore and I have to select each list entry and fill it individually to get the same output. So my questions are: - Is there any simple way to revert to the previous mode with a variable? - Else, could you explain briefly where I should look if I want to understand why the filling is skipped in this case, and eventually change it if I cannot change my mind and adapt to this different behavior? I had a look at function (org.el:23249 org-setup-filling) but I am not sure this is the right location. Thanks, and have a nice day.
Re: [O] [PATCH] ox-html.el: Remove superflous whitespace
Hello, Ruben Maher writes: > * lisp/ox-html.el: Remove superfluous whitespace from meta tags, put > there by `org-html--buld-meta-info' and `org-html--build-head'. > `org-html-close-tag' already inserts a space, so it is not necessary > to add another. Previously these affected tags would look like > . Thank you for the patch. However, you need to add TINYCHANGE at the end of the commit message if you haven't signed FSF papers yet. Regards, -- Nicolas Goaziou
Re: [O] [bug] org-agenda view fails if I have missed a deadline
On Monday, 30 Nov 2015 at 15:48, Nicolas Goaziou wrote: [...] > I cannot reproduce it. What is your value for > `org-agenda-deadline-leaders'? It should consists of 3 strings. Ahhh. Interesting. It is indeed not 3 strings. But this never used to cause a problem! My bad, in any case. Sorry for the noise. Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb
[O] Moving from org-mode 6.33 to 8.3.2
Hi, Moving from an emacs with an old org-mode (6.33) to the latest stable one currently (8.3.2), I noticed two changes which made me out of my comfort area. 1. Demoting/promoting a header now changes the indentation of text below. I reverted to the previous mode with '(setf org-adapt-indentation nil)' in ~/.emacs, and that's fine but I mentioned it in case it has an impact on point#2. 2. 'M-x fill-region' does not fill custom lists as before. In the previous version, I could select and fill several mixed paragraphs/lists directly. For example, filling the following block (without --- separator added as a delimiter in this message) --- # a very long comment a long sentence that should be filled over 2 lines - a looong item that should be filled over 2 lines - a looong item that should be filled over 2 lines a long sentence that should be filled over 2 lines --- resulted in (version 6.33): --- # a very long comment a long sentence that should be filled over 2 lines - a looong item that should be filled over 2 lines - a looong item that should be filled over 2 lines a long sentence that should be filled over 2 lines --- and now results in (version 8.3.2): --- # a very long comment a long sentence that should be filled over 2 lines - a looong item that should be filled over 2 lines - a looong item that should be filled over 2 lines a long sentence that should be filled over 2 lines --- Lists are not filled anymore and I have to select each list entry and fill it individually to get the same output. So my questions are: - Is there any simple way to revert to the previous mode with a variable? - Else, could you explain briefly where I should look if I want to understand why the filling is skipped in this case, and eventually change it if I cannot change my mind and adapt to this different behavior? I had a look at function (org.el:23249 org-setup-filling) but I am not sure this is the right location. Thanks, and have a nice day.
[O] Bug: Cannot open load file: No such file or directory, htmlize [8.2.10 (release_8.2.10 @ /usr/share/emacs/25.1.50/lisp/org/)]
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. This is happen when I'm in agenda buffer and try to run org-agenda-write to file with .html extension. Emacs : GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.10.8) of 2015-11-29 Package: Org-mode version 8.2.10 (release_8.2.10 @ /usr/share/emacs/25.1.50/lisp/org/) current state: == (setq org-tab-first-hook '(org-hide-block-toggle-maybe org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-occur-hook '(org-first-headline-recenter) org-metaup-hook '(org-babel-load-in-session-maybe) org-log-done 'time org-confirm-shell-link-function 'yes-or-no-p org-agenda-exporter-settings '((ps-number-of-columns 2) (ps-landscape-mode t) (org-agenda-add-entry-text-maxlines 5) (htmlize-output-type (quote css))) org-after-todo-state-change-hook '(org-clock-out-if-current) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer) org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-pre-tangle-hook '(save-buffer) org-mode-hook '(er/add-org-mode-expansions #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-show-block-all append local] 5] #[nil "\300\301\302\303\304$\207" [org-add-hook change-major-mode-hook org-babel-show-result-all append local] 5] org-babel-result-hide-spec org-babel-hide-all-hashes #[nil "\300\301!\207" [run-hooks prelude-org-mode-hook] 2]) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers org-cycle-hide-inline-tasks org-cycle-show-empty-lines org-optimize-window-after-visibility-change) org-agenda-span 56 org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-agenda-files '("/media/novak/Storage/org/plans.org" "/media/novak/Storage/org/fakultet.org") org-clock-out-hook '(org-clock-remove-empty-clock-drawer) )
[O] fails to start on 32 bit
Dear org-mode authors, I discovered an error on startup on a 32 bit Windows build. The line in org-footnote.el (format "fn:%x" (random #x1)) is too large and this fails with an overflow. Please consider using a number that is 32bit compatible, I'm sure there are plenty of integers in the 32bit range for footnote IDs :-) -- Best regards, Sam signature.asc Description: PGP signature
[O] Bug: Avoid following link when using org-return-follows-link and point is at end of line [8.3.2 (8.3.2-39-gd537a3-elpaplus @ /home/Erik/.emacs.d/elpa/org-plus-contrib-20151123/)]
Not a bug per se, but a tweak to existing behavior which I think most people would prefer. The option org-return-follows-link is wonderfully convenient except when the point is at the end of the line where the intention is usually to insert a carriage return. http://emacs.stackexchange.com/questions/18433/avoid-following-link-when-using-org-return-follows-link-and-point-is-at-end-of-l --- lisp/org.el | 1 + 1 file changed, 1 insertion(+) diff --git a/lisp/org.el b/lisp/org.el index 8918747..6b9ffb3 100755 --- a/lisp/org.el +++ b/lisp/org.el @@ -21326,6 +21326,7 @@ object (e.g., within a comment). In these case, you need to use ;; `org-return-follows-link' allows it. Tolerate fuzzy ;; locations, e.g., in a comment, as `org-open-at-point'. ((and org-return-follows-link + (not (eolp)) (or (org-in-regexp org-ts-regexp-both nil t) (org-in-regexp org-tsr-regexp-both nil t) (org-in-regexp org-any-link-re nil t))) -- 2.5.3 Emacs : GNU Emacs 24.5.1 (x86_64-unknown-cygwin) of 2015-06-23 on desktop-new Package: Org-mode version 8.3.2 (8.3.2-39-gd537a3-elpaplus @ /home/Erik/.emacs.d/elpa/org-plus-contrib-20151123/)
Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2
Hello, Steve Moreau writes: > Thanks for you answer. > OK, I understand. That explains why I needed to add blank lines between > list items before to fill region, such as: > > - item1 > > - item2 > > This is a new paragraph > > I have 2 more questions for you please. > Let say I would like to give a hand and try to improve the org-fill-region > to deal with this case. Actually, there is nothing to improve. It needs to be built from scratch. There is no function in Org to fill a region ATM. > - Would it be local to fill-region only, as I would suspect, or would it > put a mess around because it is used in some other contexts I am not aware > of, and would it be something interesting for the org-mode according > to you? I think we should bind M-q to org-fill-paragraph. This function could delegate the work to `org-fill-region' when a region is active. > - If you wanted to develop it, would you surround it with a when condition > so that user can disable it? Why would someone want to disable it? Regards, -- Nicolas Goaziou
Re: [O] [bug] org-agenda view fails if I have missed a deadline
Hello, Eric S Fraga writes: > (posted this to gnus mailing list by mistake... sigh) > > Hello, > > with org up to date as of a minute ago, if I try to view my current > agenda, which happens to have an entry that has missed its deadline > (i.e. the deadline is in the past), org fails with an error: > > Debugger entered--Lisp error: (wrong-type-argument stringp nil) > format(nil 1) > (cond ((> diff 0) (format future diff)) ((string= future past) (format past > diff)) (t (format past (abs diff > (let ((future (nth 1 org-agenda-deadline-leaders)) (past (nth 2 > org-agenda-deadline-leaders))) (cond ((> diff 0) (format future diff)) > ((string= future past) (format past diff)) (t (format past (abs diff) > (if (= diff 0) (car org-agenda-deadline-leaders) (let ((future (nth 1 > org-agenda-deadline-leaders)) (past (nth 2 org-agenda-deadline-leaders))) > (cond ((> diff 0) (format future diff)) ((string= future past) (format past > diff)) (t (format past (abs diff)) > (let ((diff (if (< (org-today) current) diff (- deadline current (if (= > diff 0) (car org-agenda-deadline-leaders) (let ((future (nth 1 > org-agenda-deadline-leaders)) (past (nth 2 org-agenda-deadline-leaders))) > (cond ((> diff 0) (format future diff)) ((string= future past) (format past > diff)) (t (format past (abs diff))) > (org-agenda-format-item (let ((diff (if (< (org-today) current) diff > (- deadline current (if (= diff 0) (car > org-agenda-deadline-leaders) (let ((future (nth > 1 org-agenda-deadline-leaders)) (past (nth > 2 org-agenda-deadline-leaders))) (cond ((> diff 0) (format future > diff)) ((string= future past) (format past diff)) (t (format past > (abs diff))) head level category tags (and (= diff 0) timestr)) I cannot reproduce it. What is your value for `org-agenda-deadline-leaders'? It should consists of 3 strings. Regards, -- Nicolas Goaziou
Re: [O] interaction between org-latex-custom-lang-environments and name when exporting to latex
Alan Schmitt writes: >> It should be a defcustom. Feel free to fix it, preferably in a separate >> patch. > > Here is a patch to do so. > > From b94b5ba0bdb619cb9047efb19432216812eaf6a2 Mon Sep 17 00:00:00 2001 > From: Alan Schmitt > Date: Mon, 30 Nov 2015 13:07:56 +0100 > Subject: [PATCH] ox-latex: Make org-latex-custom-lang-environments a defcustom > > * ox-latex.el (org-latex-custom-lang-environments): Change from defvar > into a defcustom. > --- > lisp/ox-latex.el | 11 +-- > 1 file changed, 9 insertions(+), 2 deletions(-) > > diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el > index eaad29f..407df6b 100644 > --- a/lisp/ox-latex.el > +++ b/lisp/ox-latex.el > @@ -1021,7 +1021,7 @@ block-specific options, you may use the following > syntax: > (string :tag "Minted option name ") > (string :tag "Minted option value" > > -(defvar org-latex-custom-lang-environments nil > +(defcustom org-latex-custom-lang-environments nil >"Alist mapping languages to language-specific LaTeX environments. > > It is used during export of src blocks by the listings and minted > @@ -1062,7 +1062,14 @@ will produce >\\end{minted} >\\caption{} >\\label{} > - \\end{listing}") > + \\end{listing}" > + :group 'org-export-latex > + :type '(repeat > + (list > +(symbol :tag "Language name") > +(string :tag "Environment name or format string"))) I don't know if the strings have to the same width, but I assume you tested it before hand. For me at least this is the only way to evaluate Custom changes. To me it looks fine. Thanks a lot, Alan! Rasmus -- When in doubt, do it!
Re: [O] interaction between org-latex-custom-lang-environments and name when exporting to latex
Hi, On 2015-11-27 22:05, Rasmus writes: >>> Also, you need to denote that the defcustom was changed. >>> >>> :version "25.1" >>> :package-version '(Org . "9.0") >>> >>> When you are at it, please add the missing tags, :group and :type. >> >> It's not a defcustom but a defvar. (But maybe it should be a defcustom …) > > It should be a defcustom. Feel free to fix it, preferably in a separate > patch. Here is a patch to do so. From b94b5ba0bdb619cb9047efb19432216812eaf6a2 Mon Sep 17 00:00:00 2001 From: Alan Schmitt Date: Mon, 30 Nov 2015 13:07:56 +0100 Subject: [PATCH] ox-latex: Make org-latex-custom-lang-environments a defcustom * ox-latex.el (org-latex-custom-lang-environments): Change from defvar into a defcustom. --- lisp/ox-latex.el | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el index eaad29f..407df6b 100644 --- a/lisp/ox-latex.el +++ b/lisp/ox-latex.el @@ -1021,7 +1021,7 @@ block-specific options, you may use the following syntax: (string :tag "Minted option name ") (string :tag "Minted option value" -(defvar org-latex-custom-lang-environments nil +(defcustom org-latex-custom-lang-environments nil "Alist mapping languages to language-specific LaTeX environments. It is used during export of src blocks by the listings and minted @@ -1062,7 +1062,14 @@ will produce \\end{minted} \\caption{} \\label{} - \\end{listing}") + \\end{listing}" + :group 'org-export-latex + :type '(repeat + (list + (symbol :tag "Language name") + (string :tag "Environment name or format string"))) + :version "25.1" + :package-version '(Org . "9.0")) Compilation -- 2.6.3 > The rest looks good to me. Feel free to push (modulus someone else saying > otherwise). Thanks a lot, I pushed it. Best, Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ (Updated November 29, 2015, Mauna Loa Obs.): 400.37 ppm signature.asc Description: PGP signature
Re: [O] Citation processing via Zotero + zotxt
Dear Eric, On Mon, 30-11-2015, at 12:35, Eric S Fraga wrote: > On Saturday, 28 Nov 2015 at 12:16, Richard Lawrence wrote: >> Hi everyone, >> >> For the past few days, I've been looking more closely at using the >> combination of Zotero [1] with Erik Hetzner's zotxt plugin [2] as a >> means of processing citations when exporting to non-LaTeX backends. I >> am now thinking that this is probably our best option, but I'd like to >> know what other people think before I sink a lot of work into it. > > Richard, > > thanks for the long and descriptive email. What you propose does seem > like a potentially attractive way forward especially in the context of > minimal impact for installation. > > I have two questions: > > 1. Is Zotero open source? I believe not so I wonder about the >implications of this for org. > Yes, it is open source (GNU GPL Affero, v.3): https://www.zotero.org/support/licensing And code is available from github: https://github.com/zotero Best, R. > 2. How would I use this starting from an org-bibtex database (which I >typically export to bibtex)? > > Regardless, my export requirements are usually satisfied by export to > LaTeX so my main concern will not be org to odt or HTML but on the user > interface aspects within org for inserting citations etc. > > Thanks again, > eric -- Ramon Diaz-Uriarte Department of Biochemistry, Lab B-25 Facultad de Medicina Universidad Autónoma de Madrid Arzobispo Morcillo, 4 28029 Madrid Spain Phone: +34-91-497-2412 Email: rdia...@gmail.com ramon.d...@iib.uam.es http://ligarto.org/rdiaz
Re: [O] asynchronous python code blocks in org-mode
* John Kitchin wrote: > Hi everyone, Hi John! > I worked out some ideas on running Python blocks asynchronously in > org-mode, while seeing the output of the code, /and/ still capturing the > output in org-mode! Found the link to your video + blog on Twitter. On the weekend, I watched it with big eyes and tried your code on my side as well: great work! > It seems to work pretty well as a proof of concept, but the present > approach has some limitations, e.g. no sessions, no src-block :var, and > maybe others. These might be fixable at some point. > > Anyway, I thought I would share it, to see if anyone has thoughts on > it, and in case it looks useful to you. I'm loving it. I'd love to see this async method for shell script as well. Many shell snippets I am using do take some time: backup, audio conversion, bulk image conversion, ... 1) How big is the chance that we're going to see async babel block execution by default in a future org-mode release? 2) In the meantime: Wouldn't it be nice to have additional source-block definitions like python + apython (for asynchronous python) or sh + ash? -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
Re: [O] Citation processing via Zotero + zotxt
On Saturday, 28 Nov 2015 at 12:16, Richard Lawrence wrote: > Hi everyone, > > For the past few days, I've been looking more closely at using the > combination of Zotero [1] with Erik Hetzner's zotxt plugin [2] as a > means of processing citations when exporting to non-LaTeX backends. I > am now thinking that this is probably our best option, but I'd like to > know what other people think before I sink a lot of work into it. Richard, thanks for the long and descriptive email. What you propose does seem like a potentially attractive way forward especially in the context of minimal impact for installation. I have two questions: 1. Is Zotero open source? I believe not so I wonder about the implications of this for org. 2. How would I use this starting from an org-bibtex database (which I typically export to bibtex)? Regardless, my export requirements are usually satisfied by export to LaTeX so my main concern will not be org to odt or HTML but on the user interface aspects within org for inserting citations etc. Thanks again, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3beta-1229-ge900eb
[O] WORG git down? (was: orgmode.org is down?)
* Robert Klein wrote: > Hi, > > Bastien apparently already restarted it. > Thanks a lot, Bastien! Thanks! However, did this affect the WORG git repository? I haven't accessed the git a couple of weeks but now I can't pull any more: , | vk@sherri ~/archive/fromweb/src/worg (git)-[master] % git pull | Permission denied (publickey). | fatal: Could not read from remote repository. | | Please make sure you have the correct access rights | and the repository exists. | 1 vk@sherri ~/archive/fromweb/src/worg (git)-[master] % ` -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
[O] [bug] org-agenda view fails if I have missed a deadline
(posted this to gnus mailing list by mistake... sigh) Hello, with org up to date as of a minute ago, if I try to view my current agenda, which happens to have an entry that has missed its deadline (i.e. the deadline is in the past), org fails with an error: --8<---cut here---start->8--- Debugger entered--Lisp error: (wrong-type-argument stringp nil) format(nil 1) (cond ((> diff 0) (format future diff)) ((string= future past) (format past diff)) (t (format past (abs diff (let ((future (nth 1 org-agenda-deadline-leaders)) (past (nth 2 org-agenda-deadline-leaders))) (cond ((> diff 0) (format future diff)) ((string= future past) (format past diff)) (t (format past (abs diff) (if (= diff 0) (car org-agenda-deadline-leaders) (let ((future (nth 1 org-agenda-deadline-leaders)) (past (nth 2 org-agenda-deadline-leaders))) (cond ((> diff 0) (format future diff)) ((string= future past) (format past diff)) (t (format past (abs diff)) (let ((diff (if (< (org-today) current) diff (- deadline current (if (= diff 0) (car org-agenda-deadline-leaders) (let ((future (nth 1 org-agenda-deadline-leaders)) (past (nth 2 org-agenda-deadline-leaders))) (cond ((> diff 0) (format future diff)) ((string= future past) (format past diff)) (t (format past (abs diff))) (org-agenda-format-item (let ((diff (if (< (org-today) current) diff (- deadline current (if (= diff 0) (car org-agenda-deadline-leaders) (let ((future (nth 1 org-agenda-deadline-leaders)) (past (nth 2 org-agenda-deadline-leaders))) (cond ((> diff 0) (format future diff)) ((string= future past) (format past diff)) (t (format past (abs diff))) head level category tags (and (= diff 0) timestr)) --8<---cut here---end--->8--- Changing the deadline in the offending entry allows the agenda to be shown. Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3beta-816-gae83b3
Re: [O] Citation processing via Zotero + zotxt
Hi Richard. Thank you for your work on improving citation support for org-mode. I have some experiences from using Zotero, but for the moment I'm using org-ref[1] to manage my citations. Richard Lawrence writes: > For the past few days, I've been looking more closely at using the > combination of Zotero [1] with Erik Hetzner's zotxt plugin [2] as a > means of processing citations when exporting to non-LaTeX backends. I > am now thinking that this is probably our best option, but I'd like to > know what other people think before I sink a lot of work into it. > > Here are the reasons I think this is the best option: > > 1) It is really easy for users. I think ease of use is very important. Maybe some day we can talk with Zotero directly from Emacs, but installing a browser extension seems to be the easiest we can do for now. > I know that many people (perhaps especially the `power users' who have > been active in the citations discussion so far) prefer to maintain their > reference database without the aid of a GUI reference manager like > Zotero. Maybe two way sync between BibTeX and Zotero would be sufficient for power users? I know there is already automatic exporters to BibTex for Zotero, but some work needs to be done to make it a two-way sync. I don't mind the GUI for editing the bibliography database, especially when the Zotero Translators [2] make such a good job for scraping citation metadata directly from web pages. I wouldn't like to use the Zotero GUI for bibliography notes. I think the best feature of org-ref is that the bibliography notes are stored in an org-mode file, my preferred note-taking tool. Will this be supported with the new citation processing you are working on? Best regards, Martin Yrjölä [1] https://github.com/jkitchin/org-ref [2] https://www.zotero.org/support/dev/translators