bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#2993: marked as done (23.0.92; posn-col-row wrong with line-spacing


From: Emacs bug Tracking System
Subject: bug#2993: marked as done (23.0.92; posn-col-row wrong with line-spacing in terminals)
Date: Wed, 15 Apr 2009 22:50:03 +0000

Your message dated Wed, 15 Apr 2009 18:46:02 -0400
with message-id <87ab6hbknp.fsf@cyd.mit.edu>
and subject line Re: 23.0.92; posn-col-row wrong with line-spacing in terminals
has caused the Emacs bug report #2993,
regarding 23.0.92; posn-col-row wrong with line-spacing in terminals
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@emacsbugs.donarmstrong.com
immediately.)


-- 
2993: http://emacsbugs.donarmstrong.com/cgi-bin/bugreport.cgi?bug=2993
Emacs Bug Tracking System
Contact owner@emacsbugs.donarmstrong.com with problems
--- Begin Message --- Subject: 23.0.92; posn-col-row wrong with line-spacing in terminals Date: Tue, 14 Apr 2009 13:11:55 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (darwin)
posn-col-row uses the `line-spacing' value in terminals.  According to the
doc `line-spacing' only has an effect in window systems.

Steps to reproduce:

- (setq-default line-spacing 3)
- emacsclient -t
- Move to a non-trivial pos.
- M-: (posn-col-row (posn-at-point))

Something like this would help:

--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -934,7 +934,8 @@ and `event-end' functions."
             (y (/ (cdr pair) (+ (frame-char-height frame)
                                 (or (frame-parameter frame 'line-spacing)
                                      ;; FIXME: Why the `default'?
-                                    (default-value 'line-spacing)
+                                    (when (window-system frame)
+                                      (default-value 'line-spacing))
                                     0)))))
        (cons x y))))))



--- End Message ---
--- Begin Message --- Subject: Re: 23.0.92; posn-col-row wrong with line-spacing in terminals Date: Wed, 15 Apr 2009 18:46:02 -0400
> posn-col-row uses the `line-spacing' value in terminals.  According to
> the doc `line-spacing' only has an effect in window systems.

Actually, there were several additional bugs in the code.  The function
should have used the line-spacing variable in the buffer itself, not its
default value, and also the line-spacing variable should take precedence
over the line-spacing frame parameter.  Also, it failed to account for
floating-point line-spacing values.

I've committed a fix.  Thanks.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]