unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: monnier@iro.umontreal.ca
Cc: holtzermann17@gmail.com, 17905-done@debbugs.gnu.org
Subject: bug#17905: 24.3.50; writing with a giant font triggers RTL text entry
Date: Fri, 04 Jul 2014 16:34:05 +0300	[thread overview]
Message-ID: <83fvih1c4y.fsf@gnu.org> (raw)
In-Reply-To: <83lhs91vco.fsf@gnu.org>

> Date: Fri, 04 Jul 2014 09:39:03 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: holtzermann17@gmail.com, 17905@debbugs.gnu.org
> 
> > From: Stefan Monnier <monnier@iro.umontreal.ca>
> > Cc: holtzermann17@gmail.com,  17905@debbugs.gnu.org
> > Date: Thu, 03 Jul 2014 15:49:29 -0400
> > 
> > > If it only shows up when point is in a partially visible line, then
> > > the bug is that Emacs lets point be displayed in such a line.
> > 
> > Probably (tho I don't know why this causes point to be changed).
> 
> The display engine is probably confused by what happened, so it does
> something utterly inappropriate.  There are situations where redisplay
> moves point, but this is not one of them.
> 
> > I confirm that point (and the corresponding cursor) is at the
> > leftmost position of the partially displayed screen line in that
> > case.
> 
> That's the immediate cause of the bug, I'm quite sure.  And it goes a
> long way back.

I think I fixed this in revision 117347 on the emacs-24 branch.

In general, I recommend to stay away of resizing the font of the
default face.  The display engine does a lot of pixel calculations
using the size of the frame's default font; when that is different
from the font of the default face, all kinds of features begin to
subtly break.  E.g., set scroll-margin to a non-zero value, then type
"C-x C-+" enough time to enlarge the font significantly, and you will
see that Emacs lets point enter the scroll margin (because it
internally computes the scroll margin in pixels using the frame's
default font).

If you want to use a larger font by default, it is much better to
start Emacs with the corresponding -fn switch, or customize the
frame's font in your ~/.emacs or X resources.  That will cause Emacs
to use that font as the frame's default font, and all these issues
won't pop up.

This bug was caused by something similar to the scroll-margin problem
when the default face uses a resized font.  It caused the code which
handles redisplay of window malfunction when point ended up being
displayed in a partially visible screen line at the end of the window.

There was a similar problem in scroll commands, which caused
inappropriate moving of point in the last line of the window; I fixed
that as well.





  reply	other threads:[~2014-07-04 13:34 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 22:30 bug#17905: 24.3.50; writing with a giant font triggers RTL text entry Joe Corneli
2014-07-03  2:51 ` Eli Zaretskii
2014-07-03 10:27   ` Joe Corneli
2014-07-03 13:51     ` Stefan Monnier
2014-07-03 15:05       ` Eli Zaretskii
2014-07-03 16:17         ` Stefan Monnier
2014-07-03 16:57           ` Eli Zaretskii
2014-07-03 17:08             ` Eli Zaretskii
2014-07-03 17:12             ` Joe Corneli
2014-07-03 19:49             ` Stefan Monnier
2014-07-04  6:39               ` Eli Zaretskii
2014-07-04 13:34                 ` Eli Zaretskii [this message]
2014-07-04 14:15                   ` Stefan Monnier
2014-07-04 14:32                     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83fvih1c4y.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=17905-done@debbugs.gnu.org \
    --cc=holtzermann17@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).