Avoid refining of entries into themselves.
Reported by Samuel Wales.
This commit is contained in:
parent
67a50839e9
commit
e967f71794
|
@ -1,5 +1,8 @@
|
|||
2008-12-16 Carsten Dominik <carsten.dominik@gmail.com>
|
||||
|
||||
* org.el (org-refile): Avoid refiling to within the region to be
|
||||
refiled.
|
||||
|
||||
* org-export-latex.el (org-export-latex-special-chars): Replace
|
||||
special characters also in tables.
|
||||
|
||||
|
|
|
@ -7598,6 +7598,15 @@ operation has put the subtree."
|
|||
(setq file (nth 1 it)
|
||||
re (nth 2 it)
|
||||
pos (nth 3 it))
|
||||
(if (and (equal (buffer-file-name) file)
|
||||
(if regionp
|
||||
(and (>= pos region-start)
|
||||
(<= pos region-end))
|
||||
(and (>= pos (point))
|
||||
(< pos (save-excursion
|
||||
(org-end-of-subtree t t))))))
|
||||
(error "Cannot refile to position inside the tree or region"))
|
||||
|
||||
(setq nbuf (or (find-buffer-visiting file)
|
||||
(find-file-noselect file)))
|
||||
(if goto
|
||||
|
|
Loading…
Reference in New Issue