GNU bug report logs - #10969
24.0.94; Annoying warning for `pop'

Previous Next

Package: emacs;

Reported by: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>

Date: Thu, 8 Mar 2012 06:45:01 UTC

Severity: minor

Found in version 24.0.94

Fixed in version 25.0.94

Done: Noam Postavsky <npostavs <at> users.sourceforge.net>

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 10969 in the body.
You can then email your comments to 10969 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#10969; Package emacs. (Thu, 08 Mar 2012 06:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thierry Volpiatto <thierry.volpiatto <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 08 Mar 2012 06:45:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.0.94; Annoying warning for `pop'
Date: Thu, 08 Mar 2012 07:42:46 +0100
Hi,
using `pop' without using its return value create a warning when
compiling code:

--8<---------------cut here---------------start------------->8---
Warning: value returned from (car (nthcdr index tmp-list)) is
    unused 
--8<---------------cut here---------------end--------------->8---

This is when I use 
(pop (nthcdr index tmp-list))

but using
(pop tmp-list)

doesn't return this warning (the returned value is also unused).

So I must use other code just to avoid this annoying and IMHO
unjustified warning.



In GNU Emacs 24.0.94.1 (i686-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-03-05 on thierry-MM061
Windowing system distributor `The X.Org Foundation', version 11.0.11004000
Configured using:
 `configure '--with-x-toolkit=lucid' '--without-rsvg' '--without-gconf'
 '--with-wide-int''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  display-battery-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  auto-image-file-mode: t
  show-paren-mode: t
  display-time-mode: t
  savehist-mode: t
  minibuffer-depth-indicate-mode: t
  eldoc-mode: t
  diff-auto-refine-mode: t
  anything-completion-mode: t
  anything-dired-mode: Enable anything completion in Dired functions.
Bindings affected are C, R, S, H.
This is deprecated for Emacs24+ users, use `ac-mode' instead.
  shell-dirtrack-mode: t
  tooltip-mode: t
  mouse-wheel-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
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
k e n <return> H i , <return> I t SPC s e e m SPC i 
n d e n t i n g SPC a SPC l <backspace> C L SPC l o 
o p SPC w i t h SPC C-h c C-M-q C-z l <return> C-h 
c C-M-q C-z C-a C-h e M-> <up> <up> C-SPC C-e M-w C-x 
b <return> C-y <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <left> 
<left> <left> <left> <left> <up> <up> <up> <up> <up> 
<down> <right> <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <backspace> 
- <down> <down> <down> <down> <down> <up> <left> <left> 
<left> <left> <left> <left> <left> <left> <left> <left> 
<left> <left> ` <right> <right> <right> <right> <right> 
' <right> ( <right> <right> <right> <right> <right> 
<right> <right> <right> <right> <right> <right> <right> 
<right> <right> ) C-z l <return> <down> C-M-h C-M-\ 
<down> <down> <down> <down> <down> <up> <up> <right> 
<right> <right> <right> <right> <right> <right> C-M-q 
<up> <up> C-M-h C-M-\ C-h c C-M-\ C-z C-a <return> 
d o e s n ' t SPC w o r k SPC a n y m o r e SPC u n 
l e s s SPC t h e SPC l o o p SPC c l o s e SPC i s 
SPC < = SPC t w o SPC l i n e s . C-c C-c y C-x b <return> 
C-x C-b <down> <down> <return> M-y C-g M-x <return
>

Recent messages:
235 2.7.0 Accepted
250 2.1.0 OK cc3sm4043601wib.7
250 2.1.5 OK cc3sm4043601wib.7
354  Go ahead cc3sm4043601wib.7
Sending email 
Sending email done
250 2.0.0 OK 1331188393 cc3sm4043601wib.7
221 2.0.0 closing connection cc3sm4043601wib.7
Sending...done
 [4 times]

Load-path shadows:
~/elisp/org-active/contrib/lisp/org-eshell hides /usr/local/share/emacs/24.0.94/lisp/org/org-eshell
~/elisp/org-active/contrib/lisp/org-odt hides /usr/local/share/emacs/24.0.94/lisp/org/org-odt
~/elisp/org-active/contrib/lisp/org-lparse hides /usr/local/share/emacs/24.0.94/lisp/org/org-lparse
~/elisp/emms/lisp/tq hides /usr/local/share/emacs/24.0.94/lisp/emacs-lisp/tq

Features:
(epa-mail tla smerge-mode dvc-state dvc-config diff dvc-cmenu dvc-about
dvc-version dvc-revlist gnutls network-stream starttls tls mailalias
smtpmail shadow gnus-dired nnir mail-extr gnus-msg emacsbug sendmail
wdired find-func debug time-stamp newcomment animate vc-rcs xhg-dvc
bzr-core xdarcs-core xgit-core xmtn-minimal naquadah-theme em-unix
em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl
em-basic esh-opt em-banner em-alias esh-var esh-io esh-cmd esh-ext
esh-proc esh-groups eshell esh-module esh-mode align-let server battery
undo-tree slime-xref-browser slime-banner slime-tramp slime-asdf
slime-fancy slime-fontifying-fu slime-package-fu slime-references
slime-scratch slime-presentations slime-fuzzy slime-fancy-inspector
slime-c-p-c slime-editing-commands slime-autodoc slime-parse slime-repl
image-file newsticker newst-treeview tree-widget newst-plainview
newst-reader newst-ticker newst-backend xdvi-search preview-latex
pcomplete-extension em-term term ehelp electric pdbtrack whitespace
paren time mime-w3m mime eword-decode mel path-util mime-parse std11
luna mime-def mcharset mcs-20 mcs-e20 pces pces-e20 pces-20 broken
pcustom poe w3m-load avoid help-mode view savehist gnus-async nntp
markdown-mode org-google-weather google-weather url-cache googlecl
google-maps google-maps-static google-maps-geocode google-maps-base json
simple-call-tree el-expectations el-mock csv2org iedit rect zop-to-char
mule-util alist pym static apel-ver product elscreen smallurl mm-url
rectangle-utils tv-utils pcvs pcvs-parse pcvs-info pcvs-defs pcvs-util
autodoc mb-depth ioccur cl-info slime hyperspec slime-autoloads
ledger-config ledger esh-arg esh-util tex-site auto-loads esh-toggle
flymake eldoc-eval eldoc no-word regex-tool dired-extension image-dired
emms-mpd-config emms-playlist-limit emms-volume emms-volume-amixer
emms-i18n emms-history emms-score emms-stream-info
emms-metaplaylist-mode emms-bookmarks emms-lastfm-client
emms-lastfm-scrobbler parse-time emms-cue emms-mode-line-icon
emms-browser sort emms-playlist-sort emms-last-played emms-player-xine
emms-player-mpd tq emms-playing-time emms-lyrics emms-url hl-line
emms-tag-editor emms-mark emms-mode-line emms-cache emms-info-ogginfo
emms-info-mp3info emms-playlist-mode emms-player-vlc emms-player-mplayer
emms-info emms-streams later-do emms-source-playlist emms-source-file
emms-player-simple emms-setup emms emms-compat dvc-init bzr-gnus
tla-gnus xgit-gnus xhg-gnus gnus-art mm-uu mml2015 mm-view mml-smime
smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source
gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems nnheader
dvc-gnus tla-core tla-autoconf tla-defs dvc-log vc vc-dispatcher add-log
ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff dvc-autoloads htmlize-hack htmlize muse-colors
muse-docbook muse-texinfo texnfo-upd texinfo muse-latex muse-html
muse-xml-common muse-wiki cus-edit cus-start cus-load muse-publish
muse-project muse-protocols muse-regexps muse muse-nested-tags muse-mode
muse-autoloads org-config-thierry ob-sh org-crypt cal-china lunar solar
cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs vc-hg
org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo
org-infojs org-html org-exp ob-exp org-exp-blocks org-info org-gnus
org-docview org-bibtex bibtex org-bbdb org-agenda appt diary-lib
diary-loaddefs org-annotation-helper org-capture org-mks remember
org-remember org-datetree config-w3m w3m doc-view jka-compr image-mode
timezone w3m-hist w3m-fb w3m-ems wid-edit w3m-ccl ccl w3m-favicon
w3m-image w3m-proc w3m-util addressbook-bookmark message rfc822 mml
mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045
ietf-drums mailabbrev mail-utils gmm-utils mailheader firefox-protocol
bookmark-uzbl-handler bookmark-firefox-handler bookmark-extensions org
ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table org-footnote org-src
ob-comint ob-keys ob ob-eval org-pcomplete org-list org-faces org-compat
org-entities org-macs noutline outline cal-menu calendar cal-loaddefs
bookmark pp init-anything-thierry anything-describe-keybindings
anything-ipython edmacro kmacro ipython python-mode info-look executable
anything-delicious anything-mercurial xhg xhg-annotate xhg-mq xhg-log
xhg-core dvc-diff uniquify dvc-fileinfo dvc-unified dvc-tips diff-mode
dvc-core dvc-lisp dvc-buffers dvc-ui dvc-register dvc-utils dvc-emacs
ewoc dvc-defs dvc-site anything-config browse-url rx
anything-match-plugin xml url url-proxy url-privacy url-expand
url-methods url-history url-cookie url-util url-parse url-vars mailcap
grep compile tramp tramp-compat shell pcomplete comint ansi-color ring
format-spec tramp-loaddefs dired-x dired-aux dired regexp-opt ffap
thingatpt anything warnings epa-file epa derived epg epg-config
auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc
gnus-util time-date mm-util mail-prsvr password-cache usage-memo
eev-thierry iterator eev-all eev-mini-steps eev-browse-url eev-langs
eev-compose eev-glyphs disp-table eev-insert eev-steps eev-bounded eev
easy-mmode advice help-fns advice-preload cl w3m-wget info easymenu
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar
dnd fontset image fringe lisp-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 loaddefs button faces
cus-face files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
make-network-process dbusbind dynamic-setting system-font-setting
font-render-setting x-toolkit x multi-tty emacs)

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Thu, 08 Mar 2012 08:41:02 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Thu, 08 Mar 2012 09:38:53 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> (pop (nthcdr index tmp-list))

That does not make any sense.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 07:49:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Thu, 08 Mar 2012 18:25:59 +0100
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> (pop (nthcdr index tmp-list))
>
> That does not make any sense.
Sorry, as always I don't understand your answer.

(let ((lst '("a" "b" "c")))
  (pop (nthcdr 1 lst)))
=>"b"

What make any sense?

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 08:49:01 GMT) Full text and rfc822 format available.

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

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Fri, 09 Mar 2012 09:46:58 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> Sorry, as always I don't understand your answer.

:-)

> (let ((lst '("a" "b" "c")))
>   (pop (nthcdr 1 lst)))
> =>"b"
>
> What make any sense?

It depends on what `pop' you're using.  With the cl.el pop, you get this:

