GNU bug report logs - #20643
24.5; Please improve documentation of `pcase-let'

Previous Next

Package: emacs;

Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>

Date: Sun, 24 May 2015 10:38:02 UTC

Severity: minor

Tags: fixed

Found in version 24.5

Fixed in version 25.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 20643 in the body.
You can then email your comments to 20643 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#20643; Package emacs. (Sun, 24 May 2015 10:38:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philipp Stephani <p.stephani2 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 24 May 2015 10:38:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.5; Please improve documentation of `pcase-let'
Date: Sun, 24 May 2015 12:36:47 +0200
The documentation of `pcase-let' is very terse.  Please expand it to
state what happens to each binding in the case that the pattern of a
binding matches, in the case where it doesn't match, and in the case
where there are no binding constructs in a pattern.



In GNU Emacs 24.5.1 (x86_64-apple-darwin14.1.0, NS apple-appkit-1344.72)
 of 2015-04-12 on p
Configured using:
 `configure --prefix=/usr/local/Cellar/emacs/24.5
 --enable-locallisppath=/usr/local/share/emacs/site-lisp
 --infodir=/usr/local/Cellar/emacs/24.5/share/info/emacs
 --with-file-notification=gfile --with-dbus --with-gnutls --with-rsvg
 --with-imagemagick --without-popmail --with-ns
 --disable-ns-self-contained'

Important settings:
  value of $LANG: de_DE.UTF-8
  locale-coding-system: utf-8-unix

Major mode: Emacs-Lisp

Minor modes in effect:
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent messages:
Auto-saving...done
Mark set
Sending...
Mark set [2 times]
Sending via mail...
Sending email 
Sending email done
gnutls.c: [0] (Emacs) fatal error: The TLS connection was non-properly terminated.
Sending...done


Load-path shadows:
None found.

Features:
(eieio-opt speedbar sb-image ezimage dframe find-func gnutls
network-stream starttls tls mailalias smtpmail auth-source eieio
byte-opt bytecomp byte-compile cl-extra cconv eieio-core password-cache
cus-edit cus-start cus-load wid-edit cl-loaddefs cl-lib help-mode pp
shadow sort gnus-util mail-extr emacsbug message format-spec rfc822 mml
easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils warnings help-fns files-x xterm time-date
tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel
ns-win tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev minibuffer nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind gfilenotify cocoa ns multi-tty emacs)

Memory information:
((conses 16 121758 16283)
 (symbols 48 21489 1)
 (miscs 40 70 436)
 (strings 32 20572 5003)
 (string-bytes 1 573284)
 (vectors 16 11348)
 (vector-slots 8 377433 8228)
 (floats 8 77 372)
 (intervals 56 1062 144)
 (buffers 960 20))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20643; Package emacs. (Mon, 25 May 2015 02:41:03 GMT) Full text and rfc822 format available.

Message #8 received at 20643 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 20643 <at> debbugs.gnu.org
Subject: Re: bug#20643: 24.5; Please improve documentation of `pcase-let'
Date: Sun, 24 May 2015 22:39:47 -0400
> The documentation of `pcase-let' is very terse.  Please expand it to
> state what happens to each binding in the case that the pattern of a
> binding matches, in the case where it doesn't match, and in the case
> where there are no binding constructs in a pattern.

I added:

   The macro is expanded and optimized under the assumption that those
   patterns *will* match, so a mismatch may go undetected or may cause
   any kind of error."


-- Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20643; Package emacs. (Sun, 21 Jun 2015 13:11:02 GMT) Full text and rfc822 format available.

Message #11 received at 20643 <at> debbugs.gnu.org (full text, mbox):

From: Philipp Stephani <p.stephani2 <at> gmail.com>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 20643 <at> debbugs.gnu.org
Subject: Re: bug#20643: 24.5; Please improve documentation of `pcase-let'
Date: Sun, 21 Jun 2015 13:10:13 +0000
[Message part 1 (text/plain, inline)]
Stefan Monnier <monnier <at> iro.umontreal.ca> schrieb am Mo., 25. Mai 2015 um
04:39 Uhr:

> > The documentation of `pcase-let' is very terse.  Please expand it to
> > state what happens to each binding in the case that the pattern of a
> > binding matches, in the case where it doesn't match, and in the case
> > where there are no binding constructs in a pattern.
>
> I added:
>
>    The macro is expanded and optimized under the assumption that those
>    patterns *will* match, so a mismatch may go undetected or may cause
>    any kind of error."
>
>
>
Thanks. Though I think it would be better to be more defensive and
guarantee to raise a signal in the case of a mismatch.
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#20643; Package emacs. (Mon, 22 Jun 2015 01:24:02 GMT) Full text and rfc822 format available.

Message #14 received at 20643 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Philipp Stephani <p.stephani2 <at> gmail.com>
Cc: 20643 <at> debbugs.gnu.org
Subject: Re: bug#20643: 24.5; Please improve documentation of `pcase-let'
Date: Sun, 21 Jun 2015 21:23:47 -0400
> Thanks. Though I think it would be better to be more defensive and
> guarantee to raise a signal in the case of a mismatch.

If you want that, you need to use pcase, or pcase-exclusive.

This is a judgment call, but it lets pcase-let generate significantly
shorter and more efficient code and hence better serve the expected
common case.


        Stefan




Added tag(s) fixed. Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 02 Sep 2018 15:15:02 GMT) Full text and rfc822 format available.

bug marked as fixed in version 25.1, send any further explanations to 20643 <at> debbugs.gnu.org and Philipp Stephani <p.stephani2 <at> gmail.com> Request was from Noam Postavsky <npostavs <at> gmail.com> to control <at> debbugs.gnu.org. (Sun, 02 Sep 2018 15:15:02 GMT) Full text and rfc822 format available.

Message #19 received at 20643-quiet <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> gmail.com>
To: 20643-quiet <at> debbugs.gnu.org
Subject: Re: bug#20643: 24.5; Please improve documentation of `pcase-let'
Date: Sun, 02 Sep 2018 11:13:52 -0400
tags 20643 fixed
close 20643 25.1
quit

Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> I added:
>
>    The macro is expanded and optimized under the assumption that those
>    patterns *will* match, so a mismatch may go undetected or may cause
>    any kind of error."

[1: dde09cdbce]: 2015-05-24 22:38:05 -0400
  * lisp/emacs-lisp/pcase.el: Use PAT rather than UPAT in docstring
  (pcase-let): Document the behavior in case the pattern doesn't match.
  https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=dde09cdbce0239bba0248a8ed5c1f4d85c5e8476




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 01 Oct 2018 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 264 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.