all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* unescaped character literals
@ 2018-02-08 16:32 Andreas Röhler
  2018-02-08 20:44 ` Andreas Röhler
  0 siblings, 1 reply; 9+ messages in thread
From: Andreas Röhler @ 2018-02-08 16:32 UTC (permalink / raw)
  To: help-gnu-emacs

When opening Emacs26-pretest, get a message:

unescaped character literals `?)' detected!

AFAIU it refers to a test which contains

(should (eq (char-before) ?))

which seems right. Should that warning be reported as bug?

Cheers,

Andreas



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
       [not found] <mailman.8744.1518107626.27995.help-gnu-emacs@gnu.org>
@ 2018-02-08 17:17 ` Emanuel Berg
  2018-02-08 17:27   ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2018-02-08 17:17 UTC (permalink / raw)
  To: help-gnu-emacs

Andreas Röhler wrote:

> When opening Emacs26-pretest, get a message:
>
> unescaped character literals `?)' detected!
>
> AFAIU it refers to a test which contains
>
> (should (eq (char-before) ?))

Perhaps just escape it?

    (should (eq (char-before) ?\)) ; t

?

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
  2018-02-08 17:17 ` unescaped character literals Emanuel Berg
@ 2018-02-08 17:27   ` Emanuel Berg
  2018-02-08 17:33     ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2018-02-08 17:27 UTC (permalink / raw)
  To: help-gnu-emacs

> Perhaps just escape it?
>
>     (should (eq (char-before) ?\)) ; t
>
> ?

No, there should be three parens! Paren match
doesn't work in message mode with such
exotic escaping...

    (should
         (eq (char-before) ?\))
     )

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
  2018-02-08 17:27   ` Emanuel Berg
@ 2018-02-08 17:33     ` Emanuel Berg
  2018-02-08 17:50       ` Emanuel Berg
  0 siblings, 1 reply; 9+ messages in thread
From: Emanuel Berg @ 2018-02-08 17:33 UTC (permalink / raw)
  To: help-gnu-emacs

> No, there should be three parens! Paren match
> doesn't work in message mode with such exotic
> escaping...
>
>     (should
>          (eq (char-before) ?\))
>      )

I forgot to document it:

;; only after a while
;; are you expected
;; to understand this

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
  2018-02-08 17:33     ` Emanuel Berg
@ 2018-02-08 17:50       ` Emanuel Berg
  2018-02-08 17:55         ` Emanuel Berg
                           ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Emanuel Berg @ 2018-02-08 17:50 UTC (permalink / raw)
  To: help-gnu-emacs

Why does one use `should' ?

    (should FORM)

    Evaluate FORM. If it returns nil, abort the
    current test as failed.

    Returns the value of FORM.

Isn't that what plain `or' do?

    (or 1) ; 1

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
  2018-02-08 17:50       ` Emanuel Berg
@ 2018-02-08 17:55         ` Emanuel Berg
  2018-02-08 19:11         ` John Mastro
       [not found]         ` <mailman.8748.1518117099.27995.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: Emanuel Berg @ 2018-02-08 17:55 UTC (permalink / raw)
  To: help-gnu-emacs

> Isn't that what plain `or' do?
>
>     (or 1) ; 1

Actually you don't even need `or'.

    1 ; 1

Ha ha h... eheh

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
  2018-02-08 17:50       ` Emanuel Berg
  2018-02-08 17:55         ` Emanuel Berg
@ 2018-02-08 19:11         ` John Mastro
       [not found]         ` <mailman.8748.1518117099.27995.help-gnu-emacs@gnu.org>
  2 siblings, 0 replies; 9+ messages in thread
From: John Mastro @ 2018-02-08 19:11 UTC (permalink / raw)
  To: help-gnu-emacs

Emanuel Berg <moasen@zoho.com> wrote:
> Why does one use `should' ?
>
>     (should FORM)
>
>     Evaluate FORM. If it returns nil, abort the
>     current test as failed.
>
>     Returns the value of FORM.
>
> Isn't that what plain `or' do?

`should' is part of ERT, a testing tool. That's what the docstring is
referring to when it says "abort the current test as failed".

See (info "(ERT)")

        John



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
       [not found]         ` <mailman.8748.1518117099.27995.help-gnu-emacs@gnu.org>
@ 2018-02-08 19:41           ` Emanuel Berg
  0 siblings, 0 replies; 9+ messages in thread
From: Emanuel Berg @ 2018-02-08 19:41 UTC (permalink / raw)
  To: help-gnu-emacs

John Mastro wrote:

> `should' is part of ERT, a testing tool.
> That's what the docstring is referring to
> when it says "abort the current test as
> failed".
>
> See (info "(ERT)")

OK.

Well, testing is actually great! It is the best
tool to find bugs in software second only to
using it. YRM V.
             ^not

Or actually they do! And that makes it
even better.

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: unescaped character literals
  2018-02-08 16:32 Andreas Röhler
@ 2018-02-08 20:44 ` Andreas Röhler
  0 siblings, 0 replies; 9+ messages in thread
From: Andreas Röhler @ 2018-02-08 20:44 UTC (permalink / raw)
  To: help-gnu-emacs

On 08.02.2018 17:32, Andreas Röhler wrote:
> When opening Emacs26-pretest, get a message:
> 
> unescaped character literals `?)' detected!
> 
> AFAIU it refers to a test which contains
> 
> (should (eq (char-before) ?))
> 
> which seems right. Should that warning be reported as bug?
> 
> Cheers,
> 
> Andreas
> 

Okay, should escape it, because otherwise the paren-match goes wrong.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-02-08 20:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.8744.1518107626.27995.help-gnu-emacs@gnu.org>
2018-02-08 17:17 ` unescaped character literals Emanuel Berg
2018-02-08 17:27   ` Emanuel Berg
2018-02-08 17:33     ` Emanuel Berg
2018-02-08 17:50       ` Emanuel Berg
2018-02-08 17:55         ` Emanuel Berg
2018-02-08 19:11         ` John Mastro
     [not found]         ` <mailman.8748.1518117099.27995.help-gnu-emacs@gnu.org>
2018-02-08 19:41           ` Emanuel Berg
2018-02-08 16:32 Andreas Röhler
2018-02-08 20:44 ` Andreas Röhler

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.