I just noticed that org-backward-paragraph raises a user error if you call
it at the beginning of the buffer. This is not what the general
backward-paragraph command does, nor is it what I remember other Emacs
movement commands doing when the move can't actually be done.

I think consistency with other movement commands is reason enough to change
the behavior of org-backward-paragraph, but here's a potentially more
convincing reason: the function org-inside-LaTeX-fragment-p is supposed to
return nil if point is inside a LaTeX fragment (and a truthy value
otherwise). But since org-inside-LaTeX-fragment-p uses
org-backward-paragraph internally, what actually happens is that it works
as described *unless* you are at the beginning of the buffer in which case
it doesn't return any value at all but instead signals a user-error!

I've worked around this in my own code by changing
(org-inside-LaTeX-fragment-p) to (unless (bobp)
(org-inside-LaTeX-fragment-p)), but it feels like org-backward-paragraph
should be changed instead.

-- 
Omar Antolín Camarena

Reply via email to