From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#10129: 24.0.91; [PATCH] `C-u C-x =' should show position info Date: Thu, 24 Nov 2011 10:50:36 -0800 Message-ID: <22A8A640F96C48BB9443544BA5128BF8@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0090_01CCAA96.E6A26340" X-Trace: dough.gmane.org 1322160699 1599 80.91.229.12 (24 Nov 2011 18:51:39 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 24 Nov 2011 18:51:39 +0000 (UTC) To: 10129@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 24 19:51:35 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RTeOU-0007hW-Ri for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Nov 2011 19:51:35 +0100 Original-Received: from localhost ([::1]:44846 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeOU-00016K-DT for geb-bug-gnu-emacs@m.gmane.org; Thu, 24 Nov 2011 13:51:34 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35631) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeOQ-00010N-IK for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:51:31 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTeOP-0002CP-Ii for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:51:30 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeOP-0002CL-HJ for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:51:29 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RTePt-0005QY-KM for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:53:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 24 Nov 2011 18:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10129 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.132216073920802 (code B ref -1); Thu, 24 Nov 2011 18:53:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 24 Nov 2011 18:52:19 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTePD-0005PT-Jg for submit@debbugs.gnu.org; Thu, 24 Nov 2011 13:52:19 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RTePC-0005PN-8k for submit@debbugs.gnu.org; Thu, 24 Nov 2011 13:52:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTeNh-00029U-25 for submit@debbugs.gnu.org; Thu, 24 Nov 2011 13:50:45 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:50888) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeNh-00029Q-0Z for submit@debbugs.gnu.org; Thu, 24 Nov 2011 13:50:45 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:35529) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeNg-0000kH-5q for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:50:44 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RTeNe-000292-Vd for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:50:44 -0500 Original-Received: from rcsinet15.oracle.com ([148.87.113.117]:61016) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RTeNe-00028r-MR for bug-gnu-emacs@gnu.org; Thu, 24 Nov 2011 13:50:42 -0500 Original-Received: from acsinet22.oracle.com (acsinet22.oracle.com [141.146.126.238]) by rcsinet15.oracle.com (Switch-3.4.4/Switch-3.4.4) with ESMTP id pAOIoeAV022698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 Nov 2011 18:50:41 GMT Original-Received: from acsmt356.oracle.com (acsmt356.oracle.com [141.146.40.156]) by acsinet22.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id pAOIoeAN015057 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 24 Nov 2011 18:50:40 GMT Original-Received: from abhmt101.oracle.com (abhmt101.oracle.com [141.146.116.53]) by acsmt356.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id pAOIoYBx003481 for ; Thu, 24 Nov 2011 12:50:34 -0600 Original-Received: from dradamslap1 (/10.159.44.13) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 24 Nov 2011 10:50:34 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: Acyq2fQ7e9yGP52bT66oBo7bQOk2zg== X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-Auth-Type: Internal IP X-CT-RefId: str=0001.0A090206.4ECE9201.011A,ss=1,re=0.594,fgs=0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 24 Nov 2011 13:53:01 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.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:54268 Archived-At: This is a multi-part message in MIME format. ------=_NextPart_000_0090_01CCAA96.E6A26340 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit `C-x =' shows information about the current position, including its relation to the buffer size, its column, the region limits, and horizontal scroll amount. That position info is missing from the *Help* display for `C-u C-x ='. It is only shown in the message, which is ephemeral and can easily be overwritten. The attached patch remedies this by including the position information in *Help*. The patch also updates the doc string accordingly (and corrects improper grammar such as "Is POS is taken..."). In GNU Emacs 24.0.91.1 (i386-mingw-nt5.1.2600) of 2011-11-21 on MARVIN Windowing system distributor `Microsoft Corp.', version 5.1.2600 configured using `configure --with-gcc (4.6) --no-opt --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-2.10.1/include --ldflags -LD:/devel/emacs/libs/gnutls-2.10.1/lib' ------=_NextPart_000_0090_01CCAA96.E6A26340 Content-Type: application/octet-stream; name="descr-text-2011-11-24a.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="descr-text-2011-11-24a.patch" diff -c -w descr-text-patched.el descr-text.el=0A= *** descr-text-patched.el Thu Nov 24 10:42:16 2011=0A= --- descr-text.el Thu Nov 24 10:39:32 2011=0A= ***************=0A= *** 376,393 ****=0A= =0A= ;;;###autoload=0A= (defun describe-char (pos &optional buffer)=0A= ! "Describe position POS (interactively, point) and the char after POS.=0A= ! POS is taken to be in BUFFER, or the current buffer if BUFFER is nil.=0A= ! The information is displayed in buffer `*Help*'.=0A= ! =0A= ! The position information includes POS; the total size of BUFFER; the=0A= ! region limits, if narrowed; the column number; and the horizontal=0A= ! scroll amount, if horizontally scrolled.=0A= ! =0A= ! The character information includes the character code; charset and=0A= ! code points in it; syntax; category; how the character is encoded in a=0A= ! file; character composition information (if relevant); and relevant=0A= ! widgets, buttons, overlays, and text properties."=0A= (interactive "d")=0A= (unless (buffer-live-p buffer) (setq buffer (current-buffer)))=0A= (let ((src-buf (current-buffer)))=0A= --- 376,387 ----=0A= =0A= ;;;###autoload=0A= (defun describe-char (pos &optional buffer)=0A= ! "Describe the character after POS (interactively, the character = after point).=0A= ! Is POS is taken to be in buffer BUFFER or current buffer if nil.=0A= ! The information includes character code, charset and code points in it,=0A= ! syntax, category, how the character is encoded in a file,=0A= ! character composition information (if relevant),=0A= ! as well as widgets, buttons, overlays, and text properties."=0A= (interactive "d")=0A= (unless (buffer-live-p buffer) (setq buffer (current-buffer)))=0A= (let ((src-buf (current-buffer)))=0A= ***************=0A= *** 503,527 ****=0A= (setq composition nil)))=0A= =0A= (setq item-list=0A= ! `(("position"=0A= ! ,(let* ((beg (point-min))=0A= ! (end (point-max))=0A= ! (total (buffer-size))=0A= ! (percent (if (> total 50000) ; Avoid overflow = multiplying by 100=0A= ! (/ (+ (/ total 200) (1- pos)) = (max (/ total 100) 1))=0A= ! (/ (+ (/ total 2) (* 100 (1- pos))) = (max total 1))))=0A= ! (hscroll (if (=3D (window-hscroll) 0)=0A= ! ""=0A= ! (format ", Hscroll: %d" = (window-hscroll))))=0A= ! (col (current-column)))=0A= ! (if (or (/=3D beg 1) (/=3D end (1+ total)))=0A= ! (format "%d of %d (%d%%), column: %d%s, = region: %d-%d"=0A= ! pos total percent col hscroll beg = end)=0A= ! (if (=3D pos end)=0A= ! (format "%d of %d (EOB), column: %d%s" pos = total col hscroll)=0A= ! (format "%d of %d (%d%%), column: %d%s"=0A= ! pos total percent col hscroll)))))=0A= ! ("character"=0A= ,(format "%s (%d, #o%o, #x%x)"=0A= (apply 'propertize char-description=0A= (text-properties-at pos))=0A= --- 497,503 ----=0A= (setq composition nil)))=0A= =0A= (setq item-list=0A= ! `(("character"=0A= ,(format "%s (%d, #o%o, #x%x)"=0A= (apply 'propertize char-description=0A= (text-properties-at pos))=0A= =0A= Diff finished. Thu Nov 24 10:43:41 2011=0A= ------=_NextPart_000_0090_01CCAA96.E6A26340--