* Bug: header-args:C++ doesn't work
@ 2014-12-04 18:40 Puneeth Chaganti
2014-12-05 23:42 ` Nicolas Goaziou
0 siblings, 1 reply; 2+ messages in thread
From: Puneeth Chaganti @ 2014-12-04 18:40 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 668 bytes --]
Hello,
I was helping out "ablephar`" on IRC and they found that setting a
file property `header-args:C++` does not work.
After some edebug magic, I discovered that org has a feature that lets
you append property values! (Not the best way to discover a great
feature, I must say! :-)
The fix could either be a documentation fix. (I would've tried using
cpp instead of C++, if I knew that was supported). But, this would
still have some users seeing things broken and then looking up docs or
trying out the alternative.
OR
a "hacky" fix, (better for the users ?), could be to consider KEY+ to
be indicating appending, but KEY++ to not. Thoughts?
Thanks,
Puneeth
[-- Attachment #2: C++-header-args.patch --]
[-- Type: text/x-patch, Size: 666 bytes --]
diff --git a/lisp/org.el b/lisp/org.el
index e806440..fc850b8 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15415,7 +15415,8 @@ Being in this list makes sure that they are offered for completion.")
(defun org--update-property-plist (key val props)
"Associate KEY to VAL in alist PROPS.
Modifications are made by side-effect. Return new alist."
- (let* ((appending (string= (substring key -1) "+"))
+ (let* ((appending (and (string= (substring key -1) "+")
+ (not (string= (substring key -2) "++"))))
(key (if appending (substring key 0 -1) key))
(old (assoc-string key props t)))
(if (not old) (cons (cons key val) props)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: Bug: header-args:C++ doesn't work
2014-12-04 18:40 Bug: header-args:C++ doesn't work Puneeth Chaganti
@ 2014-12-05 23:42 ` Nicolas Goaziou
0 siblings, 0 replies; 2+ messages in thread
From: Nicolas Goaziou @ 2014-12-05 23:42 UTC (permalink / raw)
To: Puneeth Chaganti; +Cc: emacs-orgmode
Hello,
Puneeth Chaganti <punchagan@gmail.com> writes:
> I was helping out "ablephar`" on IRC and they found that setting a
> file property `header-args:C++` does not work.
>
> After some edebug magic, I discovered that org has a feature that lets
> you append property values! (Not the best way to discover a great
> feature, I must say! :-)
>
> The fix could either be a documentation fix. (I would've tried using
> cpp instead of C++, if I knew that was supported). But, this would
> still have some users seeing things broken and then looking up docs or
> trying out the alternative.
>
> OR
>
> a "hacky" fix, (better for the users ?), could be to consider KEY+ to
> be indicating appending, but KEY++ to not. Thoughts?
I prefer the former. Forbidding to end properties with "+" (unless we
are appending a value) is, IMO, a bearable restriction.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-12-05 23:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-04 18:40 Bug: header-args:C++ doesn't work Puneeth Chaganti
2014-12-05 23:42 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.