[Top][All Lists]

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

Re: [O] [PATCH] Make org-[beginning|end]-of-line respect visual-line-mod

From: Nicolas Goaziou
Subject: Re: [O] [PATCH] Make org-[beginning|end]-of-line respect visual-line-mode
Date: Tue, 06 Nov 2012 20:41:08 +0100

Toby Cubitt <address@hidden> 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.


reply via email to

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