emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "ZHUO QL (KDr2)" <zhuoql@yahoo.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>,
	Emacs-org List <emacs-orgmode@gnu.org>
Subject: Re: Proposal: references from code to text.
Date: Tue, 15 May 2018 04:49:34 +0000 (UTC)	[thread overview]
Message-ID: <385386647.1304827.1526359774932@mail.yahoo.com> (raw)
In-Reply-To: <CAJ51ETq4pk-zk=y4fC-bH6QJvN0h8mR-vUUds3UmNdWyohfq7Q@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1644 bytes --]

Well, it's a nice approach.
But it has a few cons:
1. Putting text in a source block is not a very natural way. It may disturb the fluidity, both for writing the Org source and reading the exported document(e.g. html);2. The bug Eric just found while putting a <<...>> link within quotes, although, it may be easy to fix. 

 Greetings.

ZHUO QL (KDr2, http://kdr2.com)

 

   On Monday, May 14, 2018, 11:06:34 PM GMT+8, John Kitchin <jkitchin@andrew.cmu.edu> wrote: 
 
 It seems like this is nearly all possible already (see below). It is a little wonky that you have to put text in a src txt block to achieve it, but otherwise what is missing?
* Main document
See [[id:BAD97113-3561-4A4A-BA07-0CD5BF6BA35F][There is a reason we only support two args]] (text to text) for notes about this function. The addition is done in line [[(add)]] (text to code).
#+NAME: DOC-OF-ADD#+BEGIN_SRC txt"We use the function add to calculate the sum of two numbers."#+END_SRC
#+NAME: ADD#+BEGIN_SRC emacs-lisp -n -r :noweb yes :tangle test.el(defun add (x y)  <<DOC-OF-ADD>> ;; code to code  ;; [[id:BAD97113-3561-4A4A-BA07-0CD5BF6BA35F][There is a reason we only support two args]] code to text  (+ x y) (ref:add)  )#+END_SRC
#+RESULTS: ADD: add

** Notes
*** There is a reason we only support two args    :PROPERTIES:    :ID:       BAD97113-3561-4A4A-BA07-0CD5BF6BA35F    :END:

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

  

[-- Attachment #2: Type: text/html, Size: 3720 bytes --]

  parent reply	other threads:[~2018-05-15  4:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <800808596.465327.1526131788117.ref@mail.yahoo.com>
2018-05-12 13:29 ` Proposal: references from code to text ZHUO QL (KDr2)
2018-05-14  5:48   ` Eric S Fraga
2018-05-14 15:05     ` John Kitchin
2018-05-14 17:06       ` Eric S Fraga
2018-05-14 17:11       ` Eric S Fraga
2018-05-15  4:49       ` ZHUO QL (KDr2) [this message]
2018-05-15 10:04         ` Eric S Fraga
2018-05-16  7:04           ` ZHUO QL (KDr2)
2018-05-16 14:25             ` John Kitchin
2018-05-16 19:37               ` Samuel Wales
2018-05-17  2:29                 ` John Kitchin
2018-05-17  2:40                   ` Samuel Wales
2018-05-17  2:58               ` ZHUO QL (KDr2)
2018-05-17  3:10                 ` John Kitchin
2018-05-17  9:33                   ` ZHUO QL (KDr2)
2018-06-15 21:44                     ` John Kitchin
2018-06-15 18:07               ` Grant Rettke

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=385386647.1304827.1526359774932@mail.yahoo.com \
    --to=zhuoql@yahoo.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jkitchin@andrew.cmu.edu \
    /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).