* Bug: org tags [9.0.7 (9.0.7-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20170515/)]
@ 2017-05-20 7:46 H.M. Pham
2017-05-20 13:25 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: H.M. Pham @ 2017-05-20 7:46 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 2526 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 6346 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug: org tags [9.0.7 (9.0.7-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20170515/)]
2017-05-20 7:46 Bug: org tags [9.0.7 (9.0.7-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20170515/)] H.M. Pham
@ 2017-05-20 13:25 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2017-05-20 13:25 UTC (permalink / raw)
To: H.M. Pham; +Cc: emacs-orgmode
Hello,
"H.M. Pham" <phamhm@gmail.com> writes:
> 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))
Could you explain the bug you're experiencing? An ECM would be great.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-05-20 13:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-20 7:46 Bug: org tags [9.0.7 (9.0.7-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20170515/)] H.M. Pham
2017-05-20 13:25 ` Nicolas Goaziou
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).