From: John Kitchin <jkitchin@andrew.cmu.edu>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: emacs-orgmode@gnu.org
Subject: Re: how to best correct exams (code matlab) using org mode (and tables)
Date: Mon, 09 May 2022 08:39:46 -0400 [thread overview]
Message-ID: <m2czgmakd3.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <87wnewufrz.fsf@mat.ucm.es>
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 <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 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 "<a href=\"#\" title=\"%s\"><font color=\"red\">%s</font></a>"
note
(buffer-substring start end))))
(goto-char (point-min))
(insert "<pre>")
(goto-char (point-max))
(insert "</pre>"))
(browse-url "feedback.html"))
#+END_SRC
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
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu
Pronouns: he/him/his
next prev parent reply other threads:[~2022-05-09 13:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-08 16:53 how to best correct exams (code matlab) using org mode (and tables) Uwe Brauer
2022-05-09 12:24 ` Ihor Radchenko
2022-05-09 12:39 ` John Kitchin [this message]
2022-05-10 7:14 ` [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)) Uwe Brauer
2022-05-10 15:56 ` John Kitchin
2022-05-11 6:32 ` [how to joint column/rows of tables that are in different files (id?)] Uwe Brauer
2022-05-11 13:45 ` Uwe Brauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2czgmakd3.fsf@andrew.cmu.edu \
--to=jkitchin@andrew.cmu.edu \
--cc=emacs-orgmode@gnu.org \
--cc=oub@mat.ucm.es \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).