all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Martin Blais <blais@furius.ca>
To: "Wei-Wei Guo" <wwguocn@gmail.com>
Cc: 6531@debbugs.gnu.org, David Goodger <goodger@python.org>,
	Stefan Merten <smerten@oekonux.de>
Subject: bug#6531: patch for rst.el updated (patch format revised)
Date: Fri, 13 Apr 2012 11:05:47 -0400	[thread overview]
Message-ID: <1334329547.21872.140661061985721.471FA5C5@webmail.messagingengine.com> (raw)
In-Reply-To: <1334299245.3050.23.camel@whiz.wwguo.org>

On Fri, Apr 13, 2012, at 14:40, Wei-Wei Guo wrote:
> 在 2012-04-12四的 23:13 -0400,Martin Blais写道:
> > On Thu, Apr 12, 2012, at 16:30, Stefan Monnier wrote:
> > > > The update including:
> > >
> > > > - Insert bullet list by 'M-Enter'.
> > > > - Insert number list "#." by 'M-Enter' with any prefix.
> > > > - Insert number list of a specific number of various styles by 'M-Enter" with a number prefix.
> > > > - Insert directive by 'C-c C-d'.
> > > > - Insert directive option by 'C-c C-o'.
> > > > - Remove the dependency on a2r.el. Now all the patched codes are from mine.
> > >
> > > > Hope it's helpful.
> > >
> > > I'd like to hear the opinion of rst.el's maintainers as well.
> >
> > Holy smoke, is this a patch from 2008? Major lag in the reviewers!
> > Where is the link?
> > Is this the one?
> > http://debbugs.gnu.org/cgi-bin/bugreport.cgi?bug=1610
> >
> > I had a very quick look at this patch--it looks fine to me (other than
> > the overuse of mutable locals/setq).
> >
> > About the features: I personally care little about bullet insertion
> > functions, I find inserting them manually is good enough, but it
> > doesn't hurt to have them there, and others might really like them, so
> > I would merge it in. Thanks WeiWei! :-)
> >
>
>
> It's a very old patch and Stefan Merten has a new version of rst.el.
> Here is the link of the new rst.el which already merged part of the
> patch.
>
> http://docutils.sourceforge.net/tools/editors/emacs/rst.el
>
> Stefan's codes are much better than mine, so it better to merge the new
> rst.el instead of my old patch.
>
> I sent a email to you with another two extensions of rst.el days ago,
> which are rst-directive.el and rst-links.el. If you think those codes
> are fine, they can be merged into the rst.el too. I recommend the
> rst-directive.el, which I use in my daily work and saves me lots of
> time.
>
> Hope my terrible coding style isn't taking you too much trouble.

Nothing personal Weiwei, your coding style is fine. The only important
comments there (and most of Stefan Monnier's suggestions) are about
avoiding using (setq) where unnecessary.

In LISP, the use of setq is considered "poor style" because its syntax
allows a functional form which avoids mutability (Stefan's suggestions
provide good examples of this). Emacs LISP is a bit of a crappy
language because makes mutable operations look like regular functions
(poor naming choices, it's old), but other LISP implementations
emphasize the nastiness of mutability by including a '!' in the name
of all functions which modify their objects. Clojure does this too,
but goes one step further by making its native data structures be all
"persistent" (i.e., you cannot modify them, you can only create "new"
modified versions of them). Haskell and ML go even further and make it
a real PIA to modify anything anywhere, so you end up doing gymnastics
all day long to satisfy the compiler. Some people claim that
mutability is the root of all evil... personally I find it a bit
annoying to have to program in a fully non-mutable world, but I think
that in the particular examples cited above Stefan's proposed changes
make the code clearer.







      parent reply	other threads:[~2012-04-13 15:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-28 13:58 bug#6531: patch for rst.el updated (patch format revised) Wei-Wei Guo
2012-04-12 17:41 ` Lars Magne Ingebrigtsen
2012-04-12 20:30 ` Stefan Monnier
2012-04-13  3:13   ` Martin Blais
2012-04-13  6:40     ` Wei-Wei Guo
2012-04-13 12:25       ` Stefan Monnier
2012-04-14  9:40         ` Stefan Merten
2012-04-16  2:51           ` Stefan Monnier
2020-09-27 12:49           ` bug#1610: " Lars Ingebrigtsen
2012-04-13 15:05       ` Martin Blais [this message]

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

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

  git send-email \
    --in-reply-to=1334329547.21872.140661061985721.471FA5C5@webmail.messagingengine.com \
    --to=blais@furius.ca \
    --cc=6531@debbugs.gnu.org \
    --cc=goodger@python.org \
    --cc=smerten@oekonux.de \
    --cc=wwguocn@gmail.com \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.