From unknown Fri Jun 20 07:21:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Mar 2025 14:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 77384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 77384@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.17433433058591 (code B ref -1); Sun, 30 Mar 2025 14:02:01 +0000 Received: (at submit) by debbugs.gnu.org; 30 Mar 2025 14:01:45 +0000 Received: from localhost ([127.0.0.1]:37616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tytEM-0002EU-Pf for submit@debbugs.gnu.org; Sun, 30 Mar 2025 10:01:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53758) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tytEI-0002EO-65 for submit@debbugs.gnu.org; Sun, 30 Mar 2025 10:01:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tytEB-0000G7-I5 for bug-gnu-emacs@gnu.org; Sun, 30 Mar 2025 10:01:31 -0400 Received: from smtp-26.smtpout.orange.fr ([80.12.242.26] helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tytE8-00032e-HO for bug-gnu-emacs@gnu.org; Sun, 30 Mar 2025 10:01:31 -0400 Received: from [192.168.1.21] ([90.112.40.65]) by smtp.orange.fr with ESMTPA id ytDut0Soll9slytDxtAfSc; Sun, 30 Mar 2025 16:01:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1743343279; bh=62GviQ1rj2eUivrj/HMgZsqlU4MXYvzQwfema3E9nOo=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=Nl+oa4RLZEhw9pW5o+dcbCmw46h55ZnoYPv95FDV1KyeCRdJweb3sjLjKR9qV5ijI C04S306C+f8Lh73ToGb5rHIOUYjcyEEKR31DpsHlV6HE0/E28FZGV2oQzIWrxv6ct2 wzXtuk2U5Kb7WjgK/bbwUsmFUj/7N6S97/WBmdmiIEBCX6QmMNeZRUmoLZIlvox/5d VVQjZs+K7blhyOo2sg43/SmUl8tYoQPeeiPyYrPFJtjL5ovjI0GjOhYYW59cYQwXI+ U9TlZFDkS7nygBnu9Nty4h7jphq7Yk7LQlJeX8DXyNu+Cd2h2LLWxbjo9jtj4cKvQ5 pybrjjepeMHMw== X-ME-Helo: [192.168.1.21] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sun, 30 Mar 2025 16:01:19 +0200 X-ME-IP: 90.112.40.65 Message-ID: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> Date: Sun, 30 Mar 2025 16:01:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: fr, en-US From: David Ponce Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=80.12.242.26; envelope-from=da_vid@orange.fr; helo=smtp.smtpout.orange.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, While trying to horizontally scroll images on the header line, I discovered that the display slice specification is ignored when an image is displayed in the header (or mode or tab) line. I wonder if this might be a bug, or just an unsupported feature, since the manual says nothing about this limitation (or I did not find it): "‘(slice X Y WIDTH HEIGHT)’ This specification together with ‘image’ specifies a “slice” (a partial area) of the image to display. The elements Y and X specify the top left corner of the slice, within the image; WIDTH and HEIGHT specify the width and height of the slice. Integers are numbers of pixels. A floating-point number in the range 0.0-1.0 stands for that fraction of the width or height of the entire image." Following is a short recipe to eval in the *scratch-buffer*, that exhibits the issue. The expected sliced image is inserted in the current buffer, but the whole image is displayed in the header line. (let* ((img (find-image '((:file "splash.svg")))) (size (image-size img t)) (h (frame-char-height)) (y (- (cdr size) h h h)) (txt (propertize " " 'display (list img `(slice 0 ,y 0.5 ,h))))) (insert txt "\n") (setq header-line-format txt)) Thanks! In GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) of 2025-03-30 Repository revision: 209b7e7444df5cb164679c0e55f46cba424ad13c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 40 (KDE Plasma) Configured using: 'configure --with-native-compilation=no' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LC_TIME: fr_FR.utf8 value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix From unknown Fri Jun 20 07:21:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Mar 2025 14:54:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: David Ponce Cc: 77384@debbugs.gnu.org Received: via spool by 77384-submit@debbugs.gnu.org id=B77384.174334641217675 (code B ref 77384); Sun, 30 Mar 2025 14:54:02 +0000 Received: (at 77384) by debbugs.gnu.org; 30 Mar 2025 14:53:32 +0000 Received: from localhost ([127.0.0.1]:37716 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyu2W-0004b0-7L for submit@debbugs.gnu.org; Sun, 30 Mar 2025 10:53:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59772) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tyu2T-0004an-8E for 77384@debbugs.gnu.org; Sun, 30 Mar 2025 10:53:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tyu2N-0002mn-N0; Sun, 30 Mar 2025 10:53:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=8486jKofAqwBk+Qp4miy+AjXT8M6oCc5DhpyDru9jaE=; b=P+LAfGCLQp8b i3wNp0CmIYFHpxOy/Ll4XhlJIJis4nFwBxDZyvslkWbOk/czMCbZ1OJ/gFrgv4a+bXeVdGWT985hZ isHbC55CD7PqOYOxoKtoRclPAWaluBTmC0SeN5C97G51/VqdCzOvq7MD4Ulpo+V1YyCZxG66pGWPS luuVPNi68e4DUA+0D13YrlagkKZgm6yQ7W5jyfr1bM36LeXApW4jsOPkJaftL9A7svLReNzQdQDq5 H8CBba1g1sd4LoUaQN+Tw9DRCjkqKNjPffojVqGKU9ikNhTKzaYeu7/Ks5rs+4xJbP7ifpoVNjf3e /So11kBuYDsdwIZt9rdBHw==; Date: Sun, 30 Mar 2025 17:53:09 +0300 Message-Id: <86tt7a4lka.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> (bug-gnu-emacs@gnu.org) References: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 30 Mar 2025 16:01:14 +0200 > From: David Ponce via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Following is a short recipe to eval in the *scratch-buffer*, that exhibits > the issue. The expected sliced image is inserted in the current buffer, > but the whole image is displayed in the header line. > > (let* ((img (find-image '((:file "splash.svg")))) > (size (image-size img t)) > (h (frame-char-height)) > (y (- (cdr size) h h h)) > (txt (propertize " " 'display (list img `(slice 0 ,y 0.5 ,h))))) > (insert txt "\n") > (setq header-line-format txt)) You need to do it the other way around: (let* ((img (find-image '((:file "splash.svg")))) (size (image-size img t)) (h (frame-char-height)) (y (- (cdr size) h h h)) (txt (propertize " " 'display (list `(slice 0 ,y 0.5 ,h) img)))) (insert txt "\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (setq header-line-format txt)) IOW, first slice, then the image spec. From unknown Fri Jun 20 07:21:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line Resent-From: David Ponce Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 30 Mar 2025 15:45:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77384 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 77384@debbugs.gnu.org Received: via spool by 77384-submit@debbugs.gnu.org id=B77384.174334946827086 (code B ref 77384); Sun, 30 Mar 2025 15:45:01 +0000 Received: (at 77384) by debbugs.gnu.org; 30 Mar 2025 15:44:28 +0000 Received: from localhost ([127.0.0.1]:37807 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyupn-00072o-OE for submit@debbugs.gnu.org; Sun, 30 Mar 2025 11:44:28 -0400 Received: from smtp-27.smtpout.orange.fr ([80.12.242.27]:42921 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtps (TLS1.2:RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1tyupl-00072d-NU for 77384@debbugs.gnu.org; Sun, 30 Mar 2025 11:44:26 -0400 Received: from [192.168.1.21] ([90.112.40.65]) by smtp.orange.fr with ESMTPA id yupetKXS68Xbxyuphta68Q; Sun, 30 Mar 2025 17:44:23 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1743349464; bh=KMuPy3QfCU7siiVKK1iKSgjKtC2INVmD2HUvDJWmLrE=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=q9kWLYhv0qtXyW1cBi4UyjPNDsv3u1QKs8jP8O5Di2uAXfRZymhrCInMt1MVf2K/1 E6R/0dRzMFtHOKFnDI6PH2pfsogHUmImsBB4KbxY8e8U7FWbAjSndYwDWK7KjLCaUp Y9JiTb2rvDGFTN8daATDtCtQ4DE4E5INy8T+GijfRKwOmUM+VysJt7FAgT6jJo4rb/ DtjIMklL7lIOg7flznokePxNRdfW1rPPGl55C7rG6NPYcn2v/0oapRPdWsP/WKGvqQ GtYbOGoGUgVhTZ2RPuNg0eBJ7jSrPLdsIbGvb5CpCBs7aLVwmnIIgU8CTFiggimYgT PMuBIAL2RNigA== X-ME-Helo: [192.168.1.21] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sun, 30 Mar 2025 17:44:24 +0200 X-ME-IP: 90.112.40.65 Message-ID: <5a4156de-0e7e-4ef7-8b08-0795a343a030@orange.fr> Date: Sun, 30 Mar 2025 17:44:18 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird References: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> <86tt7a4lka.fsf@gnu.org> Content-Language: fr, en-US From: David Ponce In-Reply-To: <86tt7a4lka.fsf@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.0 (--) On 2025-03-30 16:53, Eli Zaretskii wrote: >> Date: Sun, 30 Mar 2025 16:01:14 +0200 >> From: David Ponce via "Bug reports for GNU Emacs, >> the Swiss army knife of text editors" >> >> Following is a short recipe to eval in the *scratch-buffer*, that exhibits >> the issue. The expected sliced image is inserted in the current buffer, >> but the whole image is displayed in the header line. >> >> (let* ((img (find-image '((:file "splash.svg")))) >> (size (image-size img t)) >> (h (frame-char-height)) >> (y (- (cdr size) h h h)) >> (txt (propertize " " 'display (list img `(slice 0 ,y 0.5 ,h))))) >> (insert txt "\n") >> (setq header-line-format txt)) > > You need to do it the other way around: > > (let* ((img (find-image '((:file "splash.svg")))) > (size (image-size img t)) > (h (frame-char-height)) > (y (- (cdr size) h h h)) > (txt (propertize " " 'display (list `(slice 0 ,y 0.5 ,h) img)))) > (insert txt "\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > (setq header-line-format txt)) > > IOW, first slice, then the image spec. Oh! I didn't even think to try that. It works perfectly now. You can close this bug. Thank you so much for your help, once again! Have a great Sunday! From unknown Fri Jun 20 07:21:33 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: David Ponce Subject: bug#77384: closed (Re: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line) Message-ID: References: <86semu4hq7.fsf@gnu.org> <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> X-Gnu-PR-Message: they-closed 77384 X-Gnu-PR-Package: emacs Reply-To: 77384@debbugs.gnu.org Date: Sun, 30 Mar 2025 16:17:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1743351423-743-1" This is a multi-part message in MIME format... ------------=_1743351423-743-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #77384: 31.0.50; Image slice is ignored on mode/header/tab line which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 77384@debbugs.gnu.org. --=20 77384: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D77384 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1743351423-743-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 77384-done) by debbugs.gnu.org; 30 Mar 2025 16:16:17 +0000 Received: from localhost ([127.0.0.1]:37875 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tyvKb-0000A8-Eq for submit@debbugs.gnu.org; Sun, 30 Mar 2025 12:16:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43394) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tyvKY-00009r-SS for 77384-done@debbugs.gnu.org; Sun, 30 Mar 2025 12:16:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tyvKS-00065E-8h; Sun, 30 Mar 2025 12:16:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=IzPR9OGsBZqLGhK2lgvIJe6vQBFekF8Ry7pdOTU/NJI=; b=hZLRjXSt2eAa VtZjK8Phpy4/B8+YnCi5vJHo60yBF/f0ZYjOz8f2ZUrCUC5zHauBjCtVuO62GmQJ8BHijcd754we/ w5fEGAg31IgmUs+D0m9dFPrNYNtt05xD6BnwG0c9UhGTuQKlkGlzPkxX3WzHLpt8F5QimM1TmStRb r+reM3X2KacT+s1uq58sluQqUkCYYsjd61h/B7ULgbuLZ1xejC9LTne82pkv5dTMFWsPxc5gCBDqD FCmcdAQZfN5mj/hX3TbkyoZsM+OBFIxq341cYLF/AaHbPbyt+QguF591/w3pCZMkotZeWulbHnf9C HnUD/K/OdgCaFZfCiNodBw==; Date: Sun, 30 Mar 2025 19:16:00 +0300 Message-Id: <86semu4hq7.fsf@gnu.org> From: Eli Zaretskii To: David Ponce In-Reply-To: <5a4156de-0e7e-4ef7-8b08-0795a343a030@orange.fr> (message from David Ponce on Sun, 30 Mar 2025 17:44:18 +0200) Subject: Re: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line References: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> <86tt7a4lka.fsf@gnu.org> <5a4156de-0e7e-4ef7-8b08-0795a343a030@orange.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77384-done Cc: 77384-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Date: Sun, 30 Mar 2025 17:44:18 +0200 > Cc: 77384@debbugs.gnu.org > From: David Ponce > > On 2025-03-30 16:53, Eli Zaretskii wrote: > > You need to do it the other way around: > > > > (let* ((img (find-image '((:file "splash.svg")))) > > (size (image-size img t)) > > (h (frame-char-height)) > > (y (- (cdr size) h h h)) > > (txt (propertize " " 'display (list `(slice 0 ,y 0.5 ,h) img)))) > > (insert txt "\n") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > > (setq header-line-format txt)) > > > > IOW, first slice, then the image spec. > > Oh! I didn't even think to try that. It works perfectly now. > You can close this bug. > > Thank you so much for your help, once again! You're welcome. Closing. ------------=_1743351423-743-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 30 Mar 2025 14:01:45 +0000 Received: from localhost ([127.0.0.1]:37616 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tytEM-0002EU-Pf for submit@debbugs.gnu.org; Sun, 30 Mar 2025 10:01:43 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53758) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tytEI-0002EO-65 for submit@debbugs.gnu.org; Sun, 30 Mar 2025 10:01:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tytEB-0000G7-I5 for bug-gnu-emacs@gnu.org; Sun, 30 Mar 2025 10:01:31 -0400 Received: from smtp-26.smtpout.orange.fr ([80.12.242.26] helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtps (TLS1.2:RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tytE8-00032e-HO for bug-gnu-emacs@gnu.org; Sun, 30 Mar 2025 10:01:31 -0400 Received: from [192.168.1.21] ([90.112.40.65]) by smtp.orange.fr with ESMTPA id ytDut0Soll9slytDxtAfSc; Sun, 30 Mar 2025 16:01:19 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=orange.fr; s=t20230301; t=1743343279; bh=62GviQ1rj2eUivrj/HMgZsqlU4MXYvzQwfema3E9nOo=; h=Message-ID:Date:MIME-Version:To:From:Subject; b=Nl+oa4RLZEhw9pW5o+dcbCmw46h55ZnoYPv95FDV1KyeCRdJweb3sjLjKR9qV5ijI C04S306C+f8Lh73ToGb5rHIOUYjcyEEKR31DpsHlV6HE0/E28FZGV2oQzIWrxv6ct2 wzXtuk2U5Kb7WjgK/bbwUsmFUj/7N6S97/WBmdmiIEBCX6QmMNeZRUmoLZIlvox/5d VVQjZs+K7blhyOo2sg43/SmUl8tYoQPeeiPyYrPFJtjL5ovjI0GjOhYYW59cYQwXI+ U9TlZFDkS7nygBnu9Nty4h7jphq7Yk7LQlJeX8DXyNu+Cd2h2LLWxbjo9jtj4cKvQ5 pybrjjepeMHMw== X-ME-Helo: [192.168.1.21] X-ME-Auth: ZGFfdmlkQHdhbmFkb28uZnI= X-ME-Date: Sun, 30 Mar 2025 16:01:19 +0200 X-ME-IP: 90.112.40.65 Message-ID: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> Date: Sun, 30 Mar 2025 16:01:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: fr, en-US To: bug-gnu-emacs@gnu.org From: David Ponce Subject: 31.0.50; Image slice is ignored on mode/header/tab line Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=80.12.242.26; envelope-from=da_vid@orange.fr; helo=smtp.smtpout.orange.fr X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) Hello, While trying to horizontally scroll images on the header line, I discovered that the display slice specification is ignored when an image is displayed in the header (or mode or tab) line. I wonder if this might be a bug, or just an unsupported feature, since the manual says nothing about this limitation (or I did not find it): "‘(slice X Y WIDTH HEIGHT)’ This specification together with ‘image’ specifies a “slice” (a partial area) of the image to display. The elements Y and X specify the top left corner of the slice, within the image; WIDTH and HEIGHT specify the width and height of the slice. Integers are numbers of pixels. A floating-point number in the range 0.0-1.0 stands for that fraction of the width or height of the entire image." Following is a short recipe to eval in the *scratch-buffer*, that exhibits the issue. The expected sliced image is inserted in the current buffer, but the whole image is displayed in the header line. (let* ((img (find-image '((:file "splash.svg")))) (size (image-size img t)) (h (frame-char-height)) (y (- (cdr size) h h h)) (txt (propertize " " 'display (list img `(slice 0 ,y 0.5 ,h))))) (insert txt "\n") (setq header-line-format txt)) Thanks! In GNU Emacs 31.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.43, cairo version 1.18.0) of 2025-03-30 Repository revision: 209b7e7444df5cb164679c0e55f46cba424ad13c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12014000 System Description: Fedora Linux 40 (KDE Plasma) Configured using: 'configure --with-native-compilation=no' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINERAMA XINPUT2 XPM XRANDR GTK3 ZLIB Important settings: value of $LC_TIME: fr_FR.utf8 value of $LANG: fr_FR.UTF-8 locale-coding-system: utf-8-unix ------------=_1743351423-743-1--