From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dani Moncayo Newsgroups: gmane.emacs.help Subject: hl-line mode -- visual effect Date: Wed, 10 Aug 2022 19:51:29 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1518"; mail-complaints-to="usenet@ciao.gmane.io" To: "help-gnu-emacs@gnu.org list" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 10 19:53:09 2022 Return-path: Envelope-to: geh-help-gnu-emacs@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 1oLptF-0000HM-3B for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 19:53:09 +0200 Original-Received: from localhost ([::1]:36436 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLptD-00089y-Mt for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 13:53:07 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLpsN-00089Y-JO for help-gnu-emacs@gnu.org; Wed, 10 Aug 2022 13:52:15 -0400 Original-Received: from mail-io1-xd34.google.com ([2607:f8b0:4864:20::d34]:44943) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLpsM-0007T5-5c for help-gnu-emacs@gnu.org; Wed, 10 Aug 2022 13:52:15 -0400 Original-Received: by mail-io1-xd34.google.com with SMTP id v185so12735916ioe.11 for ; Wed, 10 Aug 2022 10:52:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=Hwrxp/OMmHZimfg6Z9dh03TGvq+sNkj4b1G7CjjaWCw=; b=bR2qQi/WUXmOT77sNNDDcgC+5NMagsOVIt8XJFhjjVcav7C7WF8XN5RBZrmCjs57zM P8MZ+/TcrTDpyX9uMLFUf4W7peekwOSQM52JYiocjGTlBii2wCYVqO4es9LvdlQPg6jz mmpszp4FbsWP8h1W9+VRKRkxMUOSVgytdZeYYGA8rp6a+fNuk6Lgi37KdgLxioeiKocl J58vNAXaGVJ4wOQ1sK55AbpAc3GQ2pk9FFuQtU3iwxjVOQxNw9wE6dlgBQjmpbHhhBEK LKm93OlNrl26HLzPgX7/HGNkEYzyuhyNnhqokNkE2HisY/f4wrM364+D9TOMPJXCDtq1 NZnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=Hwrxp/OMmHZimfg6Z9dh03TGvq+sNkj4b1G7CjjaWCw=; b=OomcZCPKGEe9pWgkw/uszaFQf3PXIbE7wfYFMmgDb1QEUngBKsoB8G/tFI0O3sSRIh yhi9reMGkesaZ5hIiJsgR//EBkqHoEF/n4EGfDCzY/hQ4ZW4MlYBecUKw5NWBrd6+72a ThXBTl42sp989WQlqPN56ujy6AN2j33rxXE9iUScr/lu7hArZKkKU+0mdJr6CJodvAST +qdCwPDh8Ej7V1VIigdG5QYi2T/AnjVy2ap/HheHzBEmxGmbUguVduqzFxQ9Lc3JegFd fQBXBMqfVROY+ZwW4qX86too20iDyw0lhqZuKlfcS+RSYSwVnoJSdektF4TniItoPUnJ VZ4Q== X-Gm-Message-State: ACgBeo0/8uqPgFE9Qx7m1abQB+TPLuy5d/PvtvxOa2SNtEFl60U9+ftl ZhUHKIVQnx8PKpgkJJVniSF+N2Lzg3+yhydQwAIZDYjEcto= X-Google-Smtp-Source: AA6agR4uS0BMVKYhfPYVxTwfzM1pMedB+tKSiL95jIftvDBrKyvUAEyyEZJ5+r7ZgNz/T+f3+vx6VqBQw0p4MiHJR8w= X-Received: by 2002:a05:6638:16d1:b0:342:cdcb:7937 with SMTP id g17-20020a05663816d100b00342cdcb7937mr10620110jat.94.1660153931491; Wed, 10 Aug 2022 10:52:11 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::d34; envelope-from=dmoncayo@gmail.com; helo=mail-io1-xd34.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:138784 Archived-At: Hello guys, I have this in my init file, to enable "hl-line" mode in all my buffers: (global-hl-line-mode 1) Until now, I have customized the "hl-line" font to set a background color, slightly more saturated than the background of the "default" font. This approach has worked reasonably well for me for quite some time. But it's not perfect: I have buffers (eg. "*Diff*" buffer) where the background color of each line conveys valuable semantic information (added line, removed line, ...), and thus, in those buffers, my current approach doesn't work well, because the background color of the selected line is fixed (i.e. _overrides_ the _original_ background color of the line). So, I'd like to highlight the selected line in a more subtle way: I'd like the selected line to slightly alter[1] the _original_ background color. Does Emacs currently provide a reasonably simple way to achieve this? TIA -- Dani Moncayo [1] "alter" could be something like "increase a bit the saturation or lightness"