emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Schulte <schulte.eric@gmail.com>
To: Achim Gratz <Stromeko@Nexgo.DE>
Cc: emacs-orgmode@gnu.org
Subject: Re: :session question - a simple PATCH
Date: Fri, 29 Mar 2013 08:38:48 -0600	[thread overview]
Message-ID: <87a9pm8e4n.fsf@gmail.com> (raw)
In-Reply-To: <kj3ojt$dm3$1@ger.gmane.org> (Achim Gratz's message of "Fri, 29 Mar 2013 10:59:52 +0100")

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

Achim Gratz <Stromeko@Nexgo.DE> writes:

> Am 28.03.2013 20:35, schrieb Andreas Leha:
>> so it seems, currently, I (and John...) can not have both, /file local/
>> and /language local/ variables.
>>
>> - The emacs-lisp-block
>>    #+begin_src emacs-lisp
>>      (setq org-babel-default-header-args:R
>>            '((:session . "org-R")))
>>    #+end_src
>>    works, of course, but sets the R-session globally.
>>
>> - The file-local variables (both way to set them) choke on the colon in
>>    the varible name.
>
> You could use
>
> eval: (setq etq org-babel-default-header-args:R '((:session . "org-R")))
>
> instead of setting the variable directly.
>

The above sets the value globally, the following should work for
everyone.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bar.org --]
[-- Type: text/x-org, Size: 251 bytes --]

#+Title: Example

The value in this buffer is...
#+begin_src emacs-lisp
  org-babel-default-header-args:R
#+end_src

#+RESULTS:
| (:session . bar) |

# Local Variables:
# eval: (setq-local org-babel-default-header-args:R '((:session . "bar")))
# End:

[-- Attachment #3: Type: text/plain, Size: 847 bytes --]


>
>> I do not know where to search for the reason, these variables work for
>> Eric but not for me (and John...).
>
> I don't think they work for Eric if he tries to set them as file variable.
>

This was my fault.  I miss-interpreted what was happening on my system,
these aren't working for me either.

>
>> So attached is a simple patch (search-and-replace) that renames all
>> org-babel-default-header-args:* variables to
>> org-babel-default-header-args-*
>
> In keeping with the spirit of the original naming I'd suggest
> switching from ":" to "/".  I still think this is a bug in how Emacs
> evaluates the local variables, but since it has been that way for ages
> it probably has become a feature.
>

I agree that this is an Emacs bug.  The attached patch fixes this bug, I
suppose it should be submitted to the emacs-dev mailing list.


[-- Attachment #4: temporary-file-variables-w-colons.txt --]
[-- Type: text/plain, Size: 2593 bytes --]

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: schulte.eric@gmail.com-20130328230926-46be4fl21w1g28wc
# target_branch: http://bzr.savannah.gnu.org/r/emacs/trunk/
# testament_sha1: 969600ed8b879f2317f13e9f06968aafad4f786d
# timestamp: 2013-03-28 17:09:47 -0600
# base_revision_id: monnier@iro.umontreal.ca-20130328163306-\
#   419khox8aneaoaxv
# 
# Begin patch
=== modified file 'lisp/files.el'
--- lisp/files.el	2013-03-24 06:42:25 +0000
+++ lisp/files.el	2013-03-28 23:09:26 +0000
@@ -3058,7 +3058,11 @@
 	       (while (and (or (not mode-only)
 			       (not result))
 			   (< (point) end))
-		 (unless (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
+                 ;; The first of these next two regexs handles the
+                 ;; case when a variable name includes a ":", such as
+                 ;; the `org-babel-default-header-args:R' variable.
+		 (unless (or (looking-at "[ \t]*\\([^ \t\n]?+\\)[ \t]*:[ \t]*")
+                             (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*"))
 		   (message "Malformed mode-line")
 		   (throw 'malformed-line nil))
 		 (goto-char (match-end 0))

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWUbmhKQAAan/gAAyACBQ////
0gAcD/////BQA80t1o3vPXpy93vdCSSJiMIGmJNhCT9FNMninqBiY0CDJEniaZNJ6T0oYR6gAAAA
AAyTEmSnhRmkDT1AAyDQB6hoADakmp5DRTam1DajamgA0PUAaAAAkkmkwmFPJijRkzRAAHqAGgAz
S1WEfhTwKtT3Lzh0ptUwFljq3RvPzgDg4+hi9JNFWatAiacBNp3IkDC56rp8faNALW4WJH9ce0I4
Z3GPJC6C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UmBkKFYFeIWApYzQralEo0UqwMw60f/i7kinChII3NCUg=

[-- Attachment #5: Type: text/plain, Size: 71 bytes --]


Cheers,

>
>
> Regards,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte

  reply	other threads:[~2013-03-29 14:39 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-25  9:37 :session question Andreas Röhler
2013-03-25 23:58 ` Michael Gauland
2013-03-26  0:46   ` Eric Schulte
2013-03-26  8:37     ` Andreas Röhler
2013-03-26  9:12     ` Rainer M Krug
2013-03-26  9:23       ` Andreas Leha
2013-03-26 12:37         ` Eric Schulte
2013-03-26 12:44           ` Andreas Leha
2013-03-26 12:55           ` Achim Gratz
2013-03-26 15:31             ` Eric Schulte
2013-03-27  8:01               ` :session question - header argument setting Rainer M Krug
2013-03-27  8:35                 ` Sebastien Vauban
2013-03-27  8:52               ` :session question Andreas Röhler
2013-03-27  9:27                 ` Andreas Leha
2013-03-27 11:37                   ` Andreas Röhler
2013-03-27 11:48                     ` Nick Dokos
2013-03-27 12:18                       ` Andreas Röhler
2013-03-27 12:22                         ` Rainer M Krug
2013-03-27 12:47                           ` Andreas Röhler
2013-03-27 12:43                         ` Eric Schulte
2013-03-27 13:26                           ` Andreas Röhler
2013-03-27 13:29                           ` Andreas Leha
2013-03-27 15:47                             ` Eric Schulte
2013-03-27 20:20                               ` Andreas Leha
2013-03-27 20:35                                 ` Eric Schulte
2013-03-28 10:25                                   ` Andreas Leha
2013-03-28 13:06                                     ` John Hendy
2013-03-28 19:35                                       ` :session question - a simple PATCH Andreas Leha
2013-03-29  9:59                                         ` Achim Gratz
2013-03-29 14:38                                           ` Eric Schulte [this message]
2013-03-28 13:22                                   ` :session question John Hendy
2013-03-27 20:59                                 ` Andreas Röhler
2013-03-27 11:19               ` Andreas Leha
2013-04-28 15:46               ` Achim Gratz
2013-05-01 17:18                 ` Eric Schulte
2013-05-01 17:36                   ` Achim Gratz
2013-05-09 18:52                   ` Achim Gratz
2013-06-07 16:15                     ` Achim Gratz
2013-06-07 19:07                       ` :session question -- and changes to #+Property: syntax Eric Schulte
2013-06-07 19:49                         ` Achim Gratz
2013-06-07 20:22                           ` Andreas Leha
2013-06-10  8:16                             ` Rainer M Krug
2013-06-08  7:47                         ` Achim Gratz
2013-06-08 18:08                           ` Eric Schulte
2013-06-08 20:48                             ` Achim Gratz
2013-06-10  8:21                               ` Rainer M Krug
2013-06-10 19:16                                 ` Achim Gratz
2013-06-18 20:41                         ` Achim Gratz
2013-06-19 10:10                           ` Michael Brand
2013-06-20 16:27                           ` Eric Schulte
2013-06-20 17:47                             ` Achim Gratz
2013-06-20 18:31                               ` Eric Schulte
2013-06-20 19:14                                 ` Achim Gratz
2013-06-20 19:28                                   ` Eric Schulte
2013-06-23 17:50                                   ` Achim Gratz
2013-06-25 14:20                                     ` Eric Schulte
2013-06-25 18:28                                       ` Achim Gratz
2013-06-10  8:14                       ` :session question Rainer M Krug
2013-06-10  8:12                   ` Rainer M Krug
2013-03-27  8:26           ` Andreas Röhler
2013-03-26  6:41   ` Andreas Röhler

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  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=87a9pm8e4n.fsf@gmail.com \
    --to=schulte.eric@gmail.com \
    --cc=Stromeko@Nexgo.DE \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

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