On 2014-05-10 16:14 John Hendy wrote: > On May 9, 2014 11:21 PM, "Nick Dokos" <ndo...@gmail.com> wrote: >> >> John Hendy <jw.he...@gmail.com> writes: >> >> > Hello, >> > >> > >> > Just curious of there's a way to set the tags in a region all at once? >> >> (org-map-entries (function org-set-tags) nil 'region) >> >> or >> >> (org-map-entries (lambda () (org-set-tags-to '(foo))) nil 'region) >> >> or some variation thereof. >> > > I did see that function, but it didn't DUI what I expected with M-x. Would > u need to run it as above or could I use M-x with it somehow? > > A above I take it I'd put that in the buffer and then eval-region?
If you want to call this interactively, i.e. via M-x or a key-binding, you will have to wrap this code in a defun with an interactive from and thus turn it into a command. Like this: #+BEGIN_SRC emacs-lisp (defun my-set-tag-in-region () (interactive) (org-map-entries (function org-set-tags) nil 'region)) #+END_SRC HTH, -- Alexander Baier