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:05 -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 1456089867 6159 80.91.229.3 (21 Feb 2016 21:24:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Feb 2016 21:24:27 +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:16 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-0007Xd-DM for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Feb 2016 22:24:12 +0100 Original-Received: from localhost ([::1]:44244 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXbUB-0003x5-II for geb-bug-gnu-emacs@m.gmane.org; Sun, 21 Feb 2016 16:24:11 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXbU6-0003wV-Di 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-0005yS-7a for bug-gnu-emacs@gnu.org; Sun, 21 Feb 2016 16:24:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:39487) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aXbU2-0005yO-48 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-0006AQ-1I 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:01 +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.145608979523641 (code B ref 22757); Sun, 21 Feb 2016 21:24:01 +0000 Original-Received: (at 22757) by debbugs.gnu.org; 21 Feb 2016 21:23:15 +0000 Original-Received: from localhost ([127.0.0.1]:36611 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXbTH-00069F-Go for submit@debbugs.gnu.org; Sun, 21 Feb 2016 16:23:15 -0500 Original-Received: from cobb.liquidweb.com ([50.28.13.150]:45579) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aXbTF-000693-TS for 22757@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; Original-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 ) id 1aXbT5-0007SL-06; Sun, 21 Feb 2016 16:23:03 -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:113426 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.