From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Keith David Bershatsky Newsgroups: gmane.emacs.bugs Subject: bug#22757: 25.1.50; `face-at-point` and `faces--attribute-at-point` -- add argument WINDOW-OR-BUFFER Date: Sun, 21 Feb 2016 13:23:26 -0800 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 (generated by - "") Content-Type: text/plain; charset=US-ASCII X-Trace: ger.gmane.org 1456089866 6146 80.91.229.3 (21 Feb 2016 21:24:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 21:24:26 +0000 (UTC) Cc: 22757@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Feb 21 22:24:15 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aXbUC-0007Xf-PH for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Feb 2016 22:24:12 +0100 Original-Received: from localhost ([::1]:44246 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXbUC-0003xT-4K for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Feb 2016 16:24:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46980) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXbU6-0003wW-EG for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 16:24:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aXbU2-0005yc-Lh for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 16:24:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39488) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXbU2-0005yY-IH for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 16:24:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aXbU2-0006AX-FV for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 16:24:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Keith David Bershatsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 21 Feb 2016 21:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22757 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 22757-submit@debbugs.gnu.org id=B22757.145608981423672 (code B ref 22757); Sun, 21 Feb 2016 21:24:02 +0000 Original-Received: (at 22757) by debbugs.gnu.org; 21 Feb 2016 21:23:34 +0000 Original-Received: from localhost ([127.0.0.1]:36614 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXbTZ-00069k-OS for submit@debbugs.gnu.org; Sun, 21 Feb 2016 16:23:33 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:45585) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXbTY-00069Y-UK for 22757@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; Original-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 ) id 1aXbTQ-0007TA-1l; Sun, 21 Feb 2016 16:23:24 -0500 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:113425 Archived-At: 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.