From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?UTF-8?Q?Cl=c3=a9ment_Pit-Claudel?= Newsgroups: gmane.emacs.devel Subject: Re: "Why is emacs so square?" Date: Fri, 17 Apr 2020 15:31:53 -0400 Message-ID: <1c245d30-75ac-23b7-4e13-81a916fbdca5@gmail.com> References: <8wXYP4GY9hwW-9mYv6_LGMETZ8Vz3Ob1Bec6yh6kPT7yxjTkxA3V6dXY4ELra9tYiJUxJmgXKSIEX4w8HFiPRoeGVSQHDSoBVy1voj1e3Qo=@protonmail.com> <87wo6h1kwl.fsf@emailmessageidheader.nil> <83k12hgt43.fsf@gnu.org> <838siwhmco.fsf@gnu.org> <0348a76e-d55a-2e75-8ed1-1beaa6649ed6@gmail.com> <837dyfe45q.fsf@gnu.org> <245308ec-5154-7d4b-dba4-0b21f42a0e95@gmail.com> <835zdze1gs.fsf@gnu.org> <51cb2788-3086-367d-ec05-ea324da49a12@gmail.com> <83imhyd1w1.fsf@gnu.org> <83f35fb6-806e-1b28-da76-31919a398045@gmail.com> <833692cgr4.fsf@gnu.org> <6479af83-2cab-05b0-3042-8030ec3f1e1d@gmail.com> <83wo6eazrd.fsf@gnu.org> <8001bd11-b552-e94e-d15a-30f9bd34f71b@gmail.com> <83sgh2av7x.fsf@gnu.org> <21e1fef1-63a8-815a-1293-45ee79ffcabc@gmail.com> <83lfmuatvu.fsf@gnu.org> <3604def6-82c0-1af2-baff-b32e426d642f@gmail.com> <83k12earis.fsf@gnu.org> <83h7xiaqtf.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="78169"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 Cc: emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Apr 17 21:32:49 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jPWjJ-000KEK-7q for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Apr 2020 21:32:49 +0200 Original-Received: from localhost ([::1]:51142 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPWjI-0007aa-6Y for ged-emacs-devel@m.gmane-mx.org; Fri, 17 Apr 2020 15:32:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51133) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jPWiT-0006lp-I2 for emacs-devel@gnu.org; Fri, 17 Apr 2020 15:31:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jPWiS-0003on-CM for emacs-devel@gnu.org; Fri, 17 Apr 2020 15:31:57 -0400 Original-Received: from mail-qt1-x829.google.com ([2607:f8b0:4864:20::829]:43330) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jPWiR-0003mU-Nl; Fri, 17 Apr 2020 15:31:55 -0400 Original-Received: by mail-qt1-x829.google.com with SMTP id z90so2943670qtd.10; Fri, 17 Apr 2020 12:31:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=PWhtpSBYmtPD2I0LQedhXB0G7I9FxQiTJZt3Mw00IHE=; b=cP1N1a80qlOWN6XzkghmnT7EiC5O9FWIQu5lmCBX5buv7sGUWuLMY+LKGnWQpAvx70 Ghy+LBaHFSZbQrdbXJgDsiw+qhWBY4+oT19kWDjddu7HhDIE5tBjMvDFsLHLHZX2ePIp XXA7Kgs8Dbc12oeUUDCN+dMfmoQ0nUActzPPXJapiG8TpUaIBIUg00+eIpDC/9XBILFb YDystRgjkOwt2JkCkA7qfhPaXt6XYxijA4DAPDW5n8JdSi/dHkZLdWlfNBXvfDxv+pHF 4z7uFmT/zAzs7iHXUSSm8S883QAQfaPD8osNjSA2dxRJM1BCwUjeMaj4ulBfBWZC4MAj 2WYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=PWhtpSBYmtPD2I0LQedhXB0G7I9FxQiTJZt3Mw00IHE=; b=Qfm7KZe7vpFwDLZdVKIHAENbuEQlcy07iIGABdA04DU3SdwuB7UBT7ulPwZ2qXbx6b 0GOzNLfExMKLefNdZZ1fLnqygM0K9UEEeHkGCkNiVEphblhq4VEY9d9RJQWf9cNW4c2t f944HTePmyjKACxH7fyP+DS7jE6vK8wi4Pqlp/UwBoq4na0i/O3cguMVSVPxoufnYswp yk7fZVnIQyYlgpG8eyZsi1evk7xB5E2fG8cSIYo4/koCVpMhYX78VreIqZPjgiebdhmG Wyg+a07AMo6NnTE+LBzUFVLXXMdK6720k9ayqHtushs+0KwUc8dOQif0VOM6He911Mku Os8g== X-Gm-Message-State: AGi0Pub2Ud8Wrzr17M/7uhRO0IeOuEukVzWp4Dbhp5SOFTmoGa6/2Qmg xHGSzplHM0Tl4l0Y3auGxfssni6W X-Google-Smtp-Source: APiQypJ+7pu4zphvxSu53v2CnvjwsWU4pcoif864vWOwZozqUvJkgzZNaOWCe3CzzfTnOLsv3HinDg== X-Received: by 2002:ac8:19fd:: with SMTP id s58mr4643986qtk.222.1587151914623; Fri, 17 Apr 2020 12:31:54 -0700 (PDT) Original-Received: from ?IPv6:2601:184:4180:66e7:da2:5c19:86dd:363e? ([2601:184:4180:66e7:da2:5c19:86dd:363e]) by smtp.googlemail.com with ESMTPSA id j14sm3878139qkk.92.2020.04.17.12.31.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2020 12:31:53 -0700 (PDT) In-Reply-To: <83h7xiaqtf.fsf@gnu.org> Content-Language: en-GB X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::829 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:247196 Archived-At: On 17/04/2020 14.51, Eli Zaretskii wrote: >> Date: Fri, 17 Apr 2020 21:36:27 +0300 >> From: Eli Zaretskii >> Cc: emacs-devel@gnu.org >> >> Did you try using an image? I did not. Interesting thought! But since I need the "[" on graphical terminals, I'd use a replacement spec that says to show an empty image on graphical terminals, is that right? > Or a window-specific overlay? Interesting! But wouldn't I need to re-create the overlays every time the buffer is displayed in a new window? > And btw, in the conditional 'display' spec, did you call > display-graphic-p with a frame argument? Yes, here's the full test: (defface my-button '((((type x w32 ns) (class color)) :box (:line-width -1 :style released-button) :background "lightgrey" :foreground "black") (t :inherit underline)) "Button face" :group 'flycheck-faces) (with-current-buffer (get-buffer-create "button") (insert (propertize "[" 'display '(when (display-graphic-p (selected-frame)) . ""))) (insert (propertize "button" 'face 'my-button)) (insert (propertize "]" 'display '(when (display-graphic-p (selected-frame)) . "")))) I put this code in button.el, then I run emacs like this: emacs -Q -nw -l button.el I display the buffer in the terminal; it looks like this: [button] with "button" underlined Then I use M-x make-frame-on-display :0 to show the same buffer in a graphical frame. I see this: [button] with a 3D face on "button". If I move the point, the brackets disappear on both frames (the terminal one and the graphic one. If I switch back to the terminal frame, the brackets reappear on both frames. Clément.