GNU bug report logs - #22757
25.1.50; `face-at-point` and `faces--attribute-at-point` -- add argument WINDOW-OR-BUFFER

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Severity: wishlist; Reported by: Keith David Bershatsky <esq@HIDDEN>; dated Sun, 21 Feb 2016 18:06:01 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 22 Feb 2016 19:46:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 22 14:46:49 2016
Received: from localhost ([127.0.0.1]:38485 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXwRV-00039n-9K
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 14:46:49 -0500
Received: from cobb.liquidweb.com ([50.28.13.150]:42657)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <esq@HIDDEN>) id 1aXwRT-00039a-6k
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 14:46:47 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date;
 bh=omc5hAXn21anqZZ03c08Z/r//OOUecyBn6pAeoM8fe0=; 
 b=R1doE7USryMXUkEyZS0bTwy7EpjMpsEKdfmgegv89b3tioED429c6/PU1B8oo5ymMTcJfj6DcrF1uZrUWuG6DjJs9Q3h6Z4KJIcSTVaVn4HxGEDvyI8/KT4+YO2KLY+Q;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:50473
 helo=server.private.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1aXwRJ-0002st-St; Mon, 22 Feb 2016 14:46:38 -0500
Date: Mon, 22 Feb 2016 11:46:39 -0800
Message-ID: <m2wppwjzog.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#22757: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add argument
 WINDOW-OR-BUFFER
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Here is the custom function that I came up with, derived in part from `faces.el`, `color.el` and from Drew's color libraries.

