> Since we're talking about quoting functions, how likely do you think
> these patches are to break stuff?
>
> The first one doesn't even change the generated byte-code so I assume
> that's pretty safe.

Indeed, this one looks quite safe (the only risk I can think of is to
break some builds which treat compilation warnings as errors, tho).

> The second one is what you've suggested here but applied blindly to our
> entire code base.

Looks safe enough to me (see trivial comment below), but I'm known to be
a bit rash at times: I tend to think that software *should* be soft, so
if such an "obviously right" change breaks something, it still counts as
a success because it helped find a quirk in the code, which should be
ideally fixed or at least clearly labeled.


=== Stefan


> --- a/lisp/ob-sql.el
> +++ b/lisp/ob-sql.el
> @@ -414,13 +414,12 @@ org-babel-sql-expand-vars
>                    (let ((data-file (org-babel-temp-file "sql-data-")))
>                      (with-temp-file data-file
>                        (insert (orgtbl-to-csv
> -                               val (if sqlite
> -                                       nil
> -                                     '( :fmt (lambda (el)
> -                                               (if (stringp el)
> -                                                   el
> -                                                 (format "%S" el)))
> -                                        :with-special-rows nil)))))
> +                               val (unless sqlite
> +                                     (list :fmt (lambda (el)
> +                                                  (if (stringp el)
> +                                                      el
> +                                                    (format "%S" el)))
> +                                           :with-special-rows nil)))))
>                      data-file)
>                  (if (stringp val) val (format "%S" val))))
>           body t t)))

FWIW, using

    `( :fmt ,(lambda (el)
              (if (stringp el)
                  el
                (format "%S" el)))
       :with-special-rows nil)))))

leads to slightly less consing because it shares the

    (:with-special-rows nil)

tail.


Reply via email to