unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Felix E. Klee" <felix.klee@inka.de>
Cc: 32359@debbugs.gnu.org
Subject: bug#32359: [PATCH] Add svg-path
Date: Thu, 23 Aug 2018 20:23:21 +0300	[thread overview]
Message-ID: <83zhxd9euu.fsf@gnu.org> (raw)
In-Reply-To: <CA+m_8J0NxOoELM=+eXgM2g6AHhKUs-7Zw_R2-Z_ToOgYB3i12A@mail.gmail.com> (felix.klee@inka.de)

> From: "Felix E. Klee" <felix.klee@inka.de>
> Date: Thu, 23 Aug 2018 17:50:08 +0200
> Cc: 32359@debbugs.gnu.org
> 
> thanks for the feedback!

Thanks for working on improving Emacs.

> > We don't maintain a ChangeLog file; the above should be the commit
> > log message.
> 
> Well, the Emacs info page on committing patches states: “Write the
> change log entries for your changes. […]”

The relevant place to look nowadays is CONTRIBUTE in the top-level
directory of the Emacs tree.

> Furthermore, it links to a page explaining `ChangeLog' files in
> particular. Is that documentation outdated?

It says "change logs", not ChangeLog.  However, since it confused you,
I have now replaced that with "commit log".  The reference to the GNU
Coding Standards is still relevant, I think, because we still use the
ChangeLog style in our commit log messages.

> `ChangeLog.3' contains entries for previous additions to `svg.el', the
> latest one as recent as September 2017.

That file is auto-generated nowadays from Git log.

> Anyhow, if you want a commit log instead of a `ChangeLog' entry, how
> should I submit the commit?

The best is in "git format-patch" format, which will include your
commit log message.  If that's hard or complicated for you, a normal
patch will do with the commit log as preamble, i.e. not in Diff
format.

> >> +@defun svg-path svg commands &rest args
> >> +Add the outline of a shape to @var{svg}. The @var{commands} follow the
> >> +Scalable Vector Graphics standard. This function can be used to create
> >> +arcs.
> >
> > This is too cryptic for the manual,
> 
> It’s basically in line with the description for the other `svg' functions.

Maybe so, but there's no reason to continue that practice when we add
new functions.  It is also okay to fix documentation of those other
functions, but of course it doesn't have to be part of this particular
changeset.

> > and the example doesn't help enough.
> 
> For the intended audience, i.e. those knowing how to author SVG
> documents, it should be clear.

Okay, but the manual exists not only for those already "in the know".
It should also cater to those who are studying the subject with the
purpose of writing some code for the first time in this domain.

> What I could do is add aliases for the path commands:
> 
>   * `moveto-relative' → `m'
> 
>   * `moveto-absolute' → `M'
> 
>   * etc.

I think it would be better simply to explain those in plain English,
not by adding code.

> The example would then turn into:
> 
>     (svg-path svg '((moveto-absolute 100 300)
>                     (arc-absolute 300 300 0 0 0 300 100)
>                     (closepath-absolute))
>               :stroke-color "blue" :fill-color "yellow")
> 
> Still users would need to know the command parameters which are
> detailed in every comprehensive documentation about SVG.

Exactly.  So it's slightly better (less cryptic), but still not clear
enough, because the meaning of moveto-relative and moveto-absolute is
not entirely obvious, only their general idea is evident ("relative"
vs "absolute").

I understand that it isn't reasonable to have the entire SVG docs
there, but we should explain a bit more before pointing to the
official SVG docs for further details.  I trust you that you will know
where to draw the line.

> > We should at least explain what "arcs" means in this context,
> 
> “arcs” in the context of SVG, i.e. vector graphics refers to curved
> paths:
> 
> https://www.merriam-webster.com/dictionary/arc

I didn't mean explain to me, I meant explain in the manual.

> > and in general what is this function about; also what kind of object
> > is SCG.
> 
> Quote from the documentation in the elisp info page for `svg.el': “SVG
> (Scalable Vector Graphics) is an XML format for specifying images.”

We are mis-communicating.  I didn't mean SVG the acronym, I meant SVG
the argument of the function.  The doc strings says

  Add the outline of a shape to SVG.

It is quite clear that "SVG" here doesn't stand for Scalable Vector
Graphics, it stands for some object to which the function will add a
shape.  I'm asking to say a word or two about what kind of object is
that, from the Lisp program POV.  is it a string? a symbol? a list? a
buffer? something else?

> > In general, GNU Coding Standards frown upon using "path" for
> > anything that is not PATH-style directory lists, so maybe use a
> > different name or explain what kind of "path" is being referenced
> > here.
> 
> Renaming `path' would be super confusing to those familiar with vector
> graphics. If `path' needs to be avoided, then I’d rather not add
> `svg-path'.

There's the second alternative: explain in a few words what kind of
"path" is meant here.  Then you can use the word freely.

> BTW I got in contact with Lars, the original author of `svg.el', and
> he’s OK with the changes I proposed, including some additional
> functions.

That's fine, but the way our patch review process works, the comments
are additive ;-)

Thanks.





  reply	other threads:[~2018-08-23 17:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-03 11:07 bug#32359: [PATCH] Add svg-path Felix E. Klee
2018-08-03 13:05 ` Eli Zaretskii
2018-08-23 15:50   ` Felix E. Klee
2018-08-23 17:23     ` Eli Zaretskii [this message]
2018-08-24  9:15       ` Felix E. Klee
2019-06-23 22:15     ` Lars Ingebrigtsen
2019-06-24 14:32       ` Felix E. Klee
2019-06-24 14:39         ` Lars Ingebrigtsen
2019-07-12 14:35           ` Felix E. Klee
2019-07-12 16:02             ` Lars Ingebrigtsen
2019-07-15 13:34               ` Felix E. Klee
2019-07-15 15:12                 ` Lars Ingebrigtsen
2019-07-15 20:40                   ` Felix E. Klee
2019-07-15 20:48                     ` Noam Postavsky
2019-07-16 10:32                       ` Felix E. Klee
2019-07-15 21:13                     ` Felix E. Klee
2019-07-16  6:05                     ` Lars Ingebrigtsen
2019-07-16 10:31                       ` Felix E. Klee
2019-07-16 13:46                         ` Lars Ingebrigtsen
2019-07-24  7:49                           ` Felix E. Klee
2019-07-24 14:30                             ` Eli Zaretskii
2019-07-30 17:46                           ` Felix E. Klee
2019-07-31 20:31                             ` Lars Ingebrigtsen
2019-08-01 13:23                               ` Felix E. Klee
2019-08-02  6:40                                 ` Eli Zaretskii
2019-08-02 10:43                                   ` Felix E. Klee
2019-08-02 11:57                                     ` Eli Zaretskii

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=83zhxd9euu.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=32359@debbugs.gnu.org \
    --cc=felix.klee@inka.de \
    /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.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).