* Controlling new line characters during tangle
@ 2017-06-21 9:19 Giacomo M
2017-06-21 11:02 ` Kaushal Modi
0 siblings, 1 reply; 5+ messages in thread
From: Giacomo M @ 2017-06-21 9:19 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
Hi all,
I'm using emacs also under Windows, and would need to tangle
scripts/config files to be used under Unix. Is there any header argument
to enforce the desired new line characters in the tangled files?
Thanks,
Giacomo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Controlling new line characters during tangle
2017-06-21 9:19 Controlling new line characters during tangle Giacomo M
@ 2017-06-21 11:02 ` Kaushal Modi
2017-06-21 11:22 ` Giacomo M
2017-06-22 9:40 ` Giacomo M
0 siblings, 2 replies; 5+ messages in thread
From: Kaushal Modi @ 2017-06-21 11:02 UTC (permalink / raw)
To: Giacomo M, emacs-org list
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
On Wed, Jun 21, 2017, 5:21 AM Giacomo M <jackjackk@gmail.com> wrote:
> Hi all,
>
> I'm using emacs also under Windows, and would need to tangle
> scripts/config files to be used under Unix.
Is there any header argument
> to enforce the desired new line characters in the tangled files?
>
At which point would you like to enforce the new line characters?
Can you post a MWE and explain what that it tangles to vs what you'd
actually like to see in the tangled file?
> --
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 1166 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Controlling new line characters during tangle
2017-06-21 11:02 ` Kaushal Modi
@ 2017-06-21 11:22 ` Giacomo M
2017-06-22 9:40 ` Giacomo M
1 sibling, 0 replies; 5+ messages in thread
From: Giacomo M @ 2017-06-21 11:22 UTC (permalink / raw)
To: Kaushal Modi; +Cc: emacs-org list
[-- Attachment #1: Type: text/plain, Size: 876 bytes --]
Dear Kashual,
1. I visit a (Unix EOL[1]) org file on Windows.
2. I write a shell script in a shell source block to be tangled.
3. I tangle it.
4. As a result, I get a (Windows EOL) shell script, while I would like a
Unix EOL shell script.
Thanks,
Giacomo
[1] End Of Line convention
On Jun 21, 2017 13:02, "Kaushal Modi" <kaushal.modi@gmail.com> wrote:
> On Wed, Jun 21, 2017, 5:21 AM Giacomo M <jackjackk@gmail.com> wrote:
>
>> Hi all,
>>
>> I'm using emacs also under Windows, and would need to tangle
>> scripts/config files to be used under Unix.
>
>
> Is there any header argument
>> to enforce the desired new line characters in the tangled files?
>>
>
> At which point would you like to enforce the new line characters?
>
> Can you post a MWE and explain what that it tangles to vs what you'd
> actually like to see in the tangled file?
>
>> --
>
> Kaushal Modi
>
[-- Attachment #2: Type: text/html, Size: 2073 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Controlling new line characters during tangle
2017-06-21 11:02 ` Kaushal Modi
2017-06-21 11:22 ` Giacomo M
@ 2017-06-22 9:40 ` Giacomo M
2017-07-01 12:35 ` Nicolas Goaziou
1 sibling, 1 reply; 5+ messages in thread
From: Giacomo M @ 2017-06-22 9:40 UTC (permalink / raw)
To: Kaushal Modi, emacs-org list
[-- Attachment #1: Type: text/html, Size: 2306 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Controlling new line characters during tangle
2017-06-22 9:40 ` Giacomo M
@ 2017-07-01 12:35 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2017-07-01 12:35 UTC (permalink / raw)
To: Giacomo M; +Cc: emacs-org list, Kaushal Modi
Hello,
Giacomo M <jackjackk@gmail.com> writes:
> Ok, rudimentary elisp knowledge seems to help here:
>
> #+BEGIN_SRC emacs-lisp
> (defun jack/dos2unix-post-tangle-hook ()
> (set-buffer-file-coding-system 'unix 't)
> (save-buffer)
> )
> (add-hook 'org-babel-post-tangle-hook 'jack/dos2unix-post-tangle-hook)
> #+END_SRC
Thank you for sharing.
Would it make sense to provide a :tangle-coding-system attribute? Would
you want to implement it?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-07-01 12:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-21 9:19 Controlling new line characters during tangle Giacomo M
2017-06-21 11:02 ` Kaushal Modi
2017-06-21 11:22 ` Giacomo M
2017-06-22 9:40 ` Giacomo M
2017-07-01 12:35 ` Nicolas Goaziou
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).