Re: [O] org-ctrl-c-ctrl-c in comments
Uwe Brauer writes: >> Hello, >> Uwe Brauer writes: > > >> You can use drawers for that. > > No I cannot, I just found out about drawers, > however they *are* exported, when calling org-mime-htmlize, so they > don't serve my needs. > Even if you set #+OPTIONS: d:nil ? -- Nick
Re: [O] regression in list/heading toggling?
Nicolas Goaziou writes: > Hello, > > Eric Abrahamsen writes: > >> I've found what seems to be a bug in org-ctrl-c-star, toggling a >> numbered list item to a proper heading. ECM is simply emacs -Q, make an >> org buffer, put in the text: >> >> 1. >> >> cursor on the number, then "C-c *". Text is removed, the window jumps, >> and you get "(wrong-type-argument arrayp nil)". >> >> I have a full traceback I can send to the list if necessary, but my >> guess is it will be fairly reproduceable! > > Fixed. Thank you. Thanks, as always, for the speedy response!
Re: [O] org-ctrl-c-ctrl-c in comments
See at bottom one more thing. On Tue, 8 Dec 2015, Charles C. Berry wrote: On Tue, 8 Dec 2015, Uwe Brauer wrote: > On Tue, 8 Dec 2015, Uwe Brauer wrote: > Use an org src block and you will be able to edit natively via > org-ctrl-c-ctrl-c. AFAICS, this behaves like `comment' in other > respects. For me in GNU emacs 25.0.50.1 and org 8.3.1 the following works | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 | ^ | ^=cursor C-c C-c gives | Col1 | Col2 | | |1 | Name1 | | |2 | Name2 | | |3 | Name3 | | But that does not: Here is what I am doing #+begin_src org :exports none :eval none | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 |^ | #+end_src C-c C-c Sorry. You have to put the code into an edit buffer to be able to use native org mode edit commands. So with the cursor where you have indicated above, : C-c ' C-c C-c C-c ' results in --8<---cut here---start->8--- #+begin_src org :exports none :eval none | Col1 | Col2 | | |1 | Name1 | | |2 | Name2 | | |3 | Name3 | | #+end_src --8<---cut here---end--->8--- Of course, you probably want to do more editing than just the 'C-c C-c' bit, but you get the idea - enter the src edit buffer, edit away, when you are done exit the src edit buffer. Should have said: you do NOT need ob-org for this to work on org src blocks you have no intention of exporting. Chuck
Re: [O] org-ctrl-c-ctrl-c in comments
On Tue, 8 Dec 2015, Uwe Brauer wrote: > On Tue, 8 Dec 2015, Uwe Brauer wrote: > Use an org src block and you will be able to edit natively via > org-ctrl-c-ctrl-c. AFAICS, this behaves like `comment' in other > respects. For me in GNU emacs 25.0.50.1 and org 8.3.1 the following works | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 | ^ | ^=cursor C-c C-c gives | Col1 | Col2 | | |1 | Name1 | | |2 | Name2 | | |3 | Name3 | | But that does not: Here is what I am doing #+begin_src org :exports none :eval none | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 |^ | #+end_src C-c C-c Sorry. You have to put the code into an edit buffer to be able to use native org mode edit commands. So with the cursor where you have indicated above, : C-c ' C-c C-c C-c ' results in --8<---cut here---start->8--- #+begin_src org :exports none :eval none | Col1 | Col2 | | |1 | Name1 | | |2 | Name2 | | |3 | Name3 | | #+end_src --8<---cut here---end--->8--- Of course, you probably want to do more editing than just the 'C-c C-c' bit, but you get the idea - enter the src edit buffer, edit away, when you are done exit the src edit buffer. HTH, Chuck
Re: [O] org-ctrl-c-ctrl-c in comments
> Hello, > Uwe Brauer writes: > You can use drawers for that. No I cannot, I just found out about drawers, however they *are* exported, when calling org-mime-htmlize, so they don't serve my needs. Uwe Brauer > Regards,
Re: [O] org-ctrl-c-ctrl-c in comments
>>> "Nicolas" == Nicolas Goaziou writes: > Hello, > Uwe Brauer writes: >> The point is that I have emails which contains tables and I don't want >> to send these tables. So one possibility is to use comment blocks and >> org-mime-htmlize, which does not export text in comments blocks. >> >> Are there other blocks, which are greater elements and can be configured >> that they are *not* exported? > You can use drawers for that. Thanks, but could you please give me any pointer? > Regards,
Re: [O] org-ctrl-c-ctrl-c in comments
Hello, Uwe Brauer writes: > The point is that I have emails which contains tables and I don't want > to send these tables. So one possibility is to use comment blocks and > org-mime-htmlize, which does not export text in comments blocks. > > Are there other blocks, which are greater elements and can be configured > that they are *not* exported? You can use drawers for that. Regards, -- Nicolas Goaziou
Re: [O] org-ctrl-c-ctrl-c in comments
> Uwe Brauer writes: > Well, I'm not an expert on org syntax but reading the comments of > org-element.el, I see I was wrong about the other blocks: "greater > elements" can contain other elements (e.g. tables). The list of > "greater elements" given there is > , > | ;; Element containing other elements (and only elements) are called > | ;; greater elements. Concerned types are: `center-block', `drawer', > | ;; `dynamic-block', `footnote-definition', `headline', `inlinetask', > | ;; `item', `plain-list', `property-drawer', `quote-block', `section' > | ;; and `special-block'. > ` > So center-blocks, quote-blocks and special blocks allow the table to > be recognized as a table, whereas comment-blocks, src-blocks and > verse-blocks do not. The point is that I have emails which contains tables and I don't want to send these tables. So one possibility is to use comment blocks and org-mime-htmlize, which does not export text in comments blocks. Are there other blocks, which are greater elements and can be configured that they are *not* exported?
Re: [O] org-ctrl-c-ctrl-c in comments
>>> "Nick" == Nick Dokos writes: > Uwe Brauer writes: >> > Uwe Brauer writes: >> >> > Indeed - org-at-table-p gives nil if the table is inside >> > a comment or inside a source block (or inside any other block >> > afaict). >> >> Well, how could this behavior be changed? I found it quite cumbersome. > Well, I'm not an expert on org syntax but reading the comments of > org-element.el, I see I was wrong about the other blocks: "greater > elements" can contain other elements (e.g. tables). The list of > "greater elements" given there is > , > | ;; Element containing other elements (and only elements) are called > | ;; greater elements. Concerned types are: `center-block', `drawer', > | ;; `dynamic-block', `footnote-definition', `headline', `inlinetask', > | ;; `item', `plain-list', `property-drawer', `quote-block', `section' > | ;; and `special-block'. > ` > So center-blocks, quote-blocks and special blocks allow the table to > be recognized as a table, whereas comment-blocks, src-blocks and > verse-blocks do not. Ok, thanks for clarifying this. I try to convince Nicolas to customize this behavior, such that comment-blocks could be greater elements. > Nicolas et al. will surely correct any (more) mistakes in this.
Re: [O] LaTeX export with section number, name and page in internal links
> I do something like this with custom link types. Aha! I am not the only one ;) > > First of all, have a look at the variable > > org-latex-prefer-user-labels Is this a new 8.3 variable? It doesn't seem to be in my 8.2.10 MELPA version. > > if you haven't already. Setting it will cause Org to use CUSTOM_ID > properties to generate labels, so you don't need to manually insert your > own. > > I use the following bit of Elisp to define some link types for referring > to sections this way. You could modify this to insert the LaTeX command > you're interested in (as opposed to just \ref{}). With your example > above, you'd write something like I like your idea. I think you could simplify it to just: (org-add-link-type "sec" (lambda (path) (org-open-link-from-string (format "[[#%s]]" path))) (lambda (path desc format) (cond ((eq format 'latex) (format "%s~\\ref{%s}" (or desc "Section") path) and refer to [[sec:section-1]] that looks like this below. ** some title :PROPERTIES: :CUSTOM_ID: section-1 :END: > > #+BEGIN_EXAMPLE > I want reference to Section 1.1 from here (See [[sec:section-1]]). > #+END_EXAMPLE > > Here's the code: > #+BEGIN_SRC elisp > ;; Link types for targeting sections, tables, etc. > ;; These assume that headlines with CUSTOM_ID defined will export using > ;; that value as their \label keys. > (defun org-find-headline-by-custom-id (prefix path) > "Find a headline in the current buffer by CUSTOM_ID value PREFIX:PATH." > (save-excursion > (goto-char (point-min)) > (and > ; borrowed from org.el; there doesn't seem to be a function that > searches > ; for a headline with a specific property value > (re-search-forward >(concat "^[ \t]*:CUSTOM_ID:[ \t]+" prefix ":" path "[ \t]*$") nil t) > (setq pos (match-beginning 0 >(if pos >(progn >(goto-char pos) >(org-back-to-heading t)) > (message (format "Headline with CUSTOM_ID %s:%s not found." prefix > path > > (defun org-export-dissertation-link (prefix path desc format) > "Export a link to a dissertation section, etc. > > In LaTeX, the exported link will look like: > DESC~\\ref{PREFIX:PATH} > " > (when (member format '(latex linguistics)) > (format "%s~\\ref{%s:%s}" desc prefix path))) > > ; Sections: > (org-add-link-type > "sec" > (lambda (path) >(org-find-headline-by-custom-id "sec" path)) > (lambda (path desc format) >(org-export-dissertation-link "sec" path (or desc "Section") format))) > > ; etc. etc. > #+END_SRC elisp > > Best, > Richard > > OpenPGP Key ID: CF6FA646 > Fingerprint: 9969 43E1 CF6F A646 > > (See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.) -- 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
[O] Beamer export: metropolis-theme specific question
Dear fellow Orgers, I like the metropolis beamer theme a lot [1], and I use it with Org frequently. metropolis has a \plain macro that inserts a new, minimally styled slide optimal for a short statement or an image. In plain latex, I would do e.g. \begin{frame} \frametitle{a normal frame with title etc.} some content \end{frame} \plain{some text on a minimal frame} \begin{frame} \frametitle{another normal frame with title etc.} some other content \end{frame} I just cannot get my head around how to tell Org to do this! If I do * a normal frame with title etc. some content #+BEGIN_LATEX \plain{another normal frame with title etc.} #+END_LATEX * another normal frame with title etc. some other content this of course does not work. Has anyone come across this as well and is willing to share a solution? Thanks! Christian [1] https://github.com/matze/mtheme/
Re: [O] org-ctrl-c-ctrl-c in comments
Uwe Brauer writes: >> Uwe Brauer writes: > >> Indeed - org-at-table-p gives nil if the table is inside >> a comment or inside a source block (or inside any other block >> afaict). > > Well, how could this behavior be changed? I found it quite cumbersome. Well, I'm not an expert on org syntax but reading the comments of org-element.el, I see I was wrong about the other blocks: "greater elements" can contain other elements (e.g. tables). The list of "greater elements" given there is , | ;; Element containing other elements (and only elements) are called | ;; greater elements. Concerned types are: `center-block', `drawer', | ;; `dynamic-block', `footnote-definition', `headline', `inlinetask', | ;; `item', `plain-list', `property-drawer', `quote-block', `section' | ;; and `special-block'. ` So center-blocks, quote-blocks and special blocks allow the table to be recognized as a table, whereas comment-blocks, src-blocks and verse-blocks do not. Nicolas et al. will surely correct any (more) mistakes in this. -- Nick
Re: [O] org-ctrl-c-ctrl-c in comments
> Uwe Brauer writes: > Indeed - org-at-table-p gives nil if the table is inside > a comment or inside a source block (or inside any other block > afaict). Well, how could this behavior be changed? I found it quite cumbersome.
Re: [O] Base 64 inline images in html export
Hi Greg, Thanks for your patch. Do you intend to finish the patch for inclusion in Org? If so please have a look at: http://orgmode.org/worg/org-contribute.html In particular, you need to assign the copyright of your changes to FSF. You might also want to familiarize yourself with how comments are done in Emacs. In particular, they should be prose and informative. Greg Sexton writes: > I've hacked up this ugly proof of concept. I guess it wouldn't take too > much to productionize this and make the behavior configurable. Any > thoughts? I think it would be great. But how about external pictures? It seems these will not work with your patch. How about SVGs in external files? If your goal if a self-containing html what about external JS and CSS? > (defun gs/b64-img (file-uri) > (let ((file (s-replace "file://" "" file-uri))) > (if (f-exists? file) This does not warrant new > ;; src="data:image/png;base64,iVBORw0KGgoNSUh..." I don’t get the point of this comment. > (s-concat "data:image/" > (f-ext file) > ";base64," > (base64-encode-string (f-read-bytes file))) > file-uri))) > (defun org-html--format-image (source attributes info) > "Return \"img\" tag with given SOURCE and ATTRIBUTES. > SOURCE is a string specifying the location of the image. > ATTRIBUTES is a plist, as returned by > `org-export-read-attribute'. INFO is a plist used as > a communication channel." You are removing features from an existing function. > (org-html-close-tag >"img" >(org-html--make-attribute-string > (org-combine-plists > (list :src (gs/b64-img source) ; <-- interesting line is here The comment is no good. >:alt (if (string-match-p "^ltxpng/" source) > (org-html-encode-plain-text > (org-find-text-property-in-string 'org-latex-src source)) > (file-name-nondirectory source))) > attributes)) >info)) Rasmus -- Not everything that goes around comes back around, you know
Re: [O] org-ctrl-c-ctrl-c in comments
Uwe Brauer writes: >> Uwe Brauer writes: > >> You need to load ob-org. > Yes, ok I loaded it but > > #+BEGIN_SRC org :exports none > > | uwe | test | | |^ | > | hall | | | | > | | | | | > > #+END_SRC > > C-c C-c > > Does *not* lead to > > #+BEGIN_SRC org :exports none > | uwe | test | | | | > | hall | | | | | > | | | | | | > #+END_SRC Indeed - org-at-table-p gives nil if the table is inside a comment or inside a source block (or inside any other block afaict). -- Nick
Re: [O] Bug: problems with named fields on Org spreadsheet [8.3.2 (release_8.3.2-338-g522ec9 @ /home/luke/.emacs.d/el-get/org-mode/lisp/)]
Hello, Lukasz Wiechec writes: > I just have updated from previous version of Org to the latest (from > git) and my timesheet table stopped working. After looking closer, > even the example sheet from the Org mode's info pages does not work. I think this was fixed a few days ago. You probably don't use the latest Org release. Regards, -- Nicolas Goaziou
Re: [O] regression in list/heading toggling?
Hello, Eric Abrahamsen writes: > I've found what seems to be a bug in org-ctrl-c-star, toggling a > numbered list item to a proper heading. ECM is simply emacs -Q, make an > org buffer, put in the text: > > 1. > > cursor on the number, then "C-c *". Text is removed, the window jumps, > and you get "(wrong-type-argument arrayp nil)". > > I have a full traceback I can send to the list if necessary, but my > guess is it will be fairly reproduceable! Fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] org-ctrl-c-ctrl-c in comments
> Uwe Brauer writes: > You need to load ob-org. Yes, ok I loaded it but #+BEGIN_SRC org :exports none | uwe | test | | |^ | | hall | | | | | | | | | #+END_SRC C-c C-c Does *not* lead to #+BEGIN_SRC org :exports none | uwe | test | | | | | hall | | | | | | | | | | | #+END_SRC
Re: [O] org-ctrl-c-ctrl-c in comments
Uwe Brauer writes: >> On Tue, 8 Dec 2015, Uwe Brauer wrote: > >> Use an org src block and you will be able to edit natively via >> org-ctrl-c-ctrl-c. AFAICS, this behaves like `comment' in other >> respects. > > For me in GNU emacs 25.0.50.1 and org 8.3.1 the following works > >| Col1 | Col2 | >|1 | Name1 | >|2 | Name2 | >|3 | Name3 | ^ | > > ^=cursor C-c C-c gives > >| Col1 | Col2 | | >|1 | Name1 | | >|2 | Name2 | | >|3 | Name3 | | > > But that does not: > > Here is what I am doing > > > #+begin_src org :exports none :eval none > >| Col1 | Col2 | >|1 | Name1 | >|2 | Name2 | >|3 | Name3 |^ | > > #+end_src > > C-c C-c > > > Minibuffer: evaluate this org code block on your system (yes or no) > > yes > > org-babel-execute-src-block: No org-babel-execute function for org! You need to load ob-org. -- Nick
Re: [O] org-ctrl-c-ctrl-c in comments
> On Tue, 8 Dec 2015, Uwe Brauer wrote: > Use an org src block and you will be able to edit natively via > org-ctrl-c-ctrl-c. AFAICS, this behaves like `comment' in other > respects. For me in GNU emacs 25.0.50.1 and org 8.3.1 the following works | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 | ^ | ^=cursor C-c C-c gives | Col1 | Col2 | | |1 | Name1 | | |2 | Name2 | | |3 | Name3 | | But that does not: Here is what I am doing #+begin_src org :exports none :eval none | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 |^ | #+end_src C-c C-c Minibuffer: evaluate this org code block on your system (yes or no) yes org-babel-execute-src-block: No org-babel-execute function for org!
Re: [O] LaTeX-close-environment: org-close-template
> On Tuesday, 8 Dec 2015 at 10:34, Uwe Brauer wrote: > I don't. However, I find that using the easy templates (e.g. insert a src block, latex-insert-block, does the equivalent and better (in my opinion, of > course ;-). There isn't an entry for comment blocks but you can define > your own: better why? I think the opposite, for example, another missing feature: if you mark a text and one to insert a template around it, say src, that does not work in org-mode, but for it works an environment in auctex. In any case, the point is: sometimes you incidentally may delete say #+end_src, so having a function which I described spare you to copy and paste text. > ,[ C-h v org-structure-template-alist RET ] I know. I did
Re: [O] LaTeX export with section number, name and page in internal links
Hi Ilya, Ilya writes: > I export my Org-Mode notes with internal links to LaTeX and I want it to > look like this ''Section 1.1 [Section name], page 99'' (Like in the Org > Manual). I use this construction: > > #+BEGIN_EXAMPLE > * Chapter 1 > ** Section 1.1 > :PROPERTIES: > :CUSTOM_ID: section-1 > :END: > * Chapter 2 > ** Section 2.1 > I want reference to Section 1.1 from here (See #section-1) > #+END_EXAMPLE > > But as a result I get only the number of the section ''1.1'', not the > ''Section 1.1 [Section name], page 99''. > What options I need to use? I do something like this with custom link types. First of all, have a look at the variable org-latex-prefer-user-labels if you haven't already. Setting it will cause Org to use CUSTOM_ID properties to generate labels, so you don't need to manually insert your own. I use the following bit of Elisp to define some link types for referring to sections this way. You could modify this to insert the LaTeX command you're interested in (as opposed to just \ref{}). With your example above, you'd write something like #+BEGIN_EXAMPLE I want reference to Section 1.1 from here (See [[sec:section-1]]). #+END_EXAMPLE Here's the code: #+BEGIN_SRC elisp ;; Link types for targeting sections, tables, etc. ;; These assume that headlines with CUSTOM_ID defined will export using ;; that value as their \label keys. (defun org-find-headline-by-custom-id (prefix path) "Find a headline in the current buffer by CUSTOM_ID value PREFIX:PATH." (save-excursion (goto-char (point-min)) (and ; borrowed from org.el; there doesn't seem to be a function that searches ; for a headline with a specific property value (re-search-forward (concat "^[ \t]*:CUSTOM_ID:[ \t]+" prefix ":" path "[ \t]*$") nil t) (setq pos (match-beginning 0 (if pos (progn (goto-char pos) (org-back-to-heading t)) (message (format "Headline with CUSTOM_ID %s:%s not found." prefix path (defun org-export-dissertation-link (prefix path desc format) "Export a link to a dissertation section, etc. In LaTeX, the exported link will look like: DESC~\\ref{PREFIX:PATH} " (when (member format '(latex linguistics)) (format "%s~\\ref{%s:%s}" desc prefix path))) ; Sections: (org-add-link-type "sec" (lambda (path) (org-find-headline-by-custom-id "sec" path)) (lambda (path desc format) (org-export-dissertation-link "sec" path (or desc "Section") format))) ; etc. etc. #+END_SRC elisp Best, Richard OpenPGP Key ID: CF6FA646 Fingerprint: 9969 43E1 CF6F A646 (See http://www.ocf.berkeley.edu/~rwl/encryption.html for more information.)
Re: [O] org-ctrl-c-ctrl-c in comments
On Tue, 8 Dec 2015, Uwe Brauer wrote: Hello I have some tables in comment blocks like #+begin_comment | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 | #+end_comment But within a comment org-ctrl-c-ctrl-c does not work. So I cannot reformat the table. How can I enable it? Use an org src block and you will be able to edit natively via org-ctrl-c-ctrl-c. AFAICS, this behaves like `comment' in other respects. #+begin_src org :exports none :eval never | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 | #+end_src HTH, Chuck
Re: [O] org-ellipsis problem
On Monday, 30 Nov 2015 at 15:10, Dan Griswold wrote: > Hi all, > > Setting org-ellipsis (either via setq or customize) has no effect for me. > Org buffers still show three dots at the end of folded lines instead of the > character I give to org-ellipsis. Even restarting emacs > does not give the intended result. Maybe show us how you actually do it? What version of org? What is your intended result (just in case)? I have (setq org-ellipsis " ▸") in my customisation and it works just fine. -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-379-g38fd09
Re: [O] LaTeX-close-environment: org-close-template
On Tuesday, 8 Dec 2015 at 10:34, Uwe Brauer wrote: > Hello > > Auctex has a nice function called LaTeX-close-environment, which works > as follows: I have > > \begin{equation} > > ^(cursor) > > I run LaTeX-close-environment and obtain: > \begin{equation} > > \end{equation} > > Now could I am looking for a similar functionality for say > > #+begin_comment > > ^(cursor) > > org--close-template and obtain: > > #+begin_comment > > #+end_comment > > Does anybody know about such a function? I don't. However, I find that using the easy templates (e.g. \n?\n") | ("e" "#+begin_example\n?\n#+end_example" "\n?\n") | ("h" "#+begin_html\n?\n#+end_html" "\n?\n") | ("H" "#+html: " "?") | ("i" "#+index: ?" "#+index: ?") | ("I" "#+include %file ?" "") | ("l" "#+begin_latex\n?\n#+end_latex" "\n?\n") | ("L" "#+latex: " "?") | ("q" "#+begin_quote\n?\n#+end_quote" "\n?\n") | ("s" "#+begin_src ?\n\n#+end_src" "\n\n") | ("v" "#+begin_verse\n?\n#+end_verse" "\n?\n") | ("w" "#+begin_whitebox\n?\n#+end_whitebox")) | | Original value was | (("s" "#+BEGIN_SRC ?\n\n#+END_SRC") | ("e" "#+BEGIN_EXAMPLE\n?\n#+END_EXAMPLE") | ("q" "#+BEGIN_QUOTE\n?\n#+END_QUOTE") | ("v" "#+BEGIN_VERSE\n?\n#+END_VERSE") | ("V" "#+BEGIN_VERBATIM\n?\n#+END_VERBATIM") | ("c" "#+BEGIN_CENTER\n?\n#+END_CENTER") | ("l" "#+BEGIN_LaTeX\n?\n#+END_LaTeX") | ("L" "#+LaTeX: ") | ("h" "#+BEGIN_HTML\n?\n#+END_HTML") | ("H" "#+HTML: ") | ("a" "#+BEGIN_ASCII\n?\n#+END_ASCII") | ("A" "#+ASCII: ") | ("i" "#+INDEX: ?") | ("I" "#+INCLUDE: %file ?")) ` HTH, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-379-g38fd09
[O] evaluation issue with ocaml code (due to changes to org-babel-comint-with-output)
Hello, I have found that commit f0bf77e82a3d37ba7548aa40198bc982e9875f1b breaks evaluation of ocaml code. With the following init file (the `package-initialize' is there for tuareg to be available): #+begin_src emacs-lisp (add-to-list 'load-path "/Users/schmitta/projets/org-mode/lisp") (require 'org) (package-initialize) (org-babel-do-load-languages 'org-babel-load-languages '((ocaml . t))) #+end_src When I evaluate this block I get this result: #+BEGIN_SRC ocaml :results code verbatim :exports results 1 + "toto";; #+END_SRC #+results: #+BEGIN_SRC ocaml Characters 4-10: 1 + "toto" ^^ Error: This expression has type string but an expression was expected of type int #+END_SRC After commit f0bf77e82a3d37ba7548aa40198bc982e9875f1b I get this: #+results: #+BEGIN_SRC ocaml ;; ^^ Error: This expression has type string but an expression was expected of type int #+END_SRC I tried to debug this but `org-babel-comint-with-output' is a macro and I don't know how to debug macros … Thanks for any help regarding this (for instance telling me how to edebug macros). Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Athmospheric CO₂ (Updated December 6, 2015, Mauna Loa Obs.): 400.80 ppm signature.asc Description: PGP signature
Re: [O] LaTeX export with section number, name and page in internal links
> 03.12.2015, 16:31, "John Kitchin" : > > Try this. > > * Chapter 1 > ** Section 1.1 \label{manual-section-1} > :PROPERTIES: > :CUSTOM_ID: section-1 > :END: > * Chapter 2 > ** Section 2.1 > I want reference to Section 1.1 from here (See Section \ref > {manual-section-1} on page \pageref{manual-section-1}) This, and its limitations (what if the pageref is on the same page?) is why fancyref was created. I think the solution here is to have a #+LATEX_HEADER: \renewcommand{\fref}{\ref} or something like that, but I'm not sure of the exact syntax. -k.
Re: [O] Embedding and extracting license/author information in an image file
John Kitchin writes: > This is usually done manually in a citation in the caption I think. I'm using it for beamer presentations for teaching, I'd rather have them all at the end of the pdf. > This would not work reliably. I could imagine an insert figure link > which would check for the data and do that, or perhaps a > post-insert-link hook function, but neither of these would work if you > simply type in a link. What should happen with images that don't contain > the data? I guess being able to write and read the metadata from emacs would be enough for now. > None I know of. I looked at something similar for pdf, but did not find > anything but external programs. As I mentioned image-dired has image-dired-set-exif-data and image-dired-get-exif-data: it might be useful. Julien.
Re: [O] what is atril?
Thank you Richard and Johann. In the future I must remember to check the packages list (in this case that comes with LMDE2) as well as aptitude and apt-cache. It never occurred to me that it was related to a pdf reader since my output opens in Evince. Have to check further into atril. Charlie On 12/06/2015 04:49 PM, Charles Millar wrote: I just noticed that after I export a subtree to latex the following appears in the minibuffer running atril /path/to/output/file What is atril? I have tried info-apropos, C-h f, C-h v, Google, etc. Charlie Millar
Re: [O] Problems with capture
Hi Nicolas, replying to myself :-), I dug a little deeper into this. · Thomas Holst wrote: > Hi Nicolas, > · Nicolas Goaziou wrote: >> Thomas Holst writes: > >> [...snip...] > > after a git-pull the first error (about cache) is gone. The second error > still is there: > >>> condition-case: Capture template `hr': Invalid table line specification >>> "III-1" > > The table which was inserted looks like this: > #+begin_src org > ** OPEN [2015-12-08 Di] Rechnungen > #+NAME: akt-vers-rechnungen > > |---+---+--+-++---+-++-| > | ! | Datum | Arzt | f+r wen | Betrag | wann bez. | wann bearb. | wann erh. > Vers | wann erh. Beih. | > > |---+---+--+-++---+-++-| > > |---+---+--+-++---+-++-| > | # | | | | 0.00 | | | > 0.00 |0.00 | > > |---+---+--+-++---+-++-| > #+TBLFM: $8=$5*0.2;%.2f::$9=$5*0.8;%.2f::@2$5=vsum(@-II..@-I);%.2f > #+end_src > After creation point is at beginning of headline (left of the two *). > From my point of view table line specification "III-1" is ok. > > Thanks for looking into this. The culprit is `org-capture-place-table-line'. It narrows the buffer to relevant table but leaves point at the beginning of an empty line. `org-table-analyze' does not any table and exits with nil. For me the following patch fixes the problem: #+begin_src diff 1 file changed, 1 insertion(+) lisp/org-capture.el | 1 + modified lisp/org-capture.el @@ -1156,6 +1156,7 @@ may have been stored before." (goto-char end) (insert "\n| |\n||\n||\n") (narrow-to-region (1+ end) (point))) +(goto-char (point-min)) ;; We are narrowed to the table, or to an empty line if there was no table ;; Check if the template is good #+end_src Maybe there is a better way to fix this. Thanks again for lookint into this. -- Mit freundlichen Grüßen / Best regards Thomas Holst
Re: [O] More questions about CSL and org-mode
>> On export the in-text citations are transformed to unique text blobs, >> e.g. uuids, and the document exported. The only important features of >> these blobs is that they do not get changed on export, and they are >> unique because we replace them later. >> >> The strings in the bibliography entry are "exported" to convert the >> org-markup to the output format. The in-text citations, expanded >> bibliography and style are sent to the citation processor, which outputs >> replacements and a formatted bibliography in the desired output format. >> >> Finally, you replace each uuid with the appropriate replacement, and >> insert the bibliography where it belongs. That should be the final >> document. > > IIUC, the problem with this approach is that it will not work well when > the citation style is note-based rather than inline. The main > motivation for going "back to Org" is that note-based styles require the > document structure to change as a result of citation processing: new > footnotes have to be inserted, and existing ones have to be renumbered. > That is relatively hard to do if the rest of the document is already in > the target format (except with LaTeX). By doing citation processing > early in the export process and converting the results to Org, we can > rely on Org's footnote processing to handle this later in the export > process. I guess I don't understand what note-based citations look like, or why you would have to renumber footnotes in this process. Does the order change for some reason? Even if it does, it sounds like this might just require another pass of calculations to figure out how to replace things. Any chance you could send me a document with note-based citations? One place where text-based replacement doesn't work I guess is outputs that aren't plain text based. Maybe, for example, to ODT where the output creates multiple xml files in a zip file? > As far as I can see, if it weren't for note-based styles, this approach > would work fine. (Indeed, it is pretty much what the existing org-cite > code does, except that the mapping between citations and their > replacements is done with Lisp data structures rather than via string > replacement in the output buffer. I stopped work on that right about > the time I realized the existing approach wouldn't work very well with > note-based styles.) > > But given the problem about nested formatting, going back to Org at the > level of text replacements doesn't work. In other words: both of the > simple-minded approaches (process citations directly to text in the > target format, or process them to Org text, then let Org convert them to > the target format) face problems. > > I think probably what we'll have to do to accommodate both note-based > styles and the possibility of nested formatting is to get the results of > citation processing in some unambiguous format like HTML or JSON, then > parse it, and then use the result to directly modify the parse tree for > the Org document before continuing the export process. I can't see an > easier way...can anyone else? Like getting an xml citation, and then using xslt to translate it to the format you want? Or something equivalent? Your translation would still have to be clever to avoid nested syntax, which I guess requires some recursive parsing of the output. Modifying the parse tree is more elegant than the replacement text idea. I have to learn how to do this one day ;) > > Best, > Richard -- 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
Re: [O] Embedding and extracting license/author information in an image file
Julien Cubizolles writes: > I often include images in my org documents and would like to properly > cite the license, and/or author. This is usually done manually in a citation in the caption I think. >I was thinking that this could be > simplified by: > > * embedding the license/author information in some metadata of the jpg > or png file (it seems that some standard called xmp can be used to > embed data in png/jpg [fn:1]) preferably using some emacs tool Making the xml would not be too difficult in emacs, but I guess you would have to call some external program to insert xmp into the images. > > * getting org to add a footnote with this information when linking to a > file with this kind of information. This would not work reliably. I could imagine an insert figure link which would check for the data and do that, or perhaps a post-insert-link hook function, but neither of these would work if you simply type in a link. What should happen with images that don't contain the data? > > Could it be done? Do you know of an emacs package providing read/write > access to this metadata? None I know of. I looked at something similar for pdf, but did not find anything but external programs. > > Footnotes: > > [fn:1] https://en.wikipedia.org/wiki/Extensible_Metadata_Platform -- 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
[O] LaTeX-close-environment: org-close-template
Hello Auctex has a nice function called LaTeX-close-environment, which works as follows: I have \begin{equation} ^(cursor) I run LaTeX-close-environment and obtain: \begin{equation} \end{equation} Now could I am looking for a similar functionality for say #+begin_comment ^(cursor) org--close-template and obtain: #+begin_comment #+end_comment Does anybody know about such a function? Regards Uwe Brauer
[O] org-ctrl-c-ctrl-c in comments
Hello I have some tables in comment blocks like #+begin_comment | Col1 | Col2 | |1 | Name1 | |2 | Name2 | |3 | Name3 | #+end_comment But within a comment org-ctrl-c-ctrl-c does not work. So I cannot reformat the table. How can I enable it? regards Uwe Brauer
Re: [O] Embedding and extracting license/author information in an image file
Eric S Fraga writes: > On Monday, 7 Dec 2015 at 22:08, Julien Cubizolles wrote: >> I often include images in my org documents and would like to properly >> cite the license, and/or author. I was thinking that this could be >> simplified by: >> >> * embedding the license/author information in some metadata of the jpg >> or png file (it seems that some standard called xmp can be used to >> embed data in png/jpg [fn:1]) preferably using some emacs tool > > I use jhead for adding a copyright statement to my photos (in > JPEG). Thanks, is there a dedicated field for copyright statements ? Did some good soul already code some lisp around it ? Julien.
Re: [O] Embedding and extracting license/author information in an image file
Eric S Fraga writes: > On Monday, 7 Dec 2015 at 22:08, Julien Cubizolles wrote: >> I often include images in my org documents and would like to properly >> cite the license, and/or author. I was thinking that this could be >> simplified by: >> >> * embedding the license/author information in some metadata of the jpg >> or png file (it seems that some standard called xmp can be used to >> embed data in png/jpg [fn:1]) preferably using some emacs tool > > I use jhead for adding a copyright statement to my photos (in > JPEG). Thanks, is there a dedicated field for copyright statements ? Did some good soul already code some lisp around it ? Julien.
Re: [O] [PATCH] ox-extra.el: Fix filtering of latex header blocks
BUMP ??? Best wishes, Sebastian
[O] Use synctex for latex export
While some are trying to get org<->pdf syncing with synctex, I'm still struggling with getting synctec syncing between the pdf file and the tex file generated from an org file. I thought adding --synctex=1 to org-latex-pdf-process would be enough but it doesn't work. Julien.
Re: [O] Embedding and extracting license/author information in an image file
On Monday, 7 Dec 2015 at 22:08, Julien Cubizolles wrote: > I often include images in my org documents and would like to properly > cite the license, and/or author. I was thinking that this could be > simplified by: > > * embedding the license/author information in some metadata of the jpg > or png file (it seems that some standard called xmp can be used to > embed data in png/jpg [fn:1]) preferably using some emacs tool I use jhead for adding a copyright statement to my photos (in JPEG). -- : Eric S Fraga (0xFFFCF67D), Emacs 24.5.1, Org release_8.3.2-379-g38fd09
Re: [O] Embedding and extracting license/author information in an image file
Rasmus writes: > You could probably use exiftool with org-babel or dynamic blocks to > extract the required data and generated the syntax you want. Thanks for the pointer, I'll give it a try with image-dired-get-exif-data, and image-dired-set-exif-data. There doesn't seem to be an interactive use for the latter, that's unfortunate: you can't add an exif tag from dired. Julien.
[O] regression in list/heading toggling?
Hi all, I've found what seems to be a bug in org-ctrl-c-star, toggling a numbered list item to a proper heading. ECM is simply emacs -Q, make an org buffer, put in the text: 1. cursor on the number, then "C-c *". Text is removed, the window jumps, and you get "(wrong-type-argument arrayp nil)". I have a full traceback I can send to the list if necessary, but my guess is it will be fairly reproduceable! Thanks, Eric
Re: [O] Problems with capture
Hi Nicolas, · Nicolas Goaziou wrote: > Thomas Holst writes: > [...snip...] after a git-pull the first error (about cache) is gone. The second error still is there: >> condition-case: Capture template `hr': Invalid table line specification >> "III-1" The table which was inserted looks like this: #+begin_src org ** OPEN [2015-12-08 Di] Rechnungen #+NAME: akt-vers-rechnungen |---+---+--+-++---+-++-| | ! | Datum | Arzt | für wen | Betrag | wann bez. | wann bearb. | wann erh. Vers | wann erh. Beih. | |---+---+--+-++---+-++-| |---+---+--+-++---+-++-| | # | | | | 0.00 | | | 0.00 |0.00 | |---+---+--+-++---+-++-| #+TBLFM: $8=$5*0.2;%.2f::$9=$5*0.8;%.2f::@2$5=vsum(@-II..@-I);%.2f #+end_src After creation point is at beginning of headline (left of the two *). >From my point of view table line specification "III-1" is ok. Thanks for looking into this. -- Mit freundlichen Grüßen / Best regards Thomas Holst DGS-EC/ESE4 Tel. +49 (711) 811-40681 PC-Fax +49 (711) 811-5182208