[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to best correct exams (code matlab) using org mode (and tables)

From: John Kitchin
Subject: Re: how to best correct exams (code matlab) using org mode (and tables)
Date: Mon, 09 May 2022 08:39:46 -0400
User-agent: mu4e 1.6.10; emacs 28.0.90

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

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 <pre></pre> 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 
       (notes (cl-loop for (key (start . end) type) in hls
                            (org-find-property org-remark-prop-id key))
                             (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
             (cl--set-buffer-substring start end
                   (format "<a href=\"#\" title=\"%s\"><font 
                           (buffer-substring start end))))   
    (goto-char (point-min))
    (insert "<pre>")
    (goto-char (point-max))
    (insert "</pre>"))
  (browse-url "feedback.html"))

Uwe Brauer <oub@mat.ucm.es> 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
Pronouns: he/him/his

reply via email to

[Prev in Thread] Current Thread [Next in Thread]