Function: org-mobile-bodies-same-p

org-mobile-bodies-same-p is a byte-compiled function defined in org-mobile.el.gz.

Signature

(org-mobile-bodies-same-p A B)

Documentation

Compare if A and B are visually equal strings.

We first remove leading and trailing white space from the entire strings. Then we split the strings into lines and remove leading/trailing whitespace from each line. Then we compare. A and B must be strings or nil.

Source Code

;; Defined in /usr/src/emacs/lisp/org/org-mobile.el.gz
(defun org-mobile-bodies-same-p (a b)
  "Compare if A and B are visually equal strings.
We first remove leading and trailing white space from the entire strings.
Then we split the strings into lines and remove leading/trailing whitespace
from each line.  Then we compare.
A and B must be strings or nil."
  (cond
   ((and (not a) (not b)) t)
   ((or (not a) (not b)) nil)
   (t (setq a (org-trim a) b (org-trim b))
      (setq a (mapconcat 'identity (org-split-string a "[ \t]*\n[ \t]*") "\n"))
      (setq b (mapconcat 'identity (org-split-string b "[ \t]*\n[ \t]*") "\n"))
      (equal a b))))