(setq lst '("a" "b" "c"))
=> ("a" "b" "c")
(pop (nthcdr 1 lst))
=> "b"
lst
=> ("a" "c")

With the Emacs Lisp `pop', you get this:

(setq lst '("a" "b" "c"))
=> ("a" "b" "c")
(pop (nthcdr 1 lst))
Debugger entered--Lisp error: (wrong-type-argument symbolp (nthcdr 1 lst))


-- 
(domestic pets only, the antidote for overdose, milk.)
  bloggy blog http://lars.ingebrigtsen.no/




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 10:23:01 GMT) Full text and rfc822 format available.

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

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Fri, 09 Mar 2012 11:21:08 +0100
Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:

> What make any sense?

Nothing.

ELISP> (pop (nthcdr 1 '("a" "b" "c")))
*** Eval error ***  Wrong type argument: symbolp, (nthcdr 1 (quote ("a" "b" "c")))

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 17:15:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Fri, 09 Mar 2012 18:12:45 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> Sorry, as always I don't understand your answer.
>
> :-)
>
>> (let ((lst '("a" "b" "c")))
>>   (pop (nthcdr 1 lst)))
>> =>"b"
>>
>> What make any sense?
>
> It depends on what `pop' you're using.  With the cl.el pop, you get this:
Sorry, I didn't specify which one I was using.
Of course I am using the CL one, as I always use at least the CL macros
in my lisp files.

BTW this is one more function that should be named cl-pop or something
similar.


> (setq lst '("a" "b" "c"))
> => ("a" "b" "c")
> (pop (nthcdr 1 lst))
> => "b"
> lst
> => ("a" "c")
>
> With the Emacs Lisp `pop', you get this:
>
> (setq lst '("a" "b" "c"))
> => ("a" "b" "c")
> (pop (nthcdr 1 lst))
> Debugger entered--Lisp error: (wrong-type-argument symbolp (nthcdr 1 lst))

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 17:18:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Fri, 09 Mar 2012 18:15:55 +0100
Andreas Schwab <schwab <at> linux-m68k.org> writes:

> Thierry Volpiatto <thierry.volpiatto <at> gmail.com> writes:
>
>> What make any sense?
>
> Nothing.
>
> ELISP> (pop (nthcdr 1 '("a" "b" "c")))
> *** Eval error ***  Wrong type argument: symbolp, (nthcdr 1 (quote ("a" "b" "c")))
>
Thank you Andreas, now I understand what you mean, as I said in
precedent mail, I use the CL version of pop.
Sorry to forget mentioning this.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 21:37:02 GMT) Full text and rfc822 format available.

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

From: Glenn Morris <rgm <at> gnu.org>
To: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Fri, 09 Mar 2012 16:35:08 -0500
byte-optimize-form-code-walker has special handling for the standard
`pop' macro so as not to warn about unused return values from (pop foo).
The CL version has a different format that is not recognized.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#10969; Package emacs. (Fri, 09 Mar 2012 21:59:02 GMT) Full text and rfc822 format available.

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

From: Thierry Volpiatto <thierry.volpiatto <at> gmail.com>
To: Glenn Morris <rgm <at> gnu.org>
Cc: Lars Magne Ingebrigtsen <larsi <at> gnus.org>, 10969 <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Fri, 09 Mar 2012 22:56:47 +0100
Glenn Morris <rgm <at> gnu.org> writes:

> byte-optimize-form-code-walker has special handling for the standard
> `pop' macro so as not to warn about unused return values from (pop foo).
> The CL version has a different format that is not recognized.
Ok, thanks.
Would be great if it was recognized too.

-- 
  Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




Reply sent to Noam Postavsky <npostavs <at> users.sourceforge.net>:
You have taken responsibility. (Wed, 08 Jun 2016 03:23:02 GMT) Full text and rfc822 format available.

Notification sent to Thierry Volpiatto <thierry.volpiatto <at> gmail.com>:
bug acknowledged by developer. (Wed, 08 Jun 2016 03:23:02 GMT) Full text and rfc822 format available.

Message #34 received at 10969-done <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: 10969-done <at> debbugs.gnu.org
Subject: Re: bug#10969: 24.0.94; Annoying warning for `pop'
Date: Tue, 7 Jun 2016 23:22:04 -0400
Version: 25.0.94

Seems to have been fixed in Emacs 25.




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

This bug report was last modified 7 years and 294 days ago.

Previous Next


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