all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "Juan Manuel Macías" <maciaschain@posteo.net>
Cc: orgmode <emacs-orgmode@gnu.org>
Subject: Re: Docstrings and literate programming (good practices?)
Date: Thu, 03 Nov 2022 07:38:46 +0000	[thread overview]
Message-ID: <878rks7aih.fsf@localhost> (raw)
In-Reply-To: <87bkpp1iyp.fsf@posteo.net>

Juan Manuel Macías <maciaschain@posteo.net> writes:

>> Can you elaborate about "paragraph is exported as verbatim"?
>
> Sorry for the conciseness in my previous explanation. I meant something
> like this:
>
> : foo
>
> is exported to LaTeX as
>
> \begin{verbatim}
> foo
> \end{verbatim}
>
> (and what i want is for it to be exported as 'normal text').

You can just

#+name: foo
foo

that will be exported with all the markup.

> By the way, thinking about it, I don't know if a hypothetical header arg
> called :docstring would be ok, something like:
>
> #+NAME: foo
> #+begin_<SPECIAL BLOCK NAME>
> blah
> #+end_<SPECIAL BLOCK NAME>
>
> #+begin_src emacs-lisp :docstring foo
> (defun foo ()
> (message "hello world"))
> #+end_src
>
> And the docstring would be formatted and placed depending on the
> language and the code (https://en.wikipedia.org/wiki/Docstring).

That's asking for too much. Supporting :docstring header argument in
such form will require babel backends to parse the code, which may not
be trivial. Or consider odd cases with polymorphic functions with the
same name.

However, note one past feature request about escaping text in noweb
references:
 https://orgmode.org/list/82897e7d-f987-11f4-f7f5-fa1b8e462c0c@posteo.eu

Sébastien Miquel <sebastien.miquel@posteo.eu> (2021-05-03) (2021 emacs-orgmode.gnu.org maillist nolist)
Subject: [Feature request] String escaped noweb expansion

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2022-11-03  7:39 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 14:07 Docstrings and literate programming (good practices?) Juan Manuel Macías
2022-11-02  7:13 ` Ihor Radchenko
2022-11-02  7:53   ` Dr. Arne Babenhauserheide
2022-11-02 10:43     ` Ihor Radchenko
2022-11-02 12:49   ` Juan Manuel Macías
2022-11-02 13:05     ` Ihor Radchenko
2022-11-02 15:20       ` Juan Manuel Macías
2022-11-03  7:38         ` Ihor Radchenko [this message]
2022-11-03 20:54 ` Rudolf Adamkovič
2022-11-04  3:03   ` Samuel Wales
2022-11-04  5:45     ` tomas
2022-11-04  6:39       ` Marcin Borkowski
2022-11-04  7:13         ` Samuel Wales
2022-11-04  8:08           ` tomas
2022-11-04  8:06         ` tomas
2022-11-04  8:49     ` Ihor Radchenko
2022-11-05  2:07       ` Samuel Wales
2022-11-08  4:10         ` Samuel Wales
2022-11-04 11:45     ` Max Nikulin

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878rks7aih.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=maciaschain@posteo.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.