emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Puneeth Chaganti <punchagan@gmail.com>
To: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Bug: header-args:C++ doesn't work
Date: Fri, 5 Dec 2014 00:10:54 +0530	[thread overview]
Message-ID: <CALnw1fTw1ivaUXodHM1wELkaGa+OGq95tM+cWUJsrfrbS5N3qg@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 668 bytes --]


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.


a "hacky" fix, (better for the users ?), could be to consider KEY+ to
be indicating appending, but KEY++ to not.  Thoughts?


[-- 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)

             reply	other threads:[~2014-12-04 18:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 18:40 Puneeth Chaganti [this message]
2014-12-05 23:42 ` Bug: header-args:C++ doesn't work Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALnw1fTw1ivaUXodHM1wELkaGa+OGq95tM+cWUJsrfrbS5N3qg@mail.gmail.com \
    --to=punchagan@gmail.com \
    --cc=emacs-orgmode@gnu.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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).