Re: [O] AUCTeX key bindings within Org documents
Hello Fabrice, Hi everybody, Thanks a lot Fabrice for your package to get AUCTeX key binginds within Org documents. Maybe I do not use it correctly by I want to point out to you some unwanted results: #+begin_equation \label{ECQ} \neg A , A \vdash B \tag{ECQ} #+end_equation exported in LaTeX is translated in .tex file: \begin{equation} \label{ECQ} $\neg{}$ A , A \vdash B \tag{ECQ} \end{equation} and of course it does not work. My question is therefore more general: how writing scienfific papers in org-mode documents i.e. how writing useful environments like equation, bussproofs, fitch, etc. every useful package for logicians, mathematicians, etc. ? In advance, thanks for your help. Jo. -- Joseph Vidal-Rosset Archives Poincaré 91, Bd. Libération BP 454 F-54001 NANCY Cedex Site web: http://www.philfree.org Google Talk - MSN login: joseph.vidal.ros...@gmail.com
Re: [O] Unable to finalize capture
On Oct 4, 2013, at 23:04 PM, Nick Dokos wrote: Dror Atariah dror...@gmail.com writes: M-x locate-library RET org RET Returns: Library is file ~/.emacs.d/elpa/org-plus-contrib-20130930/org.elc N.B. Never used elpa, so take with appropriately sized grain of salt. Not sure whether this is a problem, but why is org.elc in the main directory and not under ~/.emacs.d/elpa/org-plus-contrib-20130930/org/lisp? Maybe you are using a left-over org.elc? Probably, this is somehow the case... I think the directory structure that you can see is the default one of ELPA - I don't think I tweaked it. and M-x list-load-path-shadows RET Returns (I hope I collected only the relevant entries): /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130930/org hides /Users/user_name/.emacs.d/elpa/org-20130930/org /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130930/org hides /Users/user_name/.emacs.d/elpa/org-20130812/org /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130930/org hides /Users/user_name/.emacs.d/elpa/org-20130923/org /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130930/org hides /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130812/org /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130930/org hides /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130923/org /Users/user_name/.emacs.d/elpa/org-plus-contrib-20130930/org hides /Applications/Emacs.app/Contents/Resources/lisp/org/org I guess that the above output suggests that org-mode is properly installed (via ELPA), isn't it? I'm afraid that I am not hinted by this output. Check that your org.el does include the definition of the variable. Then load the uncompiled version using an explicit path: The file ~/.emacs.d/elpa/org-plus-contrib-20130930/org.el contains the definition of the variable org-bookmark-names-plist M-x load-file RET /Users/user_name/.emacsd./elpa//org/lisp/org.el RET *Now* is the variable defined? If so, does capture work? Indeed, loading it manually, solved the problem. I'd probably clean up the .elc files and compile anew. Then restart emacs. I didn't know how to recompile the files, and what exactly do you mean by cleaning the .elc's; so I did something else. I removed the old directories of org-mode from the ELPA directory, restarted emacs and it now seems to work fine. Thanks and all the best, Dror
Re: [O] proposal for a tool to translate orgmode outlines into programs
Isaac isaac...@gmail.com writes: Hi Isaac, Thomas S. Dye tsd at tsdye.com writes: Aloha Isaac, This sounds to me a lot like literate programming, which can be accomplished in Org with very many languages, including ruby and python (but not lua, yet). See http://orgmode.org/worg/org-contrib/babel/languages.html. An advantage of literate programming is that it generates documentation in addition to the program code. hth, Tom yes and no - it's literate programming, but rather than programming in orgmode - it's translating orgmode (thoughts) to build a skeleton of codes for code generation ... not sure if someone has done something similar before? it would be good to know. Assume this is file tmp.org: #+begin_src org * A*B*/C/ *Fett* and /Kursiv/ text and some Programmtext: ~var = x + y~ #+end_src eval this in the *scratch* buffer: #+begin_src emacs-lisp (with-current-buffer (find-file /path/to/tmp.org) (let ((print-circle t)) ; or nil (print (org-element-parse-buffer #+end_src and you get the org-file as a nested list (parse-tree) [fn:1]: #+begin_src emacs-lisp #2=(org-data nil #1=(headline (:raw-value A*B*/C/ :begin 1 :end 75 :pre-blank 0 :hiddenp nil :contents-begin 11 :contents-end 75 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :CATEGORY nil :title (#(A*B*/C/ 0 7 (:parent #1#))) :parent #2#) #3=(section (:begin 11 :end 75 :contents-begin 11 :contents-end 75 :post-blank 0 :parent #1#) #4=(paragraph (:begin 11 :end 75 :contents-begin 11 :contents-end 75 :post-blank 0 :post-affiliated 11 :parent #3#) #5=(bold (:begin 11 :end 18 :contents-begin 12 :contents-end 16 :post-blank 1 :parent #4#) #(Fett 0 4 (:parent #5#))) #(and 0 4 (:parent #4#)) #6=(italic (:begin 22 :end 31 :contents-begin 23 :contents-end 29 :post-blank 1 :parent #4#) #(Kursiv 0 6 (:parent #6#))) #(text and some Programmtext: 0 29 (:parent #4#)) (code (:value var = x + y :begin 60 :end 74 :post-blank 1 :parent #4#)) #( 0 1 (:parent #4#)) #+end_src Checkout Org elements: #+begin_src sh org-element-all-elements is a variable defined in `org-element.el'. Its value is (babel-call center-block clock comment comment-block diary-sexp drawer dynamic-block example-block export-block fixed-width footnote-definition headline horizontal-rule inlinetask item keyword latex-environment node-property paragraph plain-list planning property-drawer quote-block quote-section section special-block src-block table table-row verse-block) Complete list of element types. #+end_src and Org objects: #+begin_src sh org-element-all-objects is a variable defined in `org-element.el'. Its value is (bold code entity export-snippet footnote-reference inline-babel-call inline-src-block italic line-break latex-fragment link macro radio-target statistics-cookie strike-through subscript superscript table-cell target timestamp underline verbatim) Complete list of object types. #+end_src Now in lisp there is the equivalence of code and data, thus this is data #+begin_src emacs-lisp '(paragraph (:begin 11 :end 75 :contents-begin 11 :contents-end 75 :post-blank 0 :post-affiliated 11 :parent nil) #+end_src but the following would be code, if a there would be a #+begin_src emacs-lisp (defun paragraph (plst) (message I print my argument: %s plst)) #+end_src #+results: : paragraph defined somewhere = #+begin_src emacs-lisp (eval (paragraph '(:begin 11 :end 75 :contents-begin 11 :contents-end 75 :post-blank 0 :post-affiliated 11 :parent nil))) #+end_src gives #+results: : I print my argument: (:begin 11 :end 75 :contents-begin 11 :contents-end : 75 :post-blank 0 :post-affiliated 11 :parent nil) so in a certain sense, the new org-parser already transforms the plain text of an org document into lisp (code = data), only that nobody has written functions for the elements and objects yet, the parse-tree is just used as data for the exporter. * Footnotes [fn:1] Those #1= and #1# are only print-syntax, otherwise they are references to already defined elisp objects. -- cheers, Thorsten
[O] org-mode export to html with png images
Hello everybody, I do not succeed to get correct results with exporting .png images for html files with specific formulas , for example, with #+OPTIONS: tex:dvipng the formula \begin{prooftree} \AxiomC{\scriptsize{1}} \noLine \UnaryInfC{[image: [\neg A \land A]]} \RightLabel{\scriptsize{[image: \land E]}} \UnaryInfC{[image: \neg A]} \AxiomC{\scriptsize{1}} \noLine \UnaryInfC{[image: [\neg A \land A]]} \RightLabel{\scriptsize{[image: \land E]}} \UnaryInfC{[image: A]} \RightLabel{\scriptsize{[image: \neg E]}} \BinaryInfC{[image: \bot]} \RightLabel{\scriptsize{[image: \to I~1]}} \UnaryInfC{[image: (\neg A \land A) \to B]} \end{prooftree} does not give a correct .png image for browsers. Suggestions? (with imagemagick it is not better). Thanks Jo.
Re: [O] AUCTeX key bindings within Org documents
Hi Joseph, Joseph Vidal-Rosset wrote: Thanks a lot Fabrice for your package to get AUCTeX key binginds within Org documents. You're welcome. Still a work in progress -- have to address the points of Nicolas, Suvayu and Marcin, among others. Maybe I do not use it correctly by I want to point out to you some unwanted results: #+begin_equation \label{ECQ} \neg A , A \vdash B \tag{ECQ} #+end_equation exported in LaTeX is translated in .tex file: \begin{equation} \label{ECQ} $\neg{}$ A , A \vdash B \tag{ECQ} \end{equation} and of course it does not work. My question is therefore more general: how writing scienfific papers in org-mode documents i.e. how writing useful environments like equation, bussproofs, fitch, etc. every useful package for logicians, mathematicians, etc. ? I don't have experience with mathematics in Org nor in LaTeX. The problem you point out does not seem to be related in any way to org-auctex-keys.el, though. Could you try different variations of your code: all the inside code on one line, or all lines with indentation (I see that \neg is not indented), or... and see whether some work. This should anyway be reported as a separate problem from the AUCTeX key bindings. Best regards, Fabrice -- Fabrice Niessen Leuven, Belgium
[O] [PATCH] Small improvement of maintainability of link escaping
Hi all I would like to ask to review and apply the attached patch. It is to have a timely separatation from a related change that I will suggest with an ERT in a later patch: Just add + to org-link-escape-chars-browser. Michael From 119aad10f2144a1397f2b034bef46dc891dbae5a Mon Sep 17 00:00:00 2001 From: Michael Brand michael.ch.br...@gmail.com Date: Mon, 30 Sep 2013 20:32:29 +0200 Subject: [PATCH] org-table-transpose-table-at-point: Preserve indentation and point * lisp/org-table.el (org-table-transpose-table-at-point): Preserve indentatinon of first row. Restore point to transposed field in transposed table. --- lisp/org-table.el | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/lisp/org-table.el b/lisp/org-table.el index 5bc754c..7be77cc 100644 --- a/lisp/org-table.el +++ b/lisp/org-table.el @@ -1834,7 +1834,7 @@ blindly applies a recipe that works for simple tables. (goto-char beg) (defun org-table-transpose-table-at-point () - Transpose orgmode table at point and eliminate hlines. + Transpose Org table at point and eliminate hlines. So a table like | 1 | 2 | 4 | 5 | @@ -1849,9 +1849,11 @@ will be transposed as | 4 | c | g | | 5 | d | h | -Note that horizontal lines disappeared. +Note that horizontal lines disappear. (interactive) (let* ((table (delete 'hline (org-table-to-lisp))) +(dline_old (org-table-current-line)) +(col_old (org-table-current-column)) (contents (mapcar (lambda (p) (let ((tp table)) (mapcar @@ -1861,10 +1863,17 @@ Note that horizontal lines disappeared. (setq tp (cdr tp table))) (car table -(delete-region (org-table-begin) (org-table-end)) -(insert (mapconcat (lambda(x) (concat | (mapconcat 'identity x | ) |\n )) - contents )) -(org-table-align))) +(goto-char (org-table-begin)) +(re-search-forward |) +(backward-char) +(delete-region (point) (org-table-end)) +(insert (mapconcat +(lambda(x) + (concat | (mapconcat 'identity x | ) |\n )) +contents )) +(org-table-goto-line col_old) +(org-table-goto-column dline_old)) + (org-table-align)) ;;;###autoload (defun org-table-wrap-region (arg) -- 1.7.12.4 (Apple Git-37)
Re: [O] [PATCH] Small improvement of maintainability of link escaping
Sorry, I attached the wrong patch (the other one that is waiting in another thread), here again. From 6d5f603058211ade3b5db118cb3a7d04fbf52a6e Mon Sep 17 00:00:00 2001 From: Michael Brand michael.ch.br...@gmail.com Date: Sat, 5 Oct 2013 15:00:25 +0200 Subject: [PATCH] Small improvement of maintainability of link escaping * lisp/org.el (org-link-escape-chars): Add comment with escape numbers alphabetically ordered. (org-link-escape-chars-browser): Add comment with escape numbers. (org-link-escape): Use better readable char constant instead of number constant for percent char. (org-link-escape-browser): New function to substitute duplicate source code. (org-open-at-point): Substitute duplicate source code. * testing/README: Make comment in source code example clearer. * testing/lisp/test-org.el (test-org/org-link-escape-chars-browser): Change URL to real use case and use the new function `org-link-escape-browser'. --- lisp/org.el | 32 ++-- testing/README | 4 ++-- testing/lisp/test-org.el | 8 +--- 3 files changed, 21 insertions(+), 23 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index 5ff9969..9149441 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -9732,11 +9732,13 @@ according to FMT (default from `org-email-link-description-format'). ])) (defconst org-link-escape-chars - '(?\ ?\[ ?\] ?\; ?\= ?\+) + ;;%20 %2B %3B %3D %5B %5D + '(?\ ?\+ ?\; ?\= ?\[ ?\]) List of characters that should be escaped in link. This is the list that is used for internal purposes.) (defconst org-link-escape-chars-browser + ;;%20 %22 '(?\ ?\) List of escapes for characters that are problematic in links. This is the list that is used before handing over to the browser.) @@ -9758,7 +9760,7 @@ If optional argument MERGE is set, merge TABLE into (mapconcat (lambda (char) (if (or (member char table) -(and (or ( char 32) (= char 37) ( char 126)) +(and (or ( char 32) (= char ?\%) ( char 126)) org-url-hexify-p)) (mapconcat (lambda (sequence-element) (format %%%.2X sequence-element)) @@ -9767,6 +9769,13 @@ If optional argument MERGE is set, merge TABLE into (char-to-string char))) ) (char-to-string char))) text )) +(defun org-link-escape-browser (text) + (if (org-string-match-p + (concat [[:nonascii:] org-link-escape-chars-browser ]) + text) + (org-link-escape text org-link-escape-chars-browser) +text)) + (defun org-link-unescape (str) Unhex hexified Unicode strings as returned from the JavaScript function encodeURIComponent. E.g. `%C3%B6' is the german o-Umlaut. @@ -10467,24 +10476,11 @@ application the system uses for this file type. (apply cmd (nreverse args1 ((member type '(http https ftp news)) - (browse-url -(concat type : -(if (org-string-match-p - (concat [[:nonascii:] - org-link-escape-chars-browser ]) - path) -(org-link-escape path org-link-escape-chars-browser) - path + (browse-url (concat type : (org-link-escape-browser path ((string= type doi) - (browse-url -(concat org-doi-server-url -(if (org-string-match-p - (concat [[:nonascii:] - org-link-escape-chars-browser ]) - path) -(org-link-escape path org-link-escape-chars-browser) - path + (browse-url (concat org-doi-server-url + (org-link-escape-browser path ((member type '(message)) (browse-url (concat type : path))) diff --git a/testing/README b/testing/README index 9601ea7..e25a109 100644 --- a/testing/README +++ b/testing/README @@ -64,9 +64,9 @@ load and run the test suite with the following commands. Use this as a demo example of a failing test #+BEGIN_SRC emacs-lisp (ert-deftest test-org/org-link-escape-ascii-character-demo-of-fail () - (should (string= %5B ;; expected is right + (should (string= %5B ;; expecting %5B is right (org-link-escape [))) - (should (string= %5C ;; expected is wrong, %5D would be right + (should (string= %5C ;; expecting %5C is wrong, %5D right (org-link-escape ] #+END_SRC or evaluate the ert-deftest form of the test you want to run. Then diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el index b6c5558..32fa69e 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -524,9 +524,11 @@ http://article.gmane.org/gmane.emacs.orgmode/21459/; Escape a URL to pass to `browse-url'. (should (string= -
Re: [O] AUCTeX key bindings within Org documents
2013/10/5 Fabrice Niessen fni-n...@pirilampo.org I don't have experience with mathematics in Org nor in LaTeX. The problem you point out does not seem to be related in any way to org-auctex-keys.el, though. Yes, you are probably right. But the problem lies in the fact that org-mode syntax environment produces this result: #+begin_equation ... #+end_equation contrary to latex syntax \begin{equation} ... \end{equation} , have side effects. And the question is then why is it nececessary to adopt another syntax environment in org-mode ? Could you try different variations of your code: all the inside code on one line, or all lines with indentation (I see that \neg is not indented), or... and see whether some work. I've tried it. One gets the same result. Best Jo.
Re: [O] proposal for a tool to translate orgmode outlines into programs
Isaac isaac...@gmail.com writes: proposal for a tool to translate orgmode outlines into programs Hi Isaac, This is a hard problem and an area of active research. Search for program synthesis [1] to see a selection of work in this field. Generally programs are built from descriptions in formal languages which are much more structured than Org-mode, although some have also tried to automatically write programs from man pages [2]. Armando Solar-Lezama's work [3] is related if we are including code snippets in Org-mode code blocks, namely program sketching [4] which attempts to build programs from incomplete program-language sketches and test cases. Best, Footnotes: [1] http://scholar.google.com/scholar?q=program%20synthesis [2] https://www.usenix.org/conference/hotosxiii/macho-programming-man-pages [3] http://people.csail.mit.edu/asolar/ [4] http://people.csail.mit.edu/asolar/papers/thesis.pdf -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D
Re: [O] [export] Beamer frames containing lstlisting are no longer made fragile
Hi Nicolas, I'm sorry I hadn't got back to this email – didn't notice it because of a filtering mistake on my side. 2013-09-14 15:33 Nicolas Goaziou: Christoph LANGE math.semantic@gmail.com writes: Still I think the following sentence in the documentation (section 12.5) is easy to misunderstand: `fragile' option is added automatically if it contains source code that uses any verbatim environment. What would you suggest instead? Let me see; I'd first have to understand how this mechanism works. I do not think it works in the same was as the old exporter worked. I.e. I think the new mechanism does not automatically add [fragile] on, e.g., encountering the following: #+LATEX: \begin{lstlisting} #+LATEX: ... #+LATEX: \end{lstlisting} I think it means that when I use a proper source block using #+BEGIN_SRC, the exporter automatically sets the [fragile] option as needed. It isn't just about source blocks, see `org-beamer-verbatim-elements'. OK, I had checked this variable before, but I don't understand it. The documentation says List of element or object types producing verbatim text. I presume elements and objects refer to things in Org-mode, from which LaTeX is only generated later in the export process. And as the only thing (element or object?) on the Org-mode side that generates {lstlisting} environments is a SRC-BLOCK, there is probably no way of teaching the exporter the pre-Org-8.0 behaviour explained above, i.e. enabling [fragile] on encountering \begin{lstlisting}. Anyway, you told me how to make my legacy {lstlisting} environments work. Is this approach, of manually setting BEAMER_OPT: fragile the preferred way whenever you have a listing in a non-standard language, where the {lstlisting} environment requires special arguments (e.g. morekeywords)? Or is there some way of passing extra arguments into the {lstlisting} environment that is created from #+BEGIN_SRC? At the moment, the only way to pass extra arguments to lstlisting is using `org-latex-listings-options'. IOW, it isn't possible to set specific options for a given block. Though, it should be fairly easy to implement an :extra attribute for source blocks. E.g., #+attr_latex: :extra key1=val1,key2=val2 #+begin_src ... #+end_src Such a feature would of course be nice to have. But it doesn't have the highest priority for me, as I managed to reuse my existing #+LATEX: \begin{lstlisting} code, and as I'm not currently planning to export these Org files to anything else but LaTeX-Beamer. Cheers, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/
Re: [O] [export] Beamer frames containing lstlisting are no longer made fragile
Hi Eric, I'm sorry I hadn't got back to this email – didn't notice it because of a filtering mistake on my side. 2013-09-16 08:51 Eric S Fraga: My intuition after browsing the Org source code and documentation is that I should now use #+BEGIN_SRC and that then everything will be handled automatically. However the language of my listings is a non-standard one, which requires a lot of custom options to the lstlisting environment. Could anyone kindly point me to an example? I am not sure what it is you want an example of? I was interested in an example of defining a new language, including keywords and comment and string syntaxes etc., so that one can use it with #+BEGIN_SRC and that the exporter (case 4 of (defun org-latex-src-block) in ox-latex.el) will create the right \lstset{...}\begin{lstlisting}...\end{lstlisting} output. I presume it boils down to adding a custom language to Babel, but that's something I haven't done before. If it's how to configure lstlisting for a new language, here are two examples: Thanks! With this way I'm familiar. In case it may be of interest to anyone, I recently made public a LaTeX package with \lstdefinelanguage settings for a lot of languages I am interested in (mainly from the Semantic Web): https://github.com/clange/latex/blob/master/lstsemantic.sty. Cheers, Christoph -- Christoph Lange, School of Computer Science, University of Birmingham http://cs.bham.ac.uk/~langec/, Skype duke4701 → Mathematics in Computer Science Special Issue on “Enabling Domain Experts to use Formalised Reasoning”; submission until 31 October. http://cs.bham.ac.uk/research/projects/formare/pubs/mcs-doform/
[O] Hide some timestamp repetitions; timestamp property in agenda
Greetings. I am pretty sure that the following can be done, I just do not know how. 1. In general I want to see repeated timestamps, TODOs etc. appear at every repeat, so I need to have the value of org-agenda-repeating-timestamp-show-all set to t. However, for *some* repeated timestamps I would only like to see only the next repeated instance. How do I accomplish this? 2. I have some events that take place multiple times in a week. This is easy to accomplish: * Learn something new about org-mode 2013-10-05 Sat 17:00-18:00 +1w 2013-10-06 Sun 12:00-14:00 +1w However, I would also like to associate, with each of these timestamps, a different piece of text. Most often this text is a location. I want to see this text in my agenda. How can this be done? I would also like to say that org is gradually allowing me to better control an increasing proportion of my activities. All the best, Jarmo
[O] Help on spreadsheet/calc references and improvements
Hi! I am no expert with calc. I enjoy using it for rather simple things. However, I would like to use referencing more often and I face an issue here. Additionally, I got the feeling that some formulas could be improved as well. I did a very basic example in two ways: vertical layout and horizontal layout. The reason for this is, that I got the feeling that referencing a set of values (not a single cell) differs in capabilities from rows to columns. - possible improvements - remote reference to multiple cells - only one formula for summing up the columns or rows - simpler referencing in general? Headings ending with a plus sign are rows/columns that ought to be entered manually (as a basis). Others should get calculated or filled using references. I hope the example is self-explanatory. Names ending with -WIST are tables I would like to get using formulas. Names ending with -TRY are draft versions that demonstrate referencing issues. Further TBLFM below the TRY versions contain other attempts. Feel free to make suggestions how to overcome my lack of knowledge :-) Thanks! #+NAME: Data23vert | Descr+ | Data1+ | Data2+ | |++| | foo| 12 | 10 | | bar| 22 | 24 | | baz| 16 | 17 | |++| | sum| 50 | 51 | #+NAME: Calc23vert-WISH | Descr | Data2 | Double | |---+---+-| | foo |10 | 20 | | bar |24 | 48 | | baz |17 | 34 | |---+---+-| | sum |51 | 102 | #+TBLFM: FIXXME #+NAME: Calc23vert-TRY | Descr | Data2 | Double | |---+---+-| | foo |24 | 48 | | bar |24 | 48 | | baz |24 | 48 | |---+---+-| | sum |72 | 144 | #+TBLFM: @I$2..@II$2=subscr(remote(Data23vert, @I$..@II$), $#)::@I$3..@II$3=$2*2::@5$2=vsum(@I$2..@II$2)::@5$3=vsum(@I$3..@II$3) #+TBLFM: @I$2..@II$2 = subscr(remote(Data23vert, @I$..@II$), $#) ... results in 24 in each field (btw, I got the subscr() trick here in the ML but I have to admit that [1] did not lead to a understanding of it.) #+TBLFM: @I$2..@II$2 = remote(Data23vert, @I$..@II$) ... results in list in each field #+NAME: Data23horiz | Descr+ | foo | bar | baz | sum | |+-+-+-+-| | Data1+ | 12 | 22 | 16 | 50 | | Data2+ | 10 | 24 | 17 | 51 | #+NAME: Calc23horiz-WISH | Descr | foo | bar | baz | sum | |-+-+-+-+-| | Data2 | 10 | 24 | 17 | 51 | | Double | 20 | 48 | 34 | 102 | #+TBLFM: FIXXME #+NAME: Calc23horiz-TRY | Descr | foo | bar | baz | sum | |-+--+--+--+-| | Data2 | [10, 24, 17] | [10, 24, 17] | [10, 24, 17] | | | Double | | | | | #+TBLFM: @2$2..@2$4=remote(Data23horiz, @$2..@$4) #+TBLFM: @2$2..@2$4=subscr(remote(Data23horiz, @$2..@$4), $#) ... 24, 17, list - WTF? #+TBLFM: @2$2..@2$4=remote(Data23horiz, @$2..@$4) ... three identical lists instead of values 1. https://www.gnu.org/software/emacs/manual/html_node/calc/Extracting-Elements.html -- 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] Help on spreadsheet/calc references and improvements
Hi Karl On Sat, Oct 5, 2013 at 4:49 PM, Karl Voit devn...@karl-voit.at wrote: Feel free to make suggestions how to overcome my lack of knowledge You may want to look at the example $3 = remote(FOO, @@#$2) in the Org manual, then it becomes quite simple. #+NAME: Data23vert | Descr+ | Data1+ | Data2+ | |++| | foo| 12 | 10 | | bar| 22 | 24 | | baz| 16 | 17 | |++| | sum| 50 | 51 | #+NAME: Calc23vert-WISH | Descr | Data2 | Double | |---+---+-| | foo |10 | 20 | | bar |24 | 48 | | baz |17 | 34 | |---+---+-| | sum |51 | 102 | #+TBLFM: FIXXME #+NAME: Data23vert | Descr+ | Data1+ | Data2+ | |++| | foo| 12 | 10 | | bar| 22 | 24 | | baz| 16 | 17 | |++| | sum| 50 | 51 | | Descr | Data2 | Double | |---+---+| | foo |10 | 20 | | bar |24 | 48 | | baz |17 | 34 | |---+---+| | sum |51 |102 | #+TBLFM: $2 = remote(Data23vert, @@#$3) :: $3 = 2 * remote(Data23vert, @@#$3) #+NAME: Data23horiz | Descr+ | foo | bar | baz | sum | |+-+-+-+-| | Data1+ | 12 | 22 | 16 | 50 | | Data2+ | 10 | 24 | 17 | 51 | #+NAME: Calc23horiz-WISH | Descr | foo | bar | baz | sum | |-+-+-+-+-| | Data2 | 10 | 24 | 17 | 51 | | Double | 20 | 48 | 34 | 102 | #+TBLFM: FIXXME #+NAME: Data23horiz | Descr+ | foo | bar | baz | sum | |+-+-+-+-| | Data1+ | 12 | 22 | 16 | 50 | | Data2+ | 10 | 24 | 17 | 51 | | Descr | foo | bar | baz | sum | |+-+-+-+-| | Data2 | 10 | 24 | 17 | 51 | | Double | 20 | 48 | 34 | 102 | #+TBLFM: @2$2..@2$5 = remote(Data23horiz, @3$$#) :: @3$2..@3$5 = 2 * remote(Data23horiz, @3$$#) Michael
[O] recurring events with different notes for each occurrence (was: Hide some timestamp repetitions; timestamp property in agenda)
* Jarmo Hurri jarmo.hu...@syk.fi wrote: Greetings. Hi Jarmo! I am pretty sure that the following can be done, I just do not know how. Is there a T-Shirt with this sentence available somewhere? *SCNR* 1. In general I want to see repeated timestamps, TODOs etc. appear at every repeat, so I need to have the value of org-agenda-repeating-timestamp-show-all set to t. However, for *some* repeated timestamps I would only like to see only the next repeated instance. How do I accomplish this? Sorry, no idea but interested as well. 2. I have some events that take place multiple times in a week. This is easy to accomplish: * Learn something new about org-mode 2013-10-05 Sat 17:00-18:00 +1w 2013-10-06 Sun 12:00-14:00 +1w However, I would also like to associate, with each of these timestamps, a different piece of text. Most often this text is a location. I want to see this text in my agenda. How can this be done? When I switched to Org-mode I was disappointed on the limited ways to do recurring events (without sexp): every 2nd Tuesday of a month, single exceptions, ... not possible. However, when I was told about org-clone-subtree-with-time-shift this changed :-) Now, I create a recurring event (let's say Linux User Group): ** 2013-10-07 17:00-19:00 +4w LUGG@City (you can even skip the +4w here) Next, I invoke org-clone-subtree-with-time-shift and multiply the event for the next year or so. This gets me a copy of the event for each occurrence. Those distinct events I can delete, cancel, move, add notes to, and so forth. I like this much better than one heading for all occurrences. -- 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] Help on spreadsheet/calc references and improvements
* Michael Brand michael.ch.br...@gmail.com wrote: Hi Karl Hi! You may want to look at the example $3 = remote(FOO, @@#$2) in the Org manual, then it becomes quite simple. :-) I have to admit that I found @@#$2 in the manual. However, I was not able to understand its meaning at all :-( With your example below, I begin to understand it a bit. Thanks! #+NAME: Data23vert | Descr+ | Data1+ | Data2+ | |++| | foo| 12 | 10 | | bar| 22 | 24 | | baz| 16 | 17 | |++| | sum| 50 | 51 | | Descr | Data2 | Double | |---+---+| | foo |10 | 20 | | bar |24 | 48 | | baz |17 | 34 | |---+---+| | sum |51 |102 | #+TBLFM: $2 = remote(Data23vert, @@#$3) :: $3 = 2 * remote(Data23vert, @@#$3) May I add another example I cannot cope with? | Descr | Current Data2+ | diff | abs.diff | |---++--+--| | foo | 9 | -1 |1 | | bar | 20 | -4 |4 | | baz | 23 | +6 |6 | |---++--+--| | sum | 52 | | 11 | $2 are manually entered values to compare Data2 from above. I still have no idea how to adopt your reference example for $3 and $4. Would you please help me one more time? #+NAME: Data23horiz | Descr+ | foo | bar | baz | sum | |+-+-+-+-| | Data1+ | 12 | 22 | 16 | 50 | | Data2+ | 10 | 24 | 17 | 51 | | Descr | foo | bar | baz | sum | |+-+-+-+-| | Data2 | 10 | 24 | 17 | 51 | | Double | 20 | 48 | 34 | 102 | #+TBLFM: @2$2..@2$5 = remote(Data23horiz, @3$$#) :: @3$2..@3$5 = 2 * remote(Data23horiz, @3$$#) Helped me a lot, thanks! ($$# is not mentioned in the Org-manual at all.) -- 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] Help on spreadsheet/calc references and improvements
Hi Karl On Sat, Oct 5, 2013 at 6:08 PM, Karl Voit devn...@karl-voit.at wrote: | Descr | Current Data2+ | diff | abs.diff | |---++--+--| | foo | 9 | -1 |1 | | bar | 20 | -4 |4 | | baz | 23 | +6 |6 | |---++--+--| | sum | 52 | | 11 | $2 are manually entered values to compare Data2 from above. I still have no idea how to adopt your reference example for $3 and $4. Would you please help me one more time? Here you are: #+NAME: Data23vert | Descr+ | Data1+ | Data2+ | |++| | foo| 12 | 10 | | bar| 22 | 24 | | baz| 16 | 17 | |++| | sum| 50 | 51 | | Descr | Current Data2+ | diff | abs.diff | |---++--+--| | foo | 9 | -1 |1 | | bar | 20 | -4 |4 | | baz | 23 |6 |6 | |---++--+--| | sum | 52 | | 11 | #+TBLFM: $3 = $2 - remote(Data23vert, @@#$3) :: $4 = abs($3) :: @5$3 = string() :: @5$4 = vsum(@I..@II) Or use $4 = abs($2 - remote(Data23vert, @@#$3)) if you prefer. Michael
Re: [O] custom emacs org-emphasis-alist breaks EXPORT, help ;-) ?
thx again Eric i still have an issue with this when one of the symbols used to start/end the highlight is used in a sentence, for example using your code: (font-lock-add-keywords 'org-mode '((-1-\\([^-1-]+\\)-1- (0 '(:weight ultra-bold :background #DDFFDD :foreground #00) t if i write this: -1- this is a test of 1x1 to show higlight -1- it will kill the highlight, if i use the same text omitting the '1' it works well, anyway around this issue? i thought it would have matcehd -1- but it seems it matches also just 1 by itself best wishes and thx again Z On Sat, Oct 5, 2013 at 7:42 AM, Eric Abrahamsen e...@ericabrahamsen.netwrote: Xebar Saram zelt...@gmail.com writes: Thank you so much Eric that works well apart from as you said it sometime spills over to other uneeded lines. any idea of how to limit the number of newlines that the regexp can match? really appreciate the help The easiest thing would be to add a newline to the list of non-matching characters, like this: \\(♩[^♩\n]+♩\\). That won't match _anything_ that goes longer than one line, though -- is that what you want? I'm actually not sure how to make the regexp match a specific number of newlines without things getting much more complicated... On Fri, Oct 4, 2013 at 12:15 PM, Eric Abrahamsen e...@ericabrahamsen.net wrote: Xebar Saram zelt...@gmail.com writes: Thank you again that works well but i think it dosent cover what i had in org. in org i use the ♩ symbol to highlight all the text between the 2 ♩, IE ♩ALL THIS TEXT IS HIGHLIGHTED♩, currently with the above code the ♩ is highlighted but not the text between, is it possible to do achive that with font-lock? i really appreciate your help! z Yup, it's pretty much the exact same thing, just with a different regexp. (font-lock-add-keywords 'org-mode '((\\(♩[^♩]+♩\\) (0 '(:weight ultra-bold :background # FFBF1E) t You can use ♩\\([^♩]+\\)♩ instead, if you only want the text between the symbols to be highlighted. It might be a good idea to somehow limit the number of newlines that the regexp can match, I'm not sure. Yours, Eric
Re: [O] proposal for a tool to translate orgmode outlines into programs
Eric Schulte schulte.eric at gmail.com writes: Isaac isaacpei at gmail.com writes: proposal for a tool to translate orgmode outlines into programs Hi Isaac, This is a hard problem and an area of active research. Search for program synthesis [1] to see a selection of work in this field. Generally programs are built from descriptions in formal languages which are much more structured than Org-mode, although some have also tried to automatically write programs from man pages [2]. Armando Solar-Lezama's work [3] is related if we are including code snippets in Org-mode code blocks, namely program sketching [4] which attempts to build programs from incomplete program-language sketches and test cases. Best, Footnotes: [1] http://scholar.google.com/scholar?q=program%20synthesis [2] https://www.usenix.org/conference/hotosxiii/macho-programming-man- pages [3] http://people.csail.mit.edu/asolar/ [4] http://people.csail.mit.edu/asolar/papers/thesis.pdf Thanks everybody for the references and knowledge of the parser! related, I happen to see this today from coffeescript site, which is somewhat related (orgmode export to markdown format) - and coffeescript literate is can use markdown as codes -maybe it's a direction ... (but javascript!) = Literate CoffeeScript Besides being used as an ordinary programming language, CoffeeScript may also be written in literate mode. If you name your file with a .litcoffee extension, you can write it as a Markdown document — a document that also happens to be executable CoffeeScript code. The compiler will treat any indented blocks (Markdown's way of indicating source code) as code, and ignore the rest as comments. Just for kicks, a little bit of the compiler is currently implemented in this fashion: See it as a document, raw, and properly highlighted in a text editor. I'm fairly excited about this direction for the language, and am looking forward to writing (and more importantly, reading) more programs in this style. More information about Literate CoffeeScript, including an example program, are available in this blog post. http://coffeescript.org/ best, Isaac
[O] Bug: Agenda tag filtering with spacebar [8.2 (8.2-4-ga1a0ac-elpa @ /Users/sergue\ ison/.emacs.d/elpa/org-20130923/)]
In the agenda filtering screen after pressing a spacebar I receive no entries, as opposed to receiving entries that have no tags. Works correctly expected in version 7.9 Emacs : GNU Emacs 24.2.1 (x86_64-apple-darwin12.2.0, NS apple-appkit-1187.34) of 2012-12-06 on Serguei-Sons-Mac-mini.local Package: Org-mode version 8.2 (8.2-4-ga1a0ac-elpa @ /Users/sergueison/.emacs.d/elpa/org-20130923/) 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-clock-into-drawer LOGBOOK org-confirm-shell-link-function 'yes-or-no-p org-agenda-custom-commands '((f Forster todo NEXT|TODAY ((org-agenda-sorting-strategy (quote (user-defined-up alpha-up))) (org-agenda-skip-function (quote org-skip-scheduled-in-the-future)) ) ) ) org-default-notes-file ~/Dropbox/org/notes.org org-todo-keyword-faces '((NEXT . orange)) org-after-todo-state-change-hook '(org-clock-out-if-current) org-todo-repeat-to-state NEXT 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-trigger-hook '(org-insert-timestamp-when-next) org-mode-hook '(#[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) org-agenda-cmp-user-defined 'org-agenda-cmp-timestamp org-refile-targets '((org-agenda-files :todo . PROJECT)) org-stuck-projects '(TODO=\PROJECT\ (TODAY NEXT WAITING APP) nil ) org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point org-babel-execute-safely-maybe) org-refile-use-outline-path 'file org-enforce-todo-dependencies t 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-todo-keywords '((sequence PROJECT(p!) NEXT(n!) TODAY(t) WAITING(w!) APP(a!) DONE(!)) ) org-modules '(org-bbdb org-bibtex org-docview org-gnus org-info org-irc org-mhe org-rmail org-w3m) org-confirm-elisp-link-function 'yes-or-no-p org-metadown-hook '(org-babel-pop-to-session-maybe) org-log-into-drawer t org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent) org-agenda-files '(~/Dropbox/org/projects.org) org-clock-out-hook '(org-clock-remove-empty-clock-drawer) )
[O] git push permissions
Hello, I want maintain: * org-license.el (http://orgmode.org/worg/code/elisp/org-license.el) * org-effectiveness (http://orgmode.org/worg/code/elisp/org-effectiveness.el) In the orgmode git. You can use my public ssh key, given in worg. I've signed all papers required by the fsf, and I appears in http://orgmode.org/worg/org-contribute.html as contributor. Must I do some step more? Thanks!
Re: [O] AUCTeX key bindings within Org documents
Hello Joseph, Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes: #+begin_equation \label{ECQ} \neg A , A \vdash B \tag{ECQ} #+end_equation IIUC, auckeys mode is not meant to insert latex constructs in org mode, but to get an org equivalent or org-like effect for a given key chord. The aim is to produce a classical org mode file, not a LaTeX only org mode file. My question is therefore more general: how writing scienfific papers in org-mode documents i.e. how writing useful environments like equation, bussproofs, fitch, etc. every useful package for logicians, mathematicians, etc. ? I never managed to do that in pure org mode : I sometimes write the outline in org but at some point I export to latex and go on from there. I'm so much more comfortable in auctex and latex, I have no plan to try doing everything in org mode. -- Nico.
Re: [O] AUCTeX key bindings within Org documents
Thanks Nicolas, your reply is helpful for me . Best wishes, Jo. 2013/10/5 Nicolas Richard theonewiththeevill...@yahoo.fr: Hello Joseph, Joseph Vidal-Rosset joseph.vidal.ros...@gmail.com writes: #+begin_equation \label{ECQ} \neg A , A \vdash B \tag{ECQ} #+end_equation IIUC, auckeys mode is not meant to insert latex constructs in org mode, but to get an org equivalent or org-like effect for a given key chord. The aim is to produce a classical org mode file, not a LaTeX only org mode file. My question is therefore more general: how writing scienfific papers in org-mode documents i.e. how writing useful environments like equation, bussproofs, fitch, etc. every useful package for logicians, mathematicians, etc. ? I never managed to do that in pure org mode : I sometimes write the outline in org but at some point I export to latex and go on from there. I'm so much more comfortable in auctex and latex, I have no plan to try doing everything in org mode. -- Nico.
Re: [O] custom emacs org-emphasis-alist breaks EXPORT, help ;-) ?
Xebar Saram zelt...@gmail.com writes: thx again Eric i still have an issue with this when one of the symbols used to start /end the highlight is used in a sentence, for example using your code: (font-lock-add-keywords 'org-mode '((-1-\\([^-1-]+\\)-1- (0 '(:weight ultra-bold :background # DDFFDD :foreground #00) t if i write this: -1- this is a test of 1x1 to show higlight -1- it will kill the highlight, if i use the same text omitting the '1' it works well, anyway around this issue? i thought it would have matcehd -1- but it seems it matches also just 1 by itself best wishes and thx again Yup, the things inside the [^] construct, to _not_ be matched, are treated as a list of single characters. So you're saying anything that's not a '1' or a '-', but then you've got a '1' in the middle of the line. If you want the highlighting to include any character, but not span newlines, you could just use [^\n] instead. At this point you'll probably want to read the regular expression part of the manual: (elisp) Regular Expressions I think you mentioned you don't have a lot of programming experience. That's a bit unfortunate, since regexps aren't a great place to start! I'd recommend getting something that's close enough, and not going down the rabbit hole of perfect. Then start at the top of the introduction to elisp... Good luck, Eric