emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: Proposal to replace the prefix repetition with whitespace during expansion of noweb references
Date: Mon, 31 Mar 2014 10:17:20 +0200	[thread overview]
Message-ID: <86a9c6235b.fsf@somewhere.org> (raw)
In-Reply-To: CAPpfmHKkpZEqFnPo8E0ow5Upb1rRR=UWRg43FcBJerTdOsqnJQ@mail.gmail.com

Pontus Michael wrote:
> I recommend to introduce a change that will replace the inserted prefix
> with whitespace of equal length. If it was the case then provided
> example would produce the following code after expansion:
>
> #+begin_src emacs-lisp
> (concat "foo"
>         "bar")
> #+end_src
>
> Here are the arguments in support of my proposal:
>
> 1) The proposed behavior is identical to one produced by original noweb.
>
> 2) Documentation provides a reasoning for current behavior as an example
>    of reference expansion after the introduction of single-line comment
>    with intention to comment all the lines caught in expansion. This
>    reasoning follows simplistic assumption of semantics of arbitrary
>    language and takes advantage of the single line comment notation used
>    for non-intended purpose (i.e. multiline comment should have been
>    used instead).
>
> 3) Continuing the line of examples given in emacs lisp, which lacks the
>    notation for multiline comments I fail to see a situation where
>    docstrings would not only serve the intended purpose, but in many
>    cases contribute to quality and readability of the code.
>
> 4) Current behavior lacks the mechanism for handling multiple noweb
>    references present on the same line. If prefix would be extracted
>    from the unexpanded code and expansion would include raw noweb
>    references notation. Clearly this is unexpected behavior.
>
> If my proposal will find support in the community I can put my own
> effort in bringing this change into existence.

I am more or less the one who asked for the current behavior because
I wanted to be able to easily comment blocks in SQL or ELisp or ...

--8<---------------cut here---------------start------------->8---
SELECT *
FROM table
WHERE <<cond1>> AND
      -- <<cond2>> AND
      <<cond3>>
--8<---------------cut here---------------end--------------->8---

However, as you say, in the SQL case, I could have used multiline
comments.

This is a pity it does not exist in ELisp.

However, your arguments 1 and 4 are important to me. Hence, I'd see no
objection to move in the direction you propose (insert whitespaces, so
that indentation is correctly done).

Best regards,
  Seb

-- 
Sebastien Vauban

  parent reply	other threads:[~2014-03-31  8:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-28 23:46 Proposal to replace the prefix repetition with whitespace during expansion of noweb references Pontus Michael
2014-03-29 15:30 ` Charles Berry
2014-03-31  8:17 ` Sebastien Vauban [this message]
2014-08-16 12:55   ` Pierre-Henry FRÖHRING
2014-08-18 11:55     ` Sebastien Vauban
2014-08-23  8:35       ` Aaron Ecay
2014-10-12 12:43         ` Bastien
2014-10-12 15:42           ` Aaron Ecay
  -- strict thread matches above, loose matches on Subject: below --
2014-03-30 21:13 Pontus Michael
2014-04-11  9:36 ` Bastien

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=86a9c6235b.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /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).