From: Markus Triska <triska@metalevel.at>
To: 40375@debbugs.gnu.org
Subject: bug#40375: 27.0.50; yank unexpectedly depends on progn
Date: Wed, 01 Apr 2020 18:14:46 +0200 [thread overview]
Message-ID: <m2ftdnqj2h.fsf@metalevel.at> (raw)
Suppose yank.el comprises the following forms:
(erase-buffer)
(let* ((size 144)
(data (with-temp-buffer
(insert (format "P1\n%s %s\n" size size))
(dotimes (_ size)
(dotimes (_ size)
(insert "1 "))
(insert "\n"))
(buffer-string))))
(insert-image `(image :type pbm :data ,data :ascent center) "t"))
(kill-new (buffer-string))
(erase-buffer)
(yank)
When I start Emacs with:
$ emacs -Q yank.el --eval='(eval-buffer)'
then Emacs starts, and I see an empty buffer.
However, when I embed the entire contents of yank.el in (progn ...),
i.e., if yank.el consists of the following form:
(progn
(erase-buffer)
(let* ((size 144)
(data (with-temp-buffer
(insert (format "P1\n%s %s\n" size size))
(dotimes (_ size)
(dotimes (_ size)
(insert "1 "))
(insert "\n"))
(buffer-string))))
(insert-image `(image :type pbm :data ,data :ascent center) "t"))
(kill-new (buffer-string))
(erase-buffer)
(yank))
and I then start Emacs (again) with:
$ emacs -Q yank.el --eval='(eval-buffer)'
Then I see a black box in the buffer.
Hence, what (yank) inserts seems to unexpectedly depend on whether progn
is used. Is there a way to get the same result also if progn is not used?
Thank you and all the best!
Markus
In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin18.0.0, X toolkit, Xaw scroll bars)
of 2018-11-15 built on mts-mac
Repository revision: b4eb908f858284a7962851fd99c94598f76afa6f
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description: Mac OS X 10.14.2
Configured using:
'configure --prefix=/opt/local --without-ns --without-dbus
--without-gconf --without-libotf --without-m17n-flt --without-gpm
--with-gnutls --with-xml2 --with-modules --infodir
/opt/local/share/info/emacs --with-json --with-x-toolkit=lucid
--without-xaw3d --without-imagemagick --with-xpm --with-jpeg
--with-tiff --with-gif --with-png --with-lcms2 --without-rsvg
--with-xft 'CFLAGS=-pipe -Os
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
-arch x86_64' 'CPPFLAGS=-I/opt/local/include
-isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk'
'LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -lfreetype
-lfontconfig -Wl,-no_pie
-Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk
-arch x86_64''
Configured features:
XPM JPEG TIFF GIF PNG NOTIFY KQUEUE ACL GNUTLS LIBXML2 FREETYPE XFT ZLIB
TOOLKIT_SCROLL_BARS LUCID X11 XDBE XIM MODULES THREADS JSON LCMS2 GMP
Important settings:
value of $LC_CTYPE: UTF-8
value of $LANG: en_US.UTF-8
locale-coding-system: utf-8-unix
next reply other threads:[~2020-04-01 16:14 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-01 16:14 Markus Triska [this message]
2020-04-01 16:57 ` bug#40375: 27.0.50; yank unexpectedly depends on progn Noam Postavsky
2020-04-01 17:53 ` Markus Triska
2020-04-01 23:11 ` Noam Postavsky
2020-04-13 16:14 ` Noam Postavsky
2020-04-13 16:22 ` Markus Triska
2020-04-13 16:30 ` Noam Postavsky
2020-04-13 16:35 ` Andreas Schwab
2020-04-13 18:01 ` Markus Triska
2020-04-13 18:34 ` Eli Zaretskii
2020-04-13 18:52 ` Markus Triska
2020-04-13 19:35 ` Eli Zaretskii
2020-04-13 19:46 ` Markus Triska
2020-04-13 22:16 ` Noam Postavsky
2020-04-13 22:44 ` Drew Adams
2020-04-14 5:39 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2ftdnqj2h.fsf@metalevel.at \
--to=triska@metalevel.at \
--cc=40375@debbugs.gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).