all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: andpuke@foxmail.com, 36219@debbugs.gnu.org
Subject: bug#36219: GNU Emacs 26.1 --eval rejects trailing whitespace
Date: Sat, 15 Jun 2019 16:54:52 +0300	[thread overview]
Message-ID: <834l4rvtqr.fsf@gnu.org> (raw)
In-Reply-To: <87ftobynvt.fsf@gmail.com> (message from Noam Postavsky on Sat, 15 Jun 2019 09:33:10 -0400)

> From: Noam Postavsky <npostavs@gmail.com>
> Date: Sat, 15 Jun 2019 09:33:10 -0400
> Cc: 36219@debbugs.gnu.org
> 
> <andpuke@foxmail.com> writes:
> 
> > Since commit a90d5e6309c0306d931d398506b242c3eb4f40d7 which fixes bug #23159
> > the `--eval' command line option signals (error "Trailing garbage following
> > expression: %s") on more than one expression recevied.
> 
> > This causes some old shell script snippets which has trailing newline for
> > formatting no longer works, such as the follow script from
> > https://orgmode.org/manual/Batch-Execution.html#Batch-Execution
> 
> 
> > Since `eval-expression' accepts additional white space and newlines after a
> > single expression, this mismatch behavior of `--eval' should be considered as a
> > bug.
> >
> > My proposed fix is apply `string-trim-right` to received string of expression.
> >
> 
> I think I'd prefer checking the trailing garbage for whitespace, which
> is what eval-expression does.  See following patch:

SGTM, thanks.





  reply	other threads:[~2019-06-15 13:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-15  2:39 bug#36219: GNU Emacs 26.1 --eval rejects trailing whitespace �o�ӡ����Yһ��
2019-06-15 13:33 ` Noam Postavsky
2019-06-15 13:54   ` Eli Zaretskii [this message]
2019-06-15 14:06     ` Noam Postavsky
2019-06-15 14:24       ` Eli Zaretskii
2019-06-15 21:46         ` Noam Postavsky

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=834l4rvtqr.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=36219@debbugs.gnu.org \
    --cc=andpuke@foxmail.com \
    --cc=npostavs@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.