all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16497@debbugs.gnu.org
Subject: bug#16497: 24.3.50; `move-to-column' ignores invisible text at the beginning of the line,	which create problems when using string-rectangle
Date: Mon, 20 Jan 2014 17:25:20 +0100	[thread overview]
Message-ID: <87k3dulixb.fsf@bzg.ath.cx> (raw)
In-Reply-To: <83eh42iry6.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 20 Jan 2014 17:38:41 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

> move-to-column is a screen-moving command, and it has been skipping
> invisible text for the past 18 years.  It also accounts for various
> other display-only features and artifacts.  (It is a pity that this is
> not documented; I think it's a documentation bug.)
>
> So now I'm wondering why you thought you should be using this
> function, if what you need is (AFAIU) to get to the Nth character
> starting from the beginning of a line.

I don't think I should be using this command: I just used
`string-rectangle' which uses it (see my original report.)

> E.g., move-to-column also
> accounts for double-width characters (it counts them as 2 columns),
> and also for how composed characters are displayed (it could count N
> composed characters as M ~= N columns).  It also accounts for
> characters displayed via display tables.  Are you sure you want all
> this in the job you need to do with the rectangle?
>
> Or maybe you just want line-move-to-column.

Interestingly, the docstring of `line-move-to-column' is this:

  Try to find column COL, considering invisibility.
  This function works only in certain cases,
  because what we really need is for `move-to-column'
  and `current-column' to be able to ignore invisible text.

suggesting to improve `move-to-column' and `current-column'
by allowing them to handle invisible text.

-- 
 Bastien





  reply	other threads:[~2014-01-20 16:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-19 16:26 bug#16497: 24.3.50; `move-to-column' ignores invisible text at the beginning of the line, which create problems when using string-rectangle Bastien Guerry
2014-01-19 17:11 ` Eli Zaretskii
2014-01-20  9:22   ` Bastien
2014-01-20 15:38     ` Eli Zaretskii
2014-01-20 16:25       ` Bastien [this message]
     [not found]     ` <<83eh42iry6.fsf@gnu.org>
2014-01-20 18:10       ` Drew Adams
2014-01-19 20:48 ` Stefan Monnier
2014-01-20  9:11   ` Bastien
2014-01-20 15:41     ` Eli Zaretskii
2014-01-20 16:50       ` Bastien
2014-01-20 18:14         ` Stefan Monnier
2014-01-20 18:22           ` Bastien
2014-01-20 19:10             ` Stefan Monnier
2014-01-20 20:55               ` Bastien
2014-01-20 19:19           ` Eli Zaretskii
     [not found] <<87ob38gcp1.fsf@bzg.ath.cx>

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

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

  git send-email \
    --in-reply-to=87k3dulixb.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=16497@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.