Re: [how to joint column/rows of tables that are in different files (id?)] (was: how to best correct exams (code matlab) using org mode (and tables))
Can you make a temporary org-buffer that copies all those tables into one place, and then join them? Uwe Brauer writes: > I think I almost have a working workflow. > > What I need is a functionality to join either columns or rows of tables > that are in different files. > > Here is what I have in mind for tables that are in the same file > > > ** Columns > > #+NAME: T1 > | col1 | col2 | > > |1 | 2| > > #+NAME: T2 > | col3 | > > | 3| > > #+BEGIN_SRC emacs-lisp :var t1=T1 t2=T2 > (cl-mapcar #'append t1 t2) > #+END_SRC > > > #+RESULTS: > | col1 | col2 | col3 | > |1 |2 |3 | > > ** Rows > > #+BEGIN_SRC emacs-lisp :var t1=T1 t2=T2 > (append t1 t2) > #+END_SRC > > > #+RESULTS: > | col1 | col2 | > |1 |2 | > | col3 | | > |3 | | > > > > Now the 3rd package orgtbl-aggregate allows me to aggerate column of > tables that are in different files, via an ID generated via > org-id-get-create > and saved via org-id-update-id-locations > as in > > #+BEGIN: aggregate :table "uwe" :cols "Level" > #+END: > > Where the table uwe is located in a different file. However it seems > only to work for one table at the time, so if you have 20 tables in 20 > files that a bit complicated > > Any idea how to append column or rows from different table in different > files in one go? > > Thanks > > Uwe -- 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 Pronouns: he/him/his
[how to joint column/rows of tables that are in different files (id?)] (was: how to best correct exams (code matlab) using org mode (and tables))
I think I almost have a working workflow. What I need is a functionality to join either columns or rows of tables that are in different files. Here is what I have in mind for tables that are in the same file ** Columns #+NAME: T1 | col1 | col2 | |1 | 2| #+NAME: T2 | col3 | | 3| #+BEGIN_SRC emacs-lisp :var t1=T1 t2=T2 (cl-mapcar #'append t1 t2) #+END_SRC #+RESULTS: | col1 | col2 | col3 | |1 |2 |3 | ** Rows #+BEGIN_SRC emacs-lisp :var t1=T1 t2=T2 (append t1 t2) #+END_SRC #+RESULTS: | col1 | col2 | |1 |2 | | col3 | | |3 | | Now the 3rd package orgtbl-aggregate allows me to aggerate column of tables that are in different files, via an ID generated via org-id-get-create and saved via org-id-update-id-locations as in #+BEGIN: aggregate :table "uwe" :cols "Level" #+END: Where the table uwe is located in a different file. However it seems only to work for one table at the time, so if you have 20 tables in 20 files that a bit complicated Any idea how to append column or rows from different table in different files in one go? Thanks Uwe -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine.
Re: how to best correct exams (code matlab) using org mode (and tables)
I guess the best thing to do would be some combination of `htmlize-buffer' and adding tooltips to the markups. I don't see a super clear path to that at the moment. The htmlize-buffer is straightforward, and it would show where your remarks are. Getting from marginalia.org to tooltips in the right place though is not as straightforward. htmlize-buffer is only necessary if you want to see the syntax in the buffer. Here is some rough code that wraps the file in and makes the text you added remarks on have tooltips associated with your remarks. You could then return the feedback.html file. #+BEGIN_SRC emacs-lisp (let* ((hls (sort (org-remark-highlights-get) (lambda (a b) (> (caadr a) (caadr b) (notes (cl-loop for (key (start . end) type) in hls collect (progn (with-current-buffer (org-remark-notes-buffer-get-or-create) (goto-char (org-find-property org-remark-prop-id key)) (save-restriction (org-narrow-to-subtree) (org-end-of-meta-data t) (buffer-substring (point) (point-max (with-temp-file "feedback.html" (insert-file-contents "some-file") (cl-loop for (key (start . end) type) in hls for note in notes do (cl--set-buffer-substring start end (format "%s" note (buffer-substring start end (goto-char (point-min)) (insert "") (goto-char (point-max)) (insert "")) (browse-url "feedback.html")) #+END_SRC Uwe Brauer writes: > Hi > > I came around > https://kitchingroup.cheme.cmu.edu/blog/2013/10/23/Writing-exams-in-org-mode/ > > Which is a bit outdated. > > My use case are to correct of matlab files, so usually I have a single org > file with a table and insert the results. > > However what I missing is that my comments, and observations are difficult to > track. > > I am now experimenting with org-remark putting the remarks and marks in the > property sections of headers and use than > > columnview > like > > #+begin_src > #+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :indent nil :hlines 2 > :format "%5TODO(Status) %5Ap(Name) %5com(Comment) %5Ej1(Ej1/20) %5Ej2(Ej2/25) > %5Ej3(Ej3/55) %5Res(Result)" > #+END: > #+end_src > > What do others use? > > Regards > > Uwe Brauer -- 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 Pronouns: he/him/his
Re: how to best correct exams (code matlab) using org mode (and tables)
Uwe Brauer writes: > I am now experimenting with org-remark putting the remarks and marks in the > property sections of headers and use than > What do others use? I haven't tried org-remark yet, but I am using something somewhat similar (but much simpler). Every time I add a note to a heading with C-c C-z, the last note contents is saved to SUMMARY heading property. See https://github.com/yantar92/emacs-config/blob/master/config.org#column-mode > I strongly condemn Putin's war of aggression against the Ukraine. > I support to deliver weapons to Ukraine's military. > I support the ban of Russia from SWIFT. > I support the EU membership of the Ukraine. Thanks! Best, Ihor
how to best correct exams (code matlab) using org mode (and tables)
Hi I came around https://kitchingroup.cheme.cmu.edu/blog/2013/10/23/Writing-exams-in-org-mode/ Which is a bit outdated. My use case are to correct of matlab files, so usually I have a single org file with a table and insert the results. However what I missing is that my comments, and observations are difficult to track. I am now experimenting with org-remark putting the remarks and marks in the property sections of headers and use than columnview like #+begin_src #+BEGIN: columnview :maxlevel 2 :skip-empty-rows t :indent nil :hlines 2 :format "%5TODO(Status) %5Ap(Name) %5com(Comment) %5Ej1(Ej1/20) %5Ej2(Ej2/25) %5Ej3(Ej3/55) %5Res(Result)" #+END: #+end_src What do others use? Regards Uwe Brauer -- I strongly condemn Putin's war of aggression against the Ukraine. I support to deliver weapons to Ukraine's military. I support the ban of Russia from SWIFT. I support the EU membership of the Ukraine.