From unknown Fri Jun 20 05:27:19 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#77384 <77384@debbugs.gnu.org> To: bug#77384 <77384@debbugs.gnu.org> Subject: Status: 31.0.50; Image slice is ignored on mode/header/tab line Reply-To: bug#77384 <77384@debbugs.gnu.org> Date: Fri, 20 Jun 2025 12:27:19 +0000 retitle 77384 31.0.50; Image slice is ignored on mode/header/tab line reassign 77384 emacs submitter 77384 David Ponce severity 77384 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 30 10:01:43 2025 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 From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 30 10:53:32 2025 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 To: David Ponce In-Reply-To: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> (bug-gnu-emacs@gnu.org) Subject: Re: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line References: <6ddbd04a-4358-4e07-82c5-24593544e349@orange.fr> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 77384 Cc: 77384@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 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 debbugs-submit-bounces@debbugs.gnu.org Sun Mar 30 11:44:28 2025 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 Subject: Re: bug#77384: 31.0.50; Image slice is ignored on mode/header/tab line To: Eli Zaretskii 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-Debbugs-Envelope-To: 77384 Cc: 77384@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: -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 debbugs-submit-bounces@debbugs.gnu.org Sun Mar 30 12:16:17 2025 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. From unknown Fri Jun 20 05:27:19 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Mon, 28 Apr 2025 11:24:16 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator