Re: [O] buffer-invisibility-spec isn't a list
Oh, I see. Thanks! Oleg On Fri, Apr 15, 2016 at 8:47 PM, Nicolas Goaziou wrote: > Hello, > > Oleg Sivokon writes: > >> In the function `org-move-to-column' when you call (remove >> '(org-filtered) buffer-invisibility-spec) it is quite possible that >> `buffer-invisibility-spec' is just `t'. This will error, because >> `remove' expects second argument to be a list. > > Thank you for the report. > > This was fixed in 34f32603704f0e2f66772c904358ae784b62e88c (February). > > You may want to update Org. > > > Regards, > > -- > Nicolas Goaziou
Re: [O] orgtbl-to-latex and orgtbl-to-html with boundaries and line
>>> "Uwe" == Uwe Brauer writes: > > This seem to be the problematic line. I would like that orgtbl-to-html would generate How can I achieve that? Uwe Brauer
Re: [O] BUG: Wrong indentation inside src block
Adam Porter writes: > fm4d writes: > >> Hello, I found an indentation bug in the master branch. >> >> Steps to reproduce: >> >> * Test 1 >> ** Test 2 >> #+BEGIN_SRC emacs-lisp >> (setq foo 1 >> bar 2) >> #+END_SRC >> >> Paste this code into org-mode buffer with org-startup-indented turn on >> org-indented-mode. You should see the src block missindented like this: >> >> (setq foo 1 >> bar 2) >> >> I've tracked this bug to this commit >> http://repo.or.cz/org-mode.git/commit/a311a856514e9245074b02c89d51a9f339784d1c > > Hm, I'm not sure I understand the problem. Org doesn't automatically > reindent source blocks, as far as I know. You can and reindent > the source buffer, and then when you save it it will be reflected in the > Org buffer. I made a little function to do that as a command, which I > could share if you like. > > Also, the examples you gave have mixed spaces and tabs, so it's hard to > tell whether they're indented correctly. For example, I see the second > example indented correctly, while the first is not. You might try > turning on whitespace-mode, which makes it easy to see where they are. > > BTW, that commit is a large merge commit, so it's hard to see where the > problem would be. You could try bisecting it on the branch it was > merged from. I can see that I should have explain it with more clarity. I am using and the actual code is indented correctly inside and when tangled, BUT it is displayed incorrectly in the src block after I return from and org-indent-mode is on. The code I posted should show what I mean, the expression inside src block (pasted and indented correctly inside ) is just incorrectly rendered outside of . Tracking it to this merge commit was the best I could do, I was trying to look throught the changes but with no luck.
[O] didn't see org when 'M-x list-packages'
<<< image/png: EXCLUDED >>>
[O] Orgmode Manual typo
http://orgmode.org/org.html#Resolving-idle-time .6 Taking notes with a timer Org *provides provides* two types of timers. -- Fangyuan Li Master Student at Department of Computer Science Stony Brook University Email: maplain...@gmail.com
Re: [O] Orgmode Manual typo
Hello, Lee writes: > http://orgmode.org/org.html#Resolving-idle-time > .6 Taking notes with a timer > > Org *provides provides* two types of timers. Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] Problem with org-timestamp-up and timezones
Hello, Derek Feichtinger writes: > The problematic statement is in org.el, defun org-timestamp-change, where > the argument list to encode time evaluates to something like > > (encode-time 0 0 0 30 11 2013 '(nil nil nil)) > > i.e. the 7th argument is a list, while the function would be ok with getting > the three nil values not packed into a list. So, just introducing an "apply" > in front fixes this for now. > > So from the following code in org-timestamp-change > >... > (setq time > (encode-time (or (car time0) 0) >(+ (if (eq org-ts-what 'minute) n 0) (nth 1 time0)) >(+ (if (eq org-ts-what 'hour) n 0) (nth 2 time0)) >(+ (if (eq org-ts-what 'day) n 0)(nth 3 time0)) >(+ (if (eq org-ts-what 'month) n 0) (nth 4 time0)) >(+ (if (eq org-ts-what 'year) n 0) (nth 5 time0)) >(nthcdr 6 time0))) >... > > I just modify to the following > >... > (setq time > (apply >'encode-time (or (car time0) 0) >(+ (if (eq org-ts-what 'minute) n 0) (nth 1 time0)) >(+ (if (eq org-ts-what 'hour) n 0) (nth 2 time0)) >(+ (if (eq org-ts-what 'day) n 0)(nth 3 time0)) >(+ (if (eq org-ts-what 'month) n 0) (nth 4 time0)) >(+ (if (eq org-ts-what 'year) n 0) (nth 5 time0)) >(nthcdr 6 time0))) >... > > > Afterwards the time shifts on the clock lines works fine, again. But I do > not know whether this fixes all cases, or what really is the deeper reason > that this error surfaced right now. This looks correct. Thank you for the investigation. This issue is now fixed. Regards, -- Nicolas Goaziou
Re: [O] orgtbl-to-latex and orgtbl-to-html with boundaries and line
Hello, Uwe Brauer writes: "Uwe" == Uwe Brauer writes: > > >> >> frame="hsides"> > > This seem to be the problematic line. I would like that > orgtbl-to-html would generate > > > > How can I achieve that? You could play with :tstart parameter. See `orgtbl-to-generic' docstring. Regards, -- Nicolas Goaziou
Re: [O] Bug: Problem with LaTeX export, footnotes in table headers, and longtabu [8.3.4 (8.3.4-31-gcb683e-elpa @ /home/berhol/.emacs.d/elpa/org-20160404/)]
Hello, Berthold Hoellmann writes: > Actually I was able to patch `org-latex-footnote-reference' to get the > results I line. The trick is to add the counter number given at the > \footnotetext command to the \footnotemark command also: It sounds good. Would you like to provide a patch against master for that? Thank you. Regards, -- Nicolas Goaziou
Re: [O] BUG: Wrong indentation inside src block
Hello, fm4d writes: > I can see that I should have explain it with more clarity. > I am using and the actual code is indented correctly inside > and when tangled, BUT it is displayed incorrectly in the > src block after I return from and org-indent-mode is on. > The code I posted should show what I mean, the expression inside > src block (pasted and indented correctly inside ) is just > incorrectly rendered outside of . Tracking it to this merge > commit was the best I could do, I was trying to look throught the > changes but with no luck. FWIW, I cannot reproduce it either. Regards, -- Nicolas Goaziou
Re: [O] Screenshot of agenda: agenda is not shown in time
* Michael Welle wrote: > Hello, Hi Michael! > great. May I ask what you are building? Are the screen dumps just for > documentation purpose or are you up to something interesting ;)? The purpose of this screenshot is to get a quick possibility to check my next four weeks (only appointments, no todos) on my Android phone. Since I am not able to define this PNG as my lock-screen background (my original plan), I created a lock-screen link to the image. To get to the agenda from lock-screen requires a slide of the lock-screen link, enter my security pattern, and then my image viewer shows me the agenda. This is a reasonable workaround since MobileOrg still does not work with my local Android calendar for some reason. -- mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode: > get Memacs from https://github.com/novoid/Memacs < https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github
[O] exporting to subsubsection not completing
I'm using a custom class for my org-mode latex file which is - --8<---cut here---start->8--- #+begin_src emacs-lisp (add-to-list 'org-latex-classes '("my-memoir" "\\documentclass{memoir}" ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" . "\\subsection*{%s}") ("\\subsubsection{%s}" . "\\subsubsection*{%s}") ("\\paragraph{%s}" . "\\paragraph*{%s}") ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))) #+end_src [2016-04-16 Sat 08:22] --8<---cut here---end--->8--- but all my subsubsections are coming out as - ╭ │\begin{enumerate} │\item Stop the abuse! ╰ This is my file header, minus the title which isn't relevant --8<---cut here---start->8--- #+LaTeX_class: my-memoir #+LATEX_CLASS_OPTIONS: [a4paper,12pt,oneside,openany] #+latex_header: \usepackage[mark]{gitinfo2} #+latex_header: \usepackage{mVersion} #+latex_header: \increaseBuild #+latex_header: \date{Build - \version} # #+LaTeX_HEADER: \usepackage[utf8]{inputenc} # #+LaTeX_HEADER: \usepackage[T1]{fontenc} #+LaTeX_HEADER: \usepackage{mathpazo} #+LaTeX_HEADER: \usepackage{fixltx2e} #+latex_header: \usepackage[backend=biber,style=philosophy-modern,doi=true,hyperref=true,backref=true,backrefstyle=two,date=year,maxcitenames=3]{biblatex} #+LATEX_HEADER: \addbibresource{~/research/hair/hair.bib} #+LATEX_HEADER: \usepackage{makeidx} #+latex_header: \makeindex #+latex_header: \usepackage{glossaries} #+latex_header: \makeglossaries #+latex_header: \usepackage[unhide]{todo} #+latex_header: \usepackage{everypage} #+latex_header: \usepackage{draftwatermark} #+latex_header: \usepackage{scrextend} #+latex_header: \usepackage{hyperref} #+latex_header: \hypersetup{colorlinks,linkcolor={red},citecolor={magenta},urlcolor={blue}} #+latex_header: \setlength\parindent{0pt} % sets indent to zero #+latex_header: \usepackage{chngcntr} #+latex_header: \counterwithout{footnote}{chapter} #+latex_header: \footnotesep\baselineskip #+latex_header: \setlength{\parskip}{7pt} #+OPTIONS: H:3 toc:t \n:nil ::t |:t ^:t f:t tex:t #+LaTeX: \setcounter{secnumdepth}{0} #+OPTIONS: toc:2 --8<---cut here---end--->8--- How can I get my org-mode level 4 subheading to appear as subsubsection when the file is exported please? Thanks Sharon. -- A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk Debian 8.4, fluxbox 1.3.7, emacs 25.0.92 signature.asc Description: PGP signature
Re: [O] exporting to subsubsection not completing
On Saturday, 16 Apr 2016 at 13:21, Sharon Kimble wrote: [...] > but all my subsubsections are coming out as - > > ╭ > │\begin{enumerate} > │\item Stop the abuse! > ╰ [...] > #+OPTIONS: H:3 toc:t \n:nil ::t |:t ^:t f:t tex:t Change H:3 to H:4 or even H:6. -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
Re: [O] funny emacs-lisp macro behavior in org-babel related to lexical-binding
That sounds fine to me. Would you then use :lexical nil in a header to turn it off? or a new custom variable? John --- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Fri, Apr 15, 2016 at 4:49 PM, Nicolas Goaziou wrote: > Hello, > > John Kitchin writes: > > > So, I would like to propose adding the third argument to the eval > > statement that reads > > > > (assoc :lexical params) > > > > to turn on lexical eval if you want it. > > > > What do you think? > > I assume you're talking about ob-emacs-lisp.el. This sounds like a good > idea. However, I suggest to make lexical binding the default value, to > be on par with the rest of Emacs. > > > Regards, > > -- > Nicolas Goaziou >
Re: [O] exporting to subsubsection not completing
Eric S Fraga writes: > On Saturday, 16 Apr 2016 at 13:21, Sharon Kimble wrote: > > [...] > >> but all my subsubsections are coming out as - >> >> ╭ >> │\begin{enumerate} >> │\item Stop the abuse! >> ╰ > > [...] > >> #+OPTIONS: H:3 toc:t \n:nil ::t |:t ^:t f:t tex:t > > Change H:3 to H:4 or even H:6. Thanks, that's sorted it with H:6, and it was so simple, most definitely a 'doh' moment! :) Thanks again Sharon. -- A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk Debian 8.4, fluxbox 1.3.7, emacs 25.0.92 signature.asc Description: PGP signature
Re: [O] BUG: Wrong indentation inside src block
fm4d writes: > I can see that I should have explain it with more clarity. > I am using and the actual code is indented correctly inside > and when tangled, BUT it is displayed incorrectly in the > src block after I return from and org-indent-mode is on. > The code I posted should show what I mean, the expression inside > src block (pasted and indented correctly inside ) is just > incorrectly rendered outside of . Tracking it to this merge > commit was the best I could do, I was trying to look throught the > changes but with no luck. The only thing I can think of is that it might be something to do with indenting with tabs vs. spaces. Maybe check your indentation settings. Also see if you can reproduce it with emacs -q; if not, it's probably an issue with your config.
Re: [O] BUG: Wrong indentation inside src block
On Apr 16, 2016 09:31, "Adam Porter" wrote: > > fm4d writes: > > > I can see that I should have explain it with more clarity. > > I am using and the actual code is indented correctly inside > > and when tangled, BUT it is displayed incorrectly in the > > src block after I return from and org-indent-mode is on. > > The code I posted should show what I mean, the expression inside > > src block (pasted and indented correctly inside ) is just > > incorrectly rendered outside of . Tracking it to this merge > > commit was the best I could do, I was trying to look throught the > > changes but with no luck. > > The only thing I can think of is that it might be something to do with > indenting with tabs vs. spaces. Maybe check your indentation settings. > Also see if you can reproduce it with emacs -q; if not, it's probably an > issue with your config. Not sure of it's the same, but I had some issues with spaces/tabs myself a bit back and agree it's a good place to look. - https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01505.html One can also check the mentioned variable, org-src-preserve-indentation. John > >
Re: [O] BUG: Wrong indentation inside src block
John Hendy gmail.com> writes: > > > > On Apr 16, 2016 09:31, "Adam Porter" alphapapa.net> wrote: > > > > The only thing I can think of is that it might be something to do with > > indenting with tabs vs. spaces. Maybe check your indentation settings. > > Also see if you can reproduce it with emacs -q; if not, it's probably an > > issue with your config. > Not sure of it's the same, but I had some issues with spaces/tabs myself a > bit back and agree it's a good place to look. > - https://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg01505.html > One can also check the mentioned variable, org-src-preserve-indentation. > John > > > > > I made two short videos showing what exactly I mean. http://fm4d.net/indent1.ogv - with master http://fm4d.net/indent2.ogv - with 8.3.3 There is no configuration, .emacs only has three lines with >> (add-to-list 'load-path "~/Git/org-mode/lisp") >> (require 'org) >> (setq org-startup-indented t)
Re: [O] BUG: Wrong indentation inside src block
On Saturday, 16 Apr 2016 at 15:42, fm4d wrote: > I made two short videos showing what exactly I mean. > > http://fm4d.net/indent1.ogv - with master > http://fm4d.net/indent2.ogv - with 8.3.3 I don't understand why the behaviour is different with different versions of org but, just in case, what is the setting of indent-tabs-mode? I find that things work best with this set to nil. The actual use of tabs is a holdover from typewriter days... -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
Re: [O] funny emacs-lisp macro behavior in org-babel related to lexical-binding
John Kitchin writes: > That sounds fine to me. Would you then use > > :lexical nil Sure. However, Babel uses "yes" and "no" as booleans so we also need to support these. nil and t are fine too, obviously. You would need to define a new defconst `org-babel-header-args:emacs-lisp' to specify allowed values for :lexical. Also, this should probably be documented somewehere. Regards,
Re: [O] BUG: Wrong indentation inside src block
Eric S Fraga ucl.ac.uk> writes: > > I don't understand why the behaviour is different with different > versions of org but, just in case, what is the setting of > indent-tabs-mode? I find that things work best with this set to > nil. The actual use of tabs is a holdover from typewriter days... > Well, you were right, (setq-default indent-tabs-mode nil) solved the issue for me. Now I understand why nobody noticed it, but I still find it weird that until the commit it worked for me even with indent-tabs-mode on. Maybe it is worth some comment in documentation because indent-tabs-mode is on by default.
[O] unable to resolve link: nil?
Hello, I have the error message: : user-error: unable to resolve link: nil on export to LaTeX. This is driving me crazy. I'm sure it's my fault but is there any way to get some useful hint as to where I may be going wrong without having to bisect my rather large document? Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
Re: [O] unable to resolve link: nil?
On Saturday, 16 Apr 2016 at 17:35, Fraga, Eric wrote: > Hello, > > I have the error message: > > : user-error: unable to resolve link: nil > > on export to LaTeX. > > This is driving me crazy. I'm sure it's my fault but is there any way > to get some useful hint as to where I may be going wrong without having > to bisect my rather large document? Arggh, sorry for the noise. I found the offeding line. In hindsight, the error makes sense: the problem was a missing colon (:) in one of the links (lots of C-c C-x C-n to find it). Maybe it would help to say a bit more, such as "no link type found" and maybe show the rest of the contents of the link? Or even a line number? Something... anything! ;-) thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.92.1, Org release_8.3.4-705-g716e33
Re: [O] unable to resolve link: nil?
Hello, Eric S Fraga writes: > In hindsight, the error makes sense: the problem was a missing colon (:) > in one of the links (lots of C-c C-x C-n to find it). Maybe it would > help to say a bit more, such as "no link type found" and maybe show the > rest of the contents of the link? Or even a line number? > Something... anything! ;-) You could also try using `org-lint' or setting #+OPTIONS: broken-links:mark somewhere in your document. Regards, -- Nicolas Goaziou
[O] Lisp execution error
Aloha all, I'm getting an error message evaluating Lisp code blocks in babel. Successfully reloaded Org Org-mode version 8.3.4 (release_8.3.4-720-g1581da @ /Users/dk/.emacs.d/src/org-mode/lisp/) executing Lisp code block... funcall: Invalid function: "slime-eval" I think this is due to the recent change in ob-lisp.el (which I thought I had already tested successfully--perhaps I forgot to reload Org-mode). Can someone else reproduce this? All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Lisp execution error
Hello, "Thomas S. Dye" writes: > I'm getting an error message evaluating Lisp code blocks in babel. > > Successfully reloaded Org > Org-mode version 8.3.4 (release_8.3.4-720-g1581da @ > /Users/dk/.emacs.d/src/org-mode/lisp/) > executing Lisp code block... > funcall: Invalid function: "slime-eval" > > I think this is due to the recent change in ob-lisp.el (which I thought > I had already tested successfully--perhaps I forgot to reload Org-mode). > > Can someone else reproduce this? This was fixed recently. You need to update Org. Regards, -- Nicolas Goaziou
Re: [O] Lisp execution error
Aloha Nicolas, Nicolas Goaziou writes: > Hello, > > "Thomas S. Dye" writes: > >> I'm getting an error message evaluating Lisp code blocks in babel. >> >> Successfully reloaded Org >> Org-mode version 8.3.4 (release_8.3.4-720-g1581da @ >> /Users/dk/.emacs.d/src/org-mode/lisp/) >> executing Lisp code block... >> funcall: Invalid function: "slime-eval" >> >> I think this is due to the recent change in ob-lisp.el (which I thought >> I had already tested successfully--perhaps I forgot to reload Org-mode). >> >> Can someone else reproduce this? > > This was fixed recently. You need to update Org. I missed that, thanks. Lisp execution works as expected now. All the best, Tom -- Thomas S. Dye http://www.tsdye.com
[O] [PATCH] Make lexical eval default for elisp src blocks
Set default in `org-babel-default-header-args:emacs-lisp'. Add an optional argument to the eval function. --- etc/ORG-NEWS | 11 +++ lisp/ob-emacs-lisp.el | 29 - 2 files changed, 31 insertions(+), 9 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 6b1d9d5..99241e2 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -467,6 +467,17 @@ docstring for more information. - ~org-latex-format-inlinetask-function~ - ~org-link-search~ ** New features +*** Default lexical evaluation of emacs-lisp src blocks +Emacs-lisp src blocks in babel are now evaluated using lexical scoping. There is a new header to control this behavior. + +The default results in an eval with lexical scoping. +:lexical yes + +This turns lexical scoping off in the eval (the former behavior). +:lexical no + +This uses the lexical environment with x=42 in the eval. +:lexical '((x . 42)) *** Behavior of ~org-return~ changed diff --git a/lisp/ob-emacs-lisp.el b/lisp/ob-emacs-lisp.el index 2eb2721..ee8c8dd 100644 --- a/lisp/ob-emacs-lisp.el +++ b/lisp/ob-emacs-lisp.el @@ -28,8 +28,14 @@ ;;; Code: (require 'ob) -(defvar org-babel-default-header-args:emacs-lisp nil - "Default arguments for evaluating an emacs-lisp source block.") +(defvar org-babel-default-header-args:emacs-lisp + '((:lexical . "yes")) + "Default arguments for evaluating an emacs-lisp source block. + +:lexical is \"yes\" by default and causes src blocks to be eval'd +using lexical scoping. It can also be an alist mapping symbols to +their value. It is used as the optional LEXICAL argument to +`eval'.") (defun org-babel-expand-body:emacs-lisp (body params) "Expand BODY according to PARAMS, return the expanded body." @@ -51,13 +57,18 @@ (defun org-babel-execute:emacs-lisp (body params) "Execute a block of emacs-lisp code with Babel." (save-window-excursion -(let ((result - (eval (read (format (if (member "output" - (cdr (assoc :result-params params))) - "(with-output-to-string %s)" - "(progn %s)") - (org-babel-expand-body:emacs-lisp -body params)) +(let* ((lexical (cdr (assoc :lexical params))) + (result + (eval (read (format (if (member "output" + (cdr (assoc :result-params params))) + "(with-output-to-string %s)" + "(progn %s)") + (org-babel-expand-body:emacs-lisp +body params))) + + (if (listp lexical) + lexical + (string= "yes" lexical) (org-babel-result-cond (cdr (assoc :result-params params)) (let ((print-level nil) (print-length nil)) -- 2.4.4
Re: [O] funny emacs-lisp macro behavior in org-babel related to lexical-binding
I submitted a patch for this. I still am not sure I did it quite right. Is there a page anywhere that outlines what to do? e.g. create a branch, make changes, how to make patches, and mail them etc... or some other preferred method? thanks, Nicolas Goaziou writes: > John Kitchin writes: > >> That sounds fine to me. Would you then use >> >> :lexical nil > > Sure. However, Babel uses "yes" and "no" as booleans so we also need to > support these. nil and t are fine too, obviously. > > You would need to define a new defconst > `org-babel-header-args:emacs-lisp' to specify allowed values > for :lexical. > > Also, this should probably be documented somewehere. > > > Regards, -- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu