Andy Parkins [off-list ref] writes:
On Sunday 2007 April 15 21:51, Linus Torvalds wrote:
quoted
quoted
Now, I print out that diagram and pin it to my wall - sometimes copies
of it are given to others. I do this on a regular basis.
And is there *any* reason why you don't just do that as an "export"
option, when it's very clear that people won't send diffs that include it
Of course there is a reason - the file I edit is the SVG itself, in inkscape
while editing that file I press "print" to get a print out. Why on earth
would I want to jump through hoops by closing the file I'm editing, running
some export script to a temporary file that I don't want, then open up
Inkscape again, check the export looks okay and then print - on what planet
is /that/ simpler?
I have one question.
In your workflow, when do you "print"?
If you did this:
$ cvs update draw.svg
$ inkscape draw.svg
... do more editing
... press "PRINT"
$ cvs diff draw.svg
the final "cvs diff" would say you have such and such changes to
the drawing file you just printed since the checked-in version.
However, doesn't "$Id: ... $" embedded in the printed copy say
it is from the last checked-in version?
Is inkscape aware of the "$Id: ... $" keyword and modifies such
string by munging it to "$Id: ..., modified $", once you make a
local modification to the document? Otherwise you cannot tell
if the printed copy is pristine and match what the $Id$ keyword
claims it is.
Or maybe in your workflow, such a local modification may not
actually matter because you made a habit of not making a drastic
edit before printing.
Or perhaps maybe you never print a locally modified copy.
Does Inkscape have a batch mode operation? It might be an
option to have something like this in the Makefile if it does (I
do not know if it does, and if so what the syntax is, so this is
totally made up):
print:: draw.svg
describe=$(git describe HEAD) && \
git cat-file -p HEAD:draw.svg | \
sed -e 's/$$Id$$/$$Id: '"$$described"'/g' | \
inkscape --print --stdin
.PHONY: print
On Monday 2007, April 16, Junio C Hamano wrote:
In your workflow, when do you "print"?
After a save and commit. Otherwise - as you point out, the id is wrong.
the final "cvs diff" would say you have such and such changes to
the drawing file you just printed since the checked-in version.
However, doesn't "$Id: ... $" embedded in the printed copy say
it is from the last checked-in version?
Yep. You will get no argument from me that keywords are by no means
definitive.
Is inkscape aware of the "$Id: ... $" keyword and modifies such
string by munging it to "$Id: ..., modified $", once you make a
Nope. Inkscape knows nothing about the expansion. However, even if I
wasn't careful to only print out checked in files, it would still
narrow down the possible versions to one of two.
local modification to the document? Otherwise you cannot tell
if the printed copy is pristine and match what the $Id$ keyword
claims it is.
Correct. Every user of keywords is aware that the keyword doesn't
update all the time - in fact there's nothing to stop you changing the
keyword yourself to an utter lie. I think the assumption is that you
aren't fighting your own tools though.
Or maybe in your workflow, such a local modification may not
actually matter because you made a habit of not making a drastic
edit before printing.
Yep.
Or perhaps maybe you never print a locally modified copy.
Yep. In fact, for me, most of the time I'm printing a diagram that was
checked in a number of revisions ago. It's not the case that I
modify-print. However, that's just me.
Does Inkscape have a batch mode operation? It might be an
option to have something like this in the Makefile if it does (I
do not know if it does, and if so what the syntax is, so this is
totally made up):
I think it does as it happens; and your little script is just the sort
of thing I will use when I get around to fixing this hole.
However, it's missing the point to take my example as an unsolved
problem - there are plenty of ways I can get what I want; I brought it
up merely as a counter to the statement that there were no valid
situations for wanting keyword expansion.
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com
Andy Parkins [off-list ref] writes:
However, it's missing the point to take my example as an unsolved
problem - there are plenty of ways I can get what I want; I brought it
up merely as a counter to the statement that there were no valid
situations for wanting keyword expansion.
That's actually quite different from what you said.
Andy Parkins [off-list ref] writes:
Of course there is a reason - the file I edit is the SVG
itself, in inkscape while editing that file I press "print" to
get a print out. Why on earth would I want to jump through
hoops by closing the file I'm editing, running some export
script to a temporary file that I don't want, then open up
Inkscape again, check the export looks okay and then print -
on what planet is /that/ simpler?
You were claiming that with built-in keyword expansion what you
want becomes /simpler/. I questioned that.
Maybe it's just me, who is not a GUI person [*1*], but to me,
having to start inkscape, mouse around to find the "Print"
button and print feels much more cumbersome than simply typing
"make print".
[Footnote]
*1* Not in the sense I do not program GUIy applications, but in
the sense that I do not usually _use_ GUI applications.
On Tuesday 2007, April 17, Junio C Hamano wrote:
Andy Parkins [off-list ref] writes:
quoted
However, it's missing the point to take my example as an unsolved
problem - there are plenty of ways I can get what I want; I brought
it up merely as a counter to the statement that there were no valid
situations for wanting keyword expansion.
That's actually quite different from what you said.
Sorry; I didn't express it very well - the thing that started all this
was the statement that there was no valid use case for keywords. I
just gave an example. I felt that the thread was moving away from
keywords and towards solving my particular problem - which is all
appreciated, but wasn't the point. Running makefile recipes or extra
scripts are all valid methods and pragmatic
working-with-what-git-does-now solutions. I wanted to distinguish
between what I could do now and what I could do with keyword support.
You were claiming that with built-in keyword expansion what you
want becomes /simpler/. I questioned that.
Well it does from the point of view of pressing "print".
Maybe it's just me, who is not a GUI person [*1*], but to me,
having to start inkscape, mouse around to find the "Print"
button and print feels much more cumbersome than simply typing
"make print".
Again, that was addressing my particular problem - good stuff. However,
it's just luck that inkscape has a batch mode - there's no guarantee
for that.
I could just swap the example around a bit, what about if it was an
OpenOffice document that I want to have transparent
compression/decompression and I've set the properties tag to
contain "$Id$". There is no amount of scripting that will enable batch
printing of that.
Anyway - I've wasted enough of your time with this foolishness now.
It's dropped, consider me silenced on this subject ;-)
Andy
--
Dr Andy Parkins, M Eng (hons), MIET
andyparkins@gmail.com