all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#40375: 27.0.50; yank unexpectedly depends on progn
@ 2020-04-01 16:14 Markus Triska
  2020-04-01 16:57 ` Noam Postavsky
  0 siblings, 1 reply; 16+ messages in thread
From: Markus Triska @ 2020-04-01 16:14 UTC (permalink / raw)
  To: 40375


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






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

end of thread, other threads:[~2020-04-14  5:39 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-01 16:14 bug#40375: 27.0.50; yank unexpectedly depends on progn Markus Triska
2020-04-01 16:57 ` 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

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.