emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [PATCH] Make org-[beginning|end]-of-line respect visual-line-mode
Date: Tue, 06 Nov 2012 20:41:08 +0100	[thread overview]
Message-ID: <87bofa7c4r.fsf@gmail.com> (raw)
In-Reply-To: <20121106184629.GA8539@c3po> (Toby Cubitt's message of "Tue, 6 Nov 2012 19:46:29 +0100")

Toby Cubitt <tsc25@cantab.net> writes:

> I guess you want regression tests for `end-of-line' with
> `visual-line-mode' enabled? (There aren't any tests for beginning-of-line
> in test-org.el currently, and the fix to org-beginning-of-line won't
> actually change the behaviour, just make the code more correct.)

No, I meant tests for `org-beginning-of-line', since that's the function
you modified.

> I've made an attempt in the attached patch, which also fixes
> org-beginning-of-line as discussed.

Would you mind starting a test suite for that function?

> +   (org-test-with-temp-text
> +       "A long line of text\nSome other text"
> +     (progn (forward-char 2) (cl-dotimes (i 1000) (insert "very "))
> +	    (visual-line-mode 1) (goto-char (point-min)) (org-end-of-line)
> +	    (thing-at-point-looking-at "very"))))

`dotimes' is a function defined in subr.el. No need to call cl-dotimes.

Thanks for your work.


Regards,

      reply	other threads:[~2012-11-06 19:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-06 12:30 [PATCH] Make org-[beginning|end]-of-line respect visual-line-mode Toby Cubitt
2012-11-06 12:31 ` Nicolas Goaziou
2012-11-06 12:47   ` Toby Cubitt
2012-11-06 17:02     ` Nicolas Goaziou
2012-11-06 17:27       ` Toby Cubitt
2012-11-06 17:30         ` Nicolas Goaziou
2012-11-06 17:43           ` Toby Cubitt
2012-11-06 17:46             ` Nicolas Goaziou
2012-11-06 18:46               ` Toby Cubitt
2012-11-06 19:41                 ` Nicolas Goaziou [this message]

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87bofa7c4r.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).