(defun color-vector-calc (buffer-or-window pos fg-or-bg)
"Calculate the color vector of either :foreground or :background for the face at POS.
Sample usage:  (color-vector-calc (selected-window) (point) 'foreground)
The first argument BUFFER-OR-WINDOW is used in the context of `get-char-property'.
The second argument POS is a user specified `point' somewhere in the buffer/window.
The third argument FG-OR-BG is a symbol of either 'foreground or 'background"
  (let* (
      (frame (selected-frame))
      (+-default-face-fg
        (face-attribute-specified-or (face-attribute 'default :foreground frame 'default) nil))
      (+-default-face-bg
        (face-attribute-specified-or (face-attribute 'default :background frame 'default) nil))
      (faceprop
        (or
          (get-char-property pos 'read-face-name buffer-or-window)
          (get-char-property pos 'face buffer-or-window)
          'default))
      (face
        (cond
          ((symbolp faceprop) faceprop)
          ((and (consp faceprop) (not (keywordp (car faceprop)))
                (not (memq (car faceprop) '(foreground-color background-color))))
           (car faceprop))
          (t ;; e.g., (:foreground yellow)
            faceprop)))
      (color
        (cond
            ((and face (symbolp face))
            (if (eq 'foreground fg-or-bg)
              (face-attribute-specified-or (face-attribute face :foreground frame 'default) nil)
              (face-attribute-specified-or (face-attribute face :background frame 'default) nil)))
          ((and (eq 'foreground fg-or-bg) (consp face))
            (cond
              ((memq 'foreground-color face)
                (cdr (memq 'foreground-color face)))
              ((memq ':foreground face)
                (cadr (memq ':foreground face)))
              (t +-default-face-fg)))
          ((and (eq 'background fg-or-bg) (consp face))
            (cond
              ((memq 'background-color face)
                (cdr (memq 'background-color face)))
              ((memq ':background face)
                (cadr (memq ':background face)))
              (t +-default-face-bg)))
          (t
            (if (eq 'foreground fg-or-bg)
              +-default-face-fg
              +-default-face-bg))))
      (color-values
        (cond
         ((member color '(unspecified "unspecified-fg" "unspecified-bg"))
          nil)
         ((memq (framep (or frame (selected-frame))) '(x w32 ns))
          (xw-color-values color frame))
         (t
          (tty-color-values color frame))))
      (value
        (mapcar
          (lambda (x)
            (let* (
              (valmax
                (cond
                 ((memq (framep (or frame (selected-frame))) '(x w32 ns))
                  (xw-color-values "#ffffff" frame))
                 (t
                  (tty-color-values "#ffffff" frame))))
              (+-valmax (float (car valmax))))
              (/ x +-valmax)))
          color-values)) )
    (vconcat value)))




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 22 Feb 2016 19:26:05 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 22 14:26:05 2016
Received: from localhost ([127.0.0.1]:38461 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXw7R-0002cX-Ea
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 14:26:05 -0500
Received: from eggs.gnu.org ([208.118.235.92]:60566)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <eliz@HIDDEN>) id 1aXw7P-0002c1-BN
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 14:26:03 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aXw7F-0001Ld-Ki
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 14:25:58 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:43732)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aXw7F-0001LX-HK; Mon, 22 Feb 2016 14:25:53 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1518
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1aXw7E-0005aP-Q0; Mon, 22 Feb 2016 14:25:53 -0500
Date: Mon, 22 Feb 2016 21:25:44 +0200
Message-Id: <83mvqsk0nb.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Keith David Bershatsky <esq@HIDDEN>
In-reply-to: <m21t84ligw.wl%esq@HIDDEN> (message from Keith David
 Bershatsky on Mon, 22 Feb 2016 10:15:27 -0800)
Subject: Re: Reply to correspondence dated February 22, 2016.
References: <m21t84ligw.wl%esq@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Date:  Mon, 22 Feb 2016 10:15:27 -0800
> From:  Keith David Bershatsky <esq@HIDDEN>
> Cc:  22757 <at> debbugs.gnu.org
> 
> I agree that `get-char-property` is the key ingredient, and it would be prudent to steer users to that function.  It does, however, require an advanced level of Lisp expertise to understand how to use it to achieve certain goals.  I probably wouldn't have been able to figure out (in a reasonable period of time) how to get foreground/background at point without standing on the shoulders of others -- e.g., `foreground-color-at-point` and `background-color-at-point`.

get-char-property gets you the face, and then face-foreground and
face-background (both documented in the ELisp manual) can be used to
get the colors.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 22 Feb 2016 18:17:13 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 22 13:17:13 2016
Received: from localhost ([127.0.0.1]:38395 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXv2m-0000tg-Nq
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 13:17:12 -0500
Received: from cobb.liquidweb.com ([50.28.13.150]:40385)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <esq@HIDDEN>) id 1aXv2l-0000tO-8j
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 13:17:11 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date;
 bh=Q0LAEWxUb5zhvLYiyjKh/F26PikGBX1DRaysOkLcZvw=; 
 b=cHRDdu3sdCPLqJyPJmg2d5fZYGpWk+3GIv7Hf8HBRyni3l4V6FN+YuPmxRo7Fae3bngUGspcxJzQ/I4TLA3jVuR1pWM1B4sbnoKyeJEehSvUhi50JzAuBZA7lHG+58Xa;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49810
 helo=server.private.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1aXv2d-0004SJ-Fj; Mon, 22 Feb 2016 13:17:03 -0500
Date: Mon, 22 Feb 2016 10:17:04 -0800
Message-ID: <m2ziusk3tr.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#22757: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add argument
 WINDOW-OR-BUFFER
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

Sorry, the last email had an automatically generated subject line that I use in my personal setup.  Here is a fixed subject line.

I agree that `get-char-property` is the key ingredient, and it would be prudent to steer users to that function.  It does, however, require an advanced level of Lisp expertise to understand how to use it to achieve certain goals.  I probably wouldn't have been able to figure out (in a reasonable period of time) how to get foreground/background at point without standing on the shoulders of others -- e.g., `foreground-color-at-point` and `background-color-at-point`.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Mon, 22 Feb 2016 17:58:13 +0200,
Eli Zaretskii wrote:
> 
>  
> Sorry, I don't think I follow.  I asked whether calling
> get-char-property directly, instead of going through face-at-point,
> would have done the job you needed to do.  I still think it would
> have, even after reading your response.
> 
> My point is that I see no particular reason why users should try using
> face-at-point in this situation.  That function is not documented in
> the ELisp manual, whereas get-char-property is.  So I'm not sure why
> we should consider adding an argument to face-at-point to support use
> cases that seem to be already supported by get-char-property.  Can you
> clarify this aspect?
> 
> Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 22 Feb 2016 18:15:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 22 13:15:36 2016
Received: from localhost ([127.0.0.1]:38390 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXv1E-0000qL-DR
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 13:15:36 -0500
Received: from cobb.liquidweb.com ([50.28.13.150]:40315)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <esq@HIDDEN>) id 1aXv1C-0000q7-Pr
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 13:15:35 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date;
 bh=rhInSf0kqg70lQ/IIlQ6R8dVy+BM411w6D6FFBzEv6s=; 
 b=lWNLracxnU1nh6RYzNxGHw2oRop9hPghvZiSlL3X4hCXvbU99rP7guYwnvYGhgYdrZQXQPKoDy8Q84iVdvNlajKSG7PEk1WlSyJ6WftSMxY9gVwVe360nsHhb5guYxHw;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49793
 helo=server.private.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1aXv14-0004G5-KX; Mon, 22 Feb 2016 13:15:26 -0500
Date: Mon, 22 Feb 2016 10:15:27 -0800
Message-ID: <m21t84ligw.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Reply to correspondence dated February 22, 2016.
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

I agree that `get-char-property` is the key ingredient, and it would be prudent to steer users to that function.  It does, however, require an advanced level of Lisp expertise to understand how to use it to achieve certain goals.  I probably wouldn't have been able to figure out (in a reasonable period of time) how to get foreground/background at point without standing on the shoulders of others -- e.g., `foreground-color-at-point` and `background-color-at-point`.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Mon, 22 Feb 2016 17:58:13 +0200,
Eli Zaretskii wrote:
> 
>  
> Sorry, I don't think I follow.  I asked whether calling
> get-char-property directly, instead of going through face-at-point,
> would have done the job you needed to do.  I still think it would
> have, even after reading your response.
> 
> My point is that I see no particular reason why users should try using
> face-at-point in this situation.  That function is not documented in
> the ELisp manual, whereas get-char-property is.  So I'm not sure why
> we should consider adding an argument to face-at-point to support use
> cases that seem to be already supported by get-char-property.  Can you
> clarify this aspect?
> 
> Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 22 Feb 2016 15:58:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Feb 22 10:58:34 2016
Received: from localhost ([127.0.0.1]:38226 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXssc-0005kQ-ID
	for submit <at> debbugs.gnu.org; Mon, 22 Feb 2016 10:58:34 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49089)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <eliz@HIDDEN>) id 1aXssa-0005kE-Ec
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 10:58:33 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aXssR-0000ly-9Q
 for 22757 <at> debbugs.gnu.org; Mon, 22 Feb 2016 10:58:27 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:38405)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aXssR-0000lo-4e; Mon, 22 Feb 2016 10:58:23 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:1182
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1aXssP-0006Ox-KQ; Mon, 22 Feb 2016 10:58:22 -0500
Date: Mon, 22 Feb 2016 17:58:13 +0200
Message-Id: <831t84n3e2.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Keith David Bershatsky <esq@HIDDEN>
In-reply-to: <m2d1rp92rq.wl%esq@HIDDEN> (message from Keith David
 Bershatsky on Sun, 21 Feb 2016 13:23:05 -0800)
Subject: Re: bug#22757: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add
 argument	WINDOW-OR-BUFFER
References: <m2d1rp92rq.wl%esq@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Date:  Sun, 21 Feb 2016 13:23:05 -0800
> From:  Keith David Bershatsky <esq@HIDDEN>
> Cc:  22757 <at> debbugs.gnu.org
> 
> I spent a few hours trying to figure out how to obtain face properties at various points (with no active region) when active region was covering up those areas in another window displaying the same buffer in a different frame (hidden visually behind other frames).  It was even more complicated to track down because the default value of `highlight-nonselected-windows` is `nil` and I couldn't visually see what was happening.  I eventually discovered that third argument to `get-char-property` and my dilemma was resolved.  :)
> 
> Another helpful feature would be an optional argument for POINT so that a user does not need to goto that point in order to obtain the face(s).
> 
> Feature request #22757 *may potentially* save other people hours of debugging; and, I believe adding POINT and WINDOW-OR-BUFFER as optional arguments could be very useful by making the current functions more powerful/versatile.

Sorry, I don't think I follow.  I asked whether calling
get-char-property directly, instead of going through face-at-point,
would have done the job you needed to do.  I still think it would
have, even after reading your response.

My point is that I see no particular reason why users should try using
face-at-point in this situation.  That function is not documented in
the ELisp manual, whereas get-char-property is.  So I'm not sure why
we should consider adding an argument to face-at-point to support use
cases that seem to be already supported by get-char-property.  Can you
clarify this aspect?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 21 Feb 2016 21:23:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 21 16:23:33 2016
Received: from localhost ([127.0.0.1]:36614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXbTZ-00069k-OS
	for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 16:23:33 -0500
Received: from cobb.liquidweb.com ([50.28.13.150]:45585)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <esq@HIDDEN>) id 1aXbTY-00069Y-UK
 for 22757 <at> debbugs.gnu.org; Sun, 21 Feb 2016 16:23:33 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date;
 bh=hbW02c5m1veYbsc6GoAVv3PzbTfxUbGjVucSCEn1LQM=; 
 b=wpHg1BShzmz2m71PySkHfdK5yu+h7HvQhc3baCXFEM7E4vm5JIhJ67myI0vXK9oFhpX26Ek98iSGPWBQ/UNeBeEEsm3YJpyS59leYGx0RXs3HgBLaH04/gkx91fHXSUz;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51189
 helo=server.private.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1aXbTQ-0007TA-1l; Sun, 21 Feb 2016 16:23:24 -0500
Date: Sun, 21 Feb 2016 13:23:26 -0800
Message-ID: <m2bn7992r5.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#22757: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add
 argument	WINDOW-OR-BUFFER
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

I spent a few hours trying to figure out how to obtain face properties at various points (with no active region) when active region was covering up those areas in another window displaying the same buffer in a different frame (hidden visually behind other frames).  It was even more complicated to track down because the default value of `highlight-nonselected-windows` is `nil` and I couldn't visually see what was happening.  I eventually discovered that third argument to `get-char-property` and my dilemma was resolved.  :)

Another helpful feature would be an optional argument for POINT so that a user does not need to goto that point in order to obtain the face(s).

Feature request #22757 *may potentially* save other people hours of debugging; and, I believe adding POINT and WINDOW-OR-BUFFER as optional arguments could be very useful by making the current functions more powerful/versatile.

BACKGROUND:  I am working on converting to C (from Lisp) a custom `color-vector-calc` function that returns the three digit color code at a given point in a window.  Now that I discovered the third argument to `get-char-property`, I have a working function in Lisp.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Sun, 21 Feb 2016 22:54:07 +0200,
Eli Zaretskii wrote:
> 
> * * *
> 
> Why can't you call get-char-property directly?  face-at-point is
> nothing more than a thin wrapper around get-char-property, and most of
> the wrapper code is about stuff you don't care about AFAIU from your
> description.
> 
> Is there something I'm missing?
> 
> Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 21 Feb 2016 21:23:15 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 21 16:23:15 2016
Received: from localhost ([127.0.0.1]:36611 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXbTH-00069F-Go
	for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 16:23:15 -0500
Received: from cobb.liquidweb.com ([50.28.13.150]:45579)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <esq@HIDDEN>) id 1aXbTF-000693-TS
 for 22757 <at> debbugs.gnu.org; Sun, 21 Feb 2016 16:23:14 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:Cc:To:From:Message-ID:Date;
 bh=hbW02c5m1veYbsc6GoAVv3PzbTfxUbGjVucSCEn1LQM=; 
 b=KwrLITNFqWCfUBkgka279WCT0KJJ6OU344TCJFY4BkRStqt3q32WCb95iSbH8/kkD4PprjKuTmcp+SHRCQhcFGI0hfXRI9QisEcW453A2WVvvp3+QIC8mjcFpXwSOD2X;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:51186
 helo=server.private.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>)
 id 1aXbT5-0007SL-06; Sun, 21 Feb 2016 16:23:03 -0500
Date: Sun, 21 Feb 2016 13:23:05 -0800
Message-ID: <m2d1rp92rq.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#22757: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add
 argument	WINDOW-OR-BUFFER
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - debbugs.gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

I spent a few hours trying to figure out how to obtain face properties at various points (with no active region) when active region was covering up those areas in another window displaying the same buffer in a different frame (hidden visually behind other frames).  It was even more complicated to track down because the default value of `highlight-nonselected-windows` is `nil` and I couldn't visually see what was happening.  I eventually discovered that third argument to `get-char-property` and my dilemma was resolved.  :)

Another helpful feature would be an optional argument for POINT so that a user does not need to goto that point in order to obtain the face(s).

Feature request #22757 *may potentially* save other people hours of debugging; and, I believe adding POINT and WINDOW-OR-BUFFER as optional arguments could be very useful by making the current functions more powerful/versatile.

BACKGROUND:  I am working on converting to C (from Lisp) a custom `color-vector-calc` function that returns the three digit color code at a given point in a window.  Now that I discovered the third argument to `get-char-property`, I have a working function in Lisp.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

At Sun, 21 Feb 2016 22:54:07 +0200,
Eli Zaretskii wrote:
> 
> * * *
> 
> Why can't you call get-char-property directly?  face-at-point is
> nothing more than a thin wrapper around get-char-property, and most of
> the wrapper code is about stuff you don't care about AFAIU from your
> description.
> 
> Is there something I'm missing?
> 
> Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at 22757 <at> debbugs.gnu.org:


Received: (at 22757) by debbugs.gnu.org; 21 Feb 2016 20:54:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 21 15:54:30 2016
Received: from localhost ([127.0.0.1]:36595 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXb1S-0005TA-79
	for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 15:54:30 -0500
Received: from eggs.gnu.org ([208.118.235.92]:49426)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <eliz@HIDDEN>) id 1aXb1R-0005St-3W
 for 22757 <at> debbugs.gnu.org; Sun, 21 Feb 2016 15:54:29 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <eliz@HIDDEN>) id 1aXb1I-0007Kf-QN
 for 22757 <at> debbugs.gnu.org; Sun, 21 Feb 2016 15:54:24 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD
 autolearn=disabled version=3.3.2
Received: from fencepost.gnu.org ([2001:4830:134:3::e]:41926)
 by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <eliz@HIDDEN>)
 id 1aXb1I-0007Kb-N7; Sun, 21 Feb 2016 15:54:20 -0500
Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:4366
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128)
 (Exim 4.82) (envelope-from <eliz@HIDDEN>)
 id 1aXb1F-0006Gd-V5; Sun, 21 Feb 2016 15:54:19 -0500
Date: Sun, 21 Feb 2016 22:54:07 +0200
Message-Id: <83a8mtn5sg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Keith David Bershatsky <esq@HIDDEN>
In-reply-to: <m2egc67xci.wl%esq@HIDDEN> (message from Keith David
 Bershatsky on Sun, 21 Feb 2016 10:05:33 -0800)
Subject: Re: bug#22757: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add argument
 WINDOW-OR-BUFFER
References: <m2egc67xci.wl%esq@HIDDEN>
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From: 2001:4830:134:3::e
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 22757
Cc: 22757 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: Eli Zaretskii <eliz@HIDDEN>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

> Date: Sun, 21 Feb 2016 10:05:33 -0800
> From: Keith David Bershatsky <esq@HIDDEN>
> 
> As a feature request, please consider adding an additional argument to `face-at-point` and `faces--attribute-at-point` to support WINDOW-OR-BUFFER with `get-char-property`; and, add that to the sections of code in said functions containing `get-char-property`.  The doc-strings would need to be updated to explain the difference.  The default would be BUFFER.
> 
> It is sometimes useful to be able to obtain a face of an overlay that is associated with a particular window -- e.g., an active region that may be different in each window.  The current functions do not have the ability to test for that occurrence because the third argument of `get-char-property` is always `nil`.

Why can't you call get-char-property directly?  face-at-point is
nothing more than a thin wrapper around get-char-property, and most of
the wrapper code is about stuff you don't care about AFAIU from your
description.

Is there something I'm missing?

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Feb 2016 18:05:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Feb 21 13:05:49 2016
Received: from localhost ([127.0.0.1]:36549 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1aXYOD-0001XZ-7j
	for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 13:05:49 -0500
Received: from eggs.gnu.org ([208.118.235.92]:43234)
 by debbugs.gnu.org with esmtp (Exim 4.84)
 (envelope-from <esq@HIDDEN>) id 1aXYOB-0001XM-Vd
 for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 13:05:48 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1aXYO5-0004JF-GG
 for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 13:05:42 -0500
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,T_DKIM_INVALID
 autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:48751)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1aXYO5-0004JA-5O
 for submit <at> debbugs.gnu.org; Sun, 21 Feb 2016 13:05:41 -0500
Received: from eggs.gnu.org ([2001:4830:134:3::10]:34199)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1aXYO3-0003SH-Qe
 for bug-gnu-emacs@HIDDEN; Sun, 21 Feb 2016 13:05:41 -0500
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1aXYO0-0004IZ-Ii
 for bug-gnu-emacs@HIDDEN; Sun, 21 Feb 2016 13:05:39 -0500
Received: from cobb.liquidweb.com ([50.28.13.150]:34310)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <esq@HIDDEN>) id 1aXYO0-0004IU-4b
 for bug-gnu-emacs@HIDDEN; Sun, 21 Feb 2016 13:05:36 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lawlist.com;
 s=default; 
 h=Content-Type:MIME-Version:Subject:To:From:Message-ID:Date;
 bh=OVUmdlx6F5Ql3Pj3nKWKU31Bro1XlL4PshDAIU0srl8=; 
 b=GxVQIGwmlKAPTkQon9muWyIHNHjk8yNbqbj2GMJTxhahS+HX5LmcTG26baohWALATVJEPomtA/AuPIU4333Dq3nvBn6gy0ubG0Jd2qvODhQ8gIQroAkdZbKPehFA03wZ;
Received: from cpe-45-48-239-195.socal.res.rr.com ([45.48.239.195]:49689
 helo=server.private.localhost)
 by cobb.liquidweb.com with esmtp (Exim 4.82)
 (envelope-from <esq@HIDDEN>) id 1aXYNw-0002Sc-8A
 for bug-gnu-emacs@HIDDEN; Sun, 21 Feb 2016 13:05:32 -0500
Date: Sun, 21 Feb 2016 10:05:33 -0800
Message-ID: <m2egc67xci.wl%esq@HIDDEN>
From: Keith David Bershatsky <esq@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 25.1.50;
 `face-at-point` and `faces--attribute-at-point` -- add argument
 WINDOW-OR-BUFFER
MIME-Version: 1.0 (generated by   - "")
Content-Type: text/plain; charset=US-ASCII
X-AntiAbuse: This header was added to track abuse,
 please include it with any abuse report
X-AntiAbuse: Primary Hostname - cobb.liquidweb.com
X-AntiAbuse: Original Domain - gnu.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - lawlist.com
X-Get-Message-Sender-Via: cobb.liquidweb.com: acl_c_relayhosts_text_entry:
 lawlist|lawlist.com
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

As a feature request, please consider adding an additional argument to `face-at-point` and `faces--attribute-at-point` to support WINDOW-OR-BUFFER with `get-char-property`; and, add that to the sections of code in said functions containing `get-char-property`.  The doc-strings would need to be updated to explain the difference.  The default would be BUFFER.

It is sometimes useful to be able to obtain a face of an overlay that is associated with a particular window -- e.g., an active region that may be different in each window.  The current functions do not have the ability to test for that occurrence because the third argument of `get-char-property` is always `nil`.

Thanks,

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

In GNU Emacs 25.1.50.4 (x86_64-apple-darwin10.8.0, NS appkit-1038.36 Version 10.6.8 (Build 10K549))
 of 2016-02-21 built on server.private
Repository revision: 5a0472e8ea9128f75bca04f5f65682ae8280c208
Windowing system distributor 'Apple', version 10.3.1038
Configured using:
 'configure --with-ns --without-imagemagick --enable-checking=glyphs
 CPPFLAGS=-I/Users/HOME/.0.data/.0.emacs/macports/include
 LDFLAGS=-L/Users/HOME/.0.data/.0.emacs/macports/lib'

Configured features:
JPEG RSVG DBUS NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US
  locale-coding-system: utf-8-unix

Major mode: ELISP

Minor modes in effect:
  ys-mode: t
  tabbar-mode: t
  sb-mode: t
  ml-mode: t
  ds-mode: t
  sd-mode: t
  fl-mode: t
  +-mode: t
  buffer-read-only: t

Recent messages:

Load-path shadows:
None found.

Features:
(shadow emacsbug message mml mml-sec epa epg mm-decode mm-bodies
mm-encode gmm-utils mailheader sendmail lawlist-ztree lawlist-ys
lawlist-ws lawlist-wl elmo-imap4 elmo-localdir modb-standard
modb-legacy elmo-internal elmo-flag mmelmo-imap mmelmo-buffer
elsp-generic mel-u epg-config lawlist-w3m doc-view jka-compr
image-mode ccl lawlist-vl lawlist-view lawlist-undo lawlist-txt
lawlist-tm lawlist-tex compare-w diff-mode lawlist-tabbar
lawlist-speedbar lawlist-shell info esh-groups ehelp ange-ftp
lawlist-sgml lawlist-sb lawlist-ruler lawlist-replace
lawlist-rectangle lawlist-re-builder lawlist-python skeleton
lawlist-profiler lawlist-print lawlist-php lawlist-perl lawlist-parens
lawlist-org lawlist-calendar org-agenda org org-macro org-footnote
org-pcomplete org-list org-faces org-entities org-version
ob-emacs-lisp ob ob-tangle ob-ref ob-lob ob-table ob-exp org-src
ob-keys ob-comint ob-core ob-eval org-compat org-macs org-loaddefs
find-func holidays hol-loaddefs cal-menu calendar cal-loaddefs
lawlist-neotree lawlist-movement lawlist-mouse lawlist-ml lawlist-misc
lawlist-messages lawlist-mc lawlist-markdown noutline outline
lawlist-lorem lawlist-linum lawlist-keymap lawlist-js json map
thingatpt cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles
cc-align cc-engine cc-vars cc-defs lawlist-ispell lawlist-isearch
lawlist-info lawlist-imenu lawlist-ibuffer lawlist-hl lawlist-grep
lawlist-git pcvs-util ido seq server conf-mode lawlist-framebufs
lawlist-frame lawlist-fm lawlist-env lawlist-elscreen lawlist-elisp
lawlist-dv lawlist-image lawlist-files zeroconf dbus xml lawlist-ds
lawlist-dired dired dired-loaddefs format-spec lawlist-diff
lawlist-desktop frameset lawlist-saveplace lawlist-debug
lawlist-window debug lawlist-css smie lawlist-compile rx lawlist-color
lawlist-cm lawlist-cc-mode lawlist-cc-awk lawlist-font-lock cl-macs
lawlist-cc-fonts lawlist-cc-guess lawlist-cc-menus lawlist-cc-align
lawlist-cc-cmds lawlist-cc-styles lawlist-cc-engine lawlist-cc-langs
lawlist-cc-vars lawlist-cc-defs lawlist-cc-bytecomp lawlist-calc
lawlist-calc+ lawlist-bk lawlist-bc lawlist-bbdb gnus nnheader subr-x
wid-edit mail-parse rfc2231 mailabbrev mail-extr rfc822 timezone
lawlist-minibuffer gv lawlist-auth gnus-util rmail rmail-loaddefs
rfc2047 rfc2045 ietf-drums mail-utils mm-util mail-prsvr
password-cache lawlist-as lawlist-archive lawlist-apropos lawlist-+
lawlist-lcl byte-opt bytecomp byte-compile cl-extra cconv lawlist-help
disp-table easy-mmode edmacro kmacro quail help-mode easymenu
cl-loaddefs cl-lib pcase derived advice shell pcomplete comint
ansi-color ring savehist time-date mule-util tooltip eldoc electric
uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win
ucs-normalize term/common-win tool-bar dnd fontset image regexp-opt
fringe tabulated-list newcomment elisp-mode lisp-mode prog-mode
register page menu-bar rfn-eshadow timer select scroll-bar mouse
jit-lock font-lock syntax facemenu font-core term/tty-colors frame
cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian
slovak czech european ethiopic indian cyrillic chinese charscript
case-table epa-hook jka-cmpr-hook help simple abbrev obarray
minibuffer cl-preloaded nadvice loaddefs button faces cus-face
macroexp files text-properties overlay sha1 md5 base64 format env
code-pages mule custom widget hashtable-print-readable backquote
dbusbind kqueue cocoa ns multi-tty make-network-process emacs)

Memory information:
nil




Acknowledgement sent to Keith David Bershatsky <esq@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#22757; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.