From mboxrd@z Thu Jan 1 00:00:00 1970 From: "H.M. Pham" Subject: Bug: org tags [9.0.7 (9.0.7-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20170515/)] Date: Sat, 20 May 2017 00:46:08 -0700 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a113c0e86c8f947054fefd4d5" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58132) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dBz5Y-0006MO-Ne for emacs-orgmode@gnu.org; Sat, 20 May 2017 03:46:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dBz5X-0007gL-JC for emacs-orgmode@gnu.org; Sat, 20 May 2017 03:46:12 -0400 Received: from mail-wr0-x22a.google.com ([2a00:1450:400c:c0c::22a]:35445) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dBz5X-0007g1-89 for emacs-orgmode@gnu.org; Sat, 20 May 2017 03:46:11 -0400 Received: by mail-wr0-x22a.google.com with SMTP id z52so26831425wrc.2 for ; Sat, 20 May 2017 00:46:10 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org --001a113c0e86c8f947054fefd4d5 Content-Type: text/plain; charset="UTF-8" I just downloaded org-plus-contrib and my customizde capture stopped working. The function org-set-tags-to is different than the org package. The let form shows up in the org-plus-contrib. (when (let ((case-fold-search nil)) <-------- i think this line is wrong (looking-at org-complex-heading-regexp)) Here is the function in org-plus-contrib Emacs : GNU Emacs 25.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9) of 2016-10-29 Package: Org mode version 9.0.7 (9.0.7-elpaplus @ /home/hp/.emacs.d/elpa/org-plus-contrib-20170515/) (defun org-set-tags-to (data) "Set the tags of the current entry to DATA, replacing the current tags. DATA may be a tags string like :aa:bb:cc:, or a list of tags. If DATA is nil or the empty string, any tags will be removed." (interactive "sTags: ") (setq data (cond ((eq data nil) "") ((equal data "") "") ((stringp data) (concat ":" (mapconcat 'identity (org-split-string data ":+") ":") ":")) ((listp data) (concat ":" (mapconcat 'identity data ":") ":")))) (when data (save-excursion (org-back-to-heading t) (when (let ((case-fold-search nil)) (looking-at org-complex-heading-regexp)) (if (match-end 5) (progn (goto-char (match-beginning 5)) (insert data) (delete-region (point) (point-at-eol)) (org-set-tags nil 'align)) (goto-char (point-at-eol)) (insert " " data) (org-set-tags nil 'align))) (beginning-of-line 1) (when (looking-at ".*?\\([ \t]+\\)$") (delete-region (match-beginning 1) (match-end 1)))))) Here's the function from org: (defun org-set-tags-to (data) "Set the tags of the current entry to DATA, replacing the current tags. DATA may be a tags string like :aa:bb:cc:, or a list of tags. If DATA is nil or the empty string, any tags will be removed." (interactive "sTags: ") (setq data (cond ((eq data nil) "") ((equal data "") "") ((stringp data) (concat ":" (mapconcat 'identity (org-split-string data ":+") ":") ":")) ((listp data) (concat ":" (mapconcat 'identity data ":") ":")))) (when data (save-excursion (org-back-to-heading t) (when (looking-at org-complex-heading-regexp) (if (match-end 5) (progn (goto-char (match-beginning 5)) (insert data) (delete-region (point) (point-at-eol)) (org-set-tags nil 'align)) (goto-char (point-at-eol)) (insert " " data) (org-set-tags nil 'align))) (beginning-of-line 1) (if (looking-at ".*?\\([ \t]+\\)$") (delete-region (match-beginning 1) (match-end 1)))))) -- Best, Huy Pham --001a113c0e86c8f947054fefd4d5 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I just downloaded org-plus-contrib and my customizde = capture stopped
working. The function org-set-tags-to is differen= t than the org
package. The let form shows up in the org-plus-con= trib.=C2=A0

(when (let ((case-fold-search nil)) &l= t;-------- i think this line is wrong
=C2=A0 =C2=A0 =C2=A0(lookin= g-at org-complex-heading-regexp)) =C2=A0 =C2=A0

He= re is the function in org-plus-contrib
Emacs =C2=A0: GNU Emacs 25= .1.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
of 2016-10-2= 9
Package: Org mode version 9.0.7 (9.0.7-elpaplus @ /home/hp/.ema= cs.d/elpa/org-plus-contrib-20170515/)
(defun org-set-tags-to (dat= a)
=C2=A0 "Set the tags of the current entry to DATA, replac= ing the current tags.
DATA may be a tags string like :aa:bb:cc:, = or a list of tags.
If DATA is nil or the empty string, any tags w= ill be removed."
=C2=A0 (interactive "sTags: ")
=C2=A0 (setq data
(cond
((eq data nil) "")
((equal data "") "")
((stringp data)
=
=C2=A0(concat ":" (mapconcat 'identity (org-split-string da= ta ":+") ":")
=C2=A0":"))
<= span class=3D"gmail-Apple-tab-span" style=3D"white-space:pre"> ((li= stp data)
=C2=A0(concat ":" (mapconcat 'identity data = ":") ":"))))
=C2=A0 (when data
=C2= =A0 =C2=A0 (save-excursion
=C2=A0 =C2=A0 =C2=A0 (org-back-to-head= ing t)
=C2=A0 =C2=A0 =C2=A0 (when (let ((case-fold-search nil))
=C2=A0 =C2=A0 =C2=A0(looking-at org-complex-heading-regexp))
(i= f (match-end 5)
=C2=A0 =C2=A0(progn
=C2=A0 =C2=A0 =C2=A0(goto= -char (match-beginning 5))
=C2=A0 =C2=A0 =C2=A0(insert data)
= =C2=A0 =C2=A0 =C2=A0(delete-region (point) (point-at-eol))
=C2=A0 = =C2=A0 =C2=A0(org-set-tags nil 'align))
=C2=A0(goto-char (point-= at-eol))
=C2=A0(insert " " data)
=C2=A0(org-set-tag= s nil 'align)))
=C2=A0 =C2=A0 =C2=A0 (beginning-of-line 1)
=C2=A0 =C2=A0 =C2=A0 (when (looking-at ".*?\\([ \t]+\\)$"= )
= (delete-region (match-beginning 1) (match-end 1))))))


Here's the function from org:=

(defun org-set-tags-to (data)
=C2=A0 &q= uot;Set the tags of the current entry to DATA, replacing the current tags.<= /div>
DATA may be a tags string like :aa:bb:cc:, or a list of tags.
If DATA is nil or the empty string, any tags will be removed."<= /div>
=C2=A0 (interactive "sTags: ")
=C2=A0 (setq d= ata
(cond
((eq data nil) "")
((equal data &= quot;") "")
((stringp data)
=C2=A0(concat &quo= t;:" (mapconcat 'identity (org-split-string data ":+") &= quot;:")
=C2=A0":"))
((listp data)
= =C2= =A0(concat ":" (mapconcat 'identity data ":") "= ;:"))))
=C2=A0 (when data
=C2=A0 =C2=A0 (save-excu= rsion
=C2=A0 =C2=A0 =C2=A0 (org-back-to-heading t)
=C2= =A0 =C2=A0 =C2=A0 (when (looking-at org-complex-heading-regexp)
<= span class=3D"gmail-Apple-tab-span" style=3D"white-space:pre"> (if (= match-end 5)
=C2=A0 =C2=A0(progn
=C2=A0 =C2=A0 =C2=A0(goto-ch= ar (match-beginning 5))
=C2=A0 =C2=A0 =C2=A0(insert data)
= =C2= =A0 =C2=A0 =C2=A0(delete-region (point) (point-at-eol))
=C2=A0 =C2= =A0 =C2=A0(org-set-tags nil 'align))
=C2=A0(goto-char (point-at-= eol))
=C2=A0(insert " " data)
=C2=A0(org-set-tags n= il 'align)))
=C2=A0 =C2=A0 =C2=A0 (beginning-of-line 1)
=
=C2=A0 =C2=A0 =C2=A0 (if (looking-at ".*?\\([ \t]+\\)$")
=C2=A0(delete-region (match-beginning 1) (match-end 1))))))
<= br>

--
Best,=C2=A0Huy Pham
--001a113c0e86c8f947054fefd4d5--