emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Is doc/org-version.tex generation broken?
@ 2017-06-30 13:25 Dale
  2017-06-30 14:08 ` Michael Ax
  2017-06-30 14:30 ` Kyle Meyer
  0 siblings, 2 replies; 5+ messages in thread
From: Dale @ 2017-06-30 13:25 UTC (permalink / raw)
  To: emacs-orgmode

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

Hi!

a8d007db15 starts generating doc/org-version.{tex,inc}, but on my OS X
system this ends up creating broken files with (I believe) vertical tab
characters in them.  On HEAD this morning:

$ make card
[...]
PDFLATEX=pdftex texi2pdf --batch --clean --expand orgcard.tex
This is pdfTeX, Version 3.14159265-2.6-1.40.18 (TeX Live 2017) (preloaded
format=pdftex)
 restricted \write18 enabled.
entering extended mode

(../../.././orgcard.tex
(/Users/dale/repositories/org-mode/doc/org-version.tex
/Users/dale/repositories/org-mode/doc/org-version.tex:3: Missing control
sequen
ce inserted.
<inserted text>
                \inaccessible
<to be read again>


l.3 \def
         ersionyear{2017}
[...]
/opt/local/bin/texi2dvi: pdftex exited with bad status, quitting.
make[1]: *** [orgcard.pdf] Error 1
make: *** [card] Error 2

$ cat doc/org-version.tex
% automatically generated, do not edit
\def\orgversionnumber{9.0.9}
\def
    ersionyear{2017}
\def\year{2017}

I have no idea how that \v is getting turned into a vertical tab.  Is make
processing these?

$ gmake --version
GNU Make 4.2.1
Built for x86_64-apple-darwin15.6.0
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
$ cat /tmp/test-makefile
single:
echo "single: 123\v456"

double:
echo "double: 123\\v456"

quad:
echo "quad: 123\\\\v456"
$ gmake -f /tmp/test-makefile single double quad
echo "single: 123\v456"
single: 123
           456
echo "double: 123\\v456"
double: 123
           456
echo "quad: 123\\\\v456"
quad: 123\v456

Is this something screwed up in my environment or are others seeing this as
well?

Thanks,
Dale

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is doc/org-version.tex generation broken?
  2017-06-30 13:25 Is doc/org-version.tex generation broken? Dale
@ 2017-06-30 14:08 ` Michael Ax
  2017-06-30 14:30 ` Kyle Meyer
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ax @ 2017-06-30 14:08 UTC (permalink / raw)
  To: emacs-orgmode

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

\v is the text-mode equivalent of 'vee' or \check{o}. file a 
question/bug at gmake's home?
  http://github.com/renozao/pkgmaker/issues
||
> Is this something screwed up in my environment or are others seeing 
> this as well?
>


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is doc/org-version.tex generation broken?
  2017-06-30 13:25 Is doc/org-version.tex generation broken? Dale
  2017-06-30 14:08 ` Michael Ax
@ 2017-06-30 14:30 ` Kyle Meyer
  2017-06-30 17:29   ` Kyle Meyer
  1 sibling, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2017-06-30 14:30 UTC (permalink / raw)
  To: Dale, emacs-orgmode

Dale <dale@codefu.org> writes:

> a8d007db15 starts generating doc/org-version.{tex,inc},

Unimportant to the rest of this issue, but that commit only started
generating doc/org-version.tex.  The generation of doc/org-version.inc
wasn't modified.

> but on my OS X system this ends up creating broken files with (I
> believe) vertical tab characters in them.  On HEAD this morning:
>
> $ make card

[...]

> $ cat doc/org-version.tex
> % automatically generated, do not edit
> \def\orgversionnumber{9.0.9}
> \def
>     ersionyear{2017}
> \def\year{2017}
>
> I have no idea how that \v is getting turned into a vertical tab.  Is make
> processing these?

Ehh, that's coming through fine on my end as

    % automatically generated, do not edit
    \def\orgversionnumber{9.0.9}
    \def\versionyear{2017}
    \def\year{2017}

> $ gmake --version
> GNU Make 4.2.1
> Built for x86_64-apple-darwin15.6.0

$ make --version
GNU Make 4.2.1
Built for x86_64-unknown-linux-gnu

> $ gmake -f /tmp/test-makefile single double quad
> echo "single: 123\v456"
> single: 123
>            456

echo "single: 123\v456"
single: 123\v456

> echo "double: 123\\v456"
> double: 123
>            456

echo "double: 123\\v456"
double: 123\v456

> echo "quad: 123\\\\v456"
> quad: 123\v456

echo "quad: 123\\\\v456"
quad: 123\\v456

> Is this something screwed up in my environment or are others seeing this as
> well?

I'm guessing that I should rewrite the command in a more portable way.
Not sure what that is offhand.

-- 
Kyle

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Is doc/org-version.tex generation broken?
  2017-06-30 14:30 ` Kyle Meyer
@ 2017-06-30 17:29   ` Kyle Meyer
  2017-07-01  3:46     ` Dale
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Meyer @ 2017-06-30 17:29 UTC (permalink / raw)
  To: Dale, emacs-orgmode

Kyle Meyer <kyle@kyleam.com> writes:

> Dale <dale@codefu.org> writes:

[...]

>> Is this something screwed up in my environment or are others seeing this as
>> well?
>
> I'm guessing that I should rewrite the command in a more portable way.
> Not sure what that is offhand.

Can you verify that the below change works on your system?

Thanks.

-- >8 --
Subject: [PATCH] doc/Makefile: Use printf to generate org-version.tex

* doc/Makefile (org-version.tex): Use printf instead of echo to
increase portability.

By default GNU coreutil's echo disables the interpretation of
backslash escapes (-E option), but this isn't the case for some echo
variants.

Reported-by: Dale <dale@codefu.org>
<https://lists.gnu.org/archive/html/emacs-orgmode/2017-06/msg00619.html>
---
 doc/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index 87f8c2781..e17d4415b 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -34,11 +34,11 @@ org-version.inc:	org.texi
 	@echo "@set DATE $(DATE)" >> org-version.inc
 
 org-version.tex:	orgcard.tex
-	@echo "org-version: $(ORGVERSION) ($(GITVERSION))"
-	@echo "% automatically generated, do not edit"  > org-version.tex
-	@echo "\def\orgversionnumber{$(ORGVERSION)}" >> org-version.tex
-	@echo "\def\versionyear{$(YEAR)}" >> org-version.tex
-	@echo "\def\year{$(YEAR)}" >> org-version.tex
+	@printf "org-version: $(ORGVERSION) ($(GITVERSION))\n"
+	@printf "%% automatically generated, do not edit\n" > org-version.tex
+	@printf "\def\orgversionnumber{$(ORGVERSION)}\n" >> org-version.tex
+	@printf "\def\\\\versionyear{$(YEAR)}\n" >> org-version.tex
+	@printf "\def\year{$(YEAR)}\n" >> org-version.tex
 
 install:	org
 	if [ ! -d $(DESTDIR)$(infodir) ]; then $(MKDIR) $(DESTDIR)$(infodir); else true; fi ;
-- 
2.13.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Is doc/org-version.tex generation broken?
  2017-06-30 17:29   ` Kyle Meyer
@ 2017-07-01  3:46     ` Dale
  0 siblings, 0 replies; 5+ messages in thread
From: Dale @ 2017-07-01  3:46 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

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

On Fri, Jun 30, 2017 at 12:29 PM, Kyle Meyer <kyle@kyleam.com> wrote:

> Kyle Meyer <kyle@kyleam.com> writes:
>
[...]

> Can you verify that the below change works on your system?
>
> Thanks.
>
> -- >8 --
> Subject: [PATCH] doc/Makefile: Use printf to generate org-version.tex
>
> * doc/Makefile (org-version.tex): Use printf instead of echo to
> increase portability.
>
[...]

Confirmed, I can now "make card" successfully.  Thanks!

Dale

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-07-01  3:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 13:25 Is doc/org-version.tex generation broken? Dale
2017-06-30 14:08 ` Michael Ax
2017-06-30 14:30 ` Kyle Meyer
2017-06-30 17:29   ` Kyle Meyer
2017-07-01  3:46     ` Dale

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).