[O] Problem with org-indent-block
Hi, Recently, I started to get problems with org-indent-block returning errors Not at a block. Unfortunately, this is happening while restarting emacs, and I have no idea about how to debug it. It would be nice if somehow this function could give the file and the point in the file where the error is happening. Any idea on how to achieve this? To make it clearer, it seems that this user-error stops the loading of my prelude based configuration. Nothing is loaded after reporting it, and especially not my own Org configuration file. Thanks for any hint, Fabrice
[O] [babel][table] Passing argument to Python code block using org-sbe
Consider the following code: -8-- #+NAME: test #+BEGIN_SRC python :var x=foobar return len(x) #+END_SRC -8-- It is possible to call this, as follows: -8-- #+CALL: test(x=fb) -8-- However, I fail to call this function and pass an argument to it when using org-sbe: -8-- | 6 | #ERROR | #+TBLFM: @1$1='(org-sbe test)::@1$2='(org-sbe test (x (fb))) -8-- I tried several possibilities, but nothing worked. Is it at all possible? Thanks in advance, Dror PS: I posted also a SE question: http://stackoverflow.com/q/25789183/671013
Re: [O] specifying the coding language resulting from a a :results code source block
Indeed, this seems to do the trick! Thanks! On Thu, Sep 11, 2014 at 8:19 PM, Ista Zahn istaz...@gmail.com wrote: Can't you just do #+begin_src foo :wrap src bar hello world #+end_src ? Best, Ista On Thu, Sep 11, 2014 at 5:11 AM, Dror Atariah dror...@gmail.com wrote: Is there some change in the status of this issue? Can one now specify the language of the result? Cheers, Dror -- Mahalo Tom, It looks like that's what I'll be doing for the ruby block. That said, it would be great if the :results code argument would allow a language specification. Greg On Jun 27, 2012, at 10:22 AM, Thomas S. Dye wrote: Greg Tucker-Kellogg address@hidden writes: I have a Ruby block that creates some dot code. I'd like to be able to have the #+RESULTS block enclosed in a src block that starts #+BEGIN_SRC dot. Using :results value code generates the enclosing SRC block, but using the same language (Ruby) used to generate the code. Is there a way to specify the coding language of a generated #+RESULTS src block? Thanks, Greg Aloha Greg, This works for me with an emacs-lisp code block named harris-matrix that generates dot code. #+header: :var input=harris-matrix #+header: :file temp.pdf #+header: :cmdline -Tpdf #+header: :results output #+BEGIN_SRC dot $input #+END_SRC It's not quite what you were after, but it might help? All the best, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Problem with org-indent-block
Hello, Fabrice Popineau fabrice.popin...@gmail.com writes: Recently, I started to get problems with org-indent-block returning errors Not at a block. Unfortunately, this is happening while restarting emacs, and I have no idea about how to debug it. AFAICT, nothing in the code base calls `org-indent-block' automatically. Out of curiosity, is there something in your setup doing this? It would be nice if somehow this function could give the file and the point in the file where the error is happening. Any idea on how to achieve this? It is an interactive function, so the user is expected to know where he called it. Anyway, you could modify function in org.el to use: (user-error Not at a block in %s, line %s (buffer-name) (org-current-line)) It will probably help understanding the issue. Regards, -- Nicolas Goaziou
Re: [O] [PATCH] org-table-beginning/end-of-field
Hello, Florian Beck f...@miszellen.de writes: Thanks for your feedback. This I did. Well, (or (org-element-get 'table-cell) ;; Fuzzy matching when on a table border: (org-element-get 'table-cell (1+ (point))) (org-element-get 'table-cell (1- (point is not necessary, since the first object/element returned should give you enough information. Also, I forgot the following case: | a | b | |---+-X-| | c | d | I think a correct analysis of the current object can solve all tricky cases, without blindly poking around. X | a | b | | c | d | | a | b | X | c | d | | a | b | X | c | d | This is arguably outside the scope of org-table-beginning/end, isn't it? The current implementation handles them (sometimes incorrectly). I find this sloppiness useful. Come to think of it, these functions should only move to the beginning or end of the field, period. Then handle the special case in org-forward/backward-sentence or create two new functions. OTOH, is it really useful to isolate beginning/end-of-field feature? I'm not sure, but feel free to try if you think it can make the code better. (defun org-element-parent (blob optional types genealogy) Return BLOB's parent, or nil. BLOB is an object or element. When optional argument TYPES is a list of symbols, return the first element or object between BLOB and its ancestors whose type belongs to that list. When optional argument GENEALOGY is non-nil, return a list of all ancestors, from closest to farthest. When BLOB is obtained through `org-element-context' or `org-element-at-point', only ancestors from its section can be found. There is no such limitation when BLOB belongs to a full parse tree. (if (not (or types genealogy)) (org-element-property :parent blob) (let ((up blob) ancestors) (while (and up (not (memq (org-element-type up) types))) (when genealogy (push up ancestors)) (setq up (org-element-property :parent up))) (if genealogy (nreverse ancestors) up Its name is a bit confusing since it can return BLOB under some optional argument combination (i.e., if BLOB's type belongs to TYPES). However, it covers most, if not all, needs about ancestors. WDYT? Yes this works. Making TYPES into a list is a nice touch. However: - the advertised functionality (returning the parent) is only marginally useful and handled in half a line of code; whereas most of the functionality is hidden as optional; That's my intention. The functionality is very common so there is a high chance that it will be remembered. It is possible to separate the features and create, let's say, `org-element-genealogy'. However, in this case, I lean towards overloading a common function instead of creating a dedicated niche one. - this leads to confusing behaviour, as you have noted, because the type of object I'm looking for, is not necessarily the parent; This is why it can return the current object when TYPES is provided. If we create another function, you will need to check both the current item and the return value of that function. - BLOB on the other hand should be optional, because defaulting it to org-element-context would be highly useful. I don't consider highly useful the fact that you could call (org-element-parent) instead of (org-element-parent (org-element-context)) However I see two drawbacks in this optional argument: it hides the call to most expensive function and `org-element-context' is not always what you want (there's no reason to prefer it over `org-element-at-point' and the other way around). Eventually, I'd like to keep `org-element-at-point', `org-element-context' and `org-element-parse-buffer' as the highest level functions in org-element.el (i.e., no other function should call them there). Using these functions is out of the scope of the parser. - not sure what GENEALOGY is useful for; You may grep for `org-export-get-genealogy'. There are a couple of places where this one is used. Actually, this function would also generalize: - `org-export-get-parent-headline' - `org-export-get-parent-element' - `org-export-get-parent-table' if the user also specified TYPES, this returns the ancestors up to but NOT including those of TYPE. I admit I didn't put more thoughts into TYPES + GENEALOGY combination. Of course, if this function is implemented, I agree it should also include the first element matching TYPES. That's another possibility. Unlike a link without description, one might argue that an empty cell has a natural contents position. For the time being, I prefer all parsing functions to be consistent. Regards, -- Nicolas Goaziou
Re: [O] Non-breaking space
My 2 cents: \newcommand{\sectionref}[1]{Section~\ref{#1}} and then write \sectionref{bla} instead of Section~\ref{bla} and ditto for figure, etc.
[O] bug#18401: 24.4.50; emerge-files fails for org files
Hi Glenn, Detlev Zundel wrote: problem and lingers for a while now. Who can merge the org repository? Is there something that an outsider like me can do to help? Thanks for asking! :) Anyone with a copy of the Org repo and the Emacs repo can generate the diff that needs to be applied from the former to the latter. Anyone with write access to the Org repo can get write access to the Emacs repo and apply that diff. (This is a generalization, but I think it is true. E.g. I assume all people with Org write access have FSF assignments.) However, I think this is wasted effort, so I have suggested not doing it any more; http://lists.gnu.org/archive/html/emacs-devel/2014-08/msg00298.html . Ok, I see. So it seems there is nothing I can do after all. My original problem indeed is solved having installed org from elpa. Best wishes Detlev -- The Buddha, the Godhead, resides quite as comfortably in the circuits of a digital computer or the gears of a cycle transmission as he does at the top of a mountain or in the petals of a flower. To think otherwise is to demean the Buddha - which is to demean oneself. -- Robert M. Pirsig
Re: [O] org-crypt doesn't automatically encrypt on save
Darlan Cavalcante Moreira darc...@gmail.com writes: You need to load org-crypt and call org-crypt-use-before-save-magic before you open the org file. I have this in my config: (add-to-list 'org-modules 'org-crypt) (require 'org-crypt) So I think that's what is done. I also checked org-mode-hook on a fresh start of emacs, and it does include a stanza for org-encrypt-entries. C-h v org-mode-hook begins with this: - Value: (#[nil \300\301\302\303\304$\207 [org-add-hook before-save-hook org-encrypt-entries nil t] 5] - So I think that part is ok. Now I visit a new file, say test.org, which doesn't exist yet. I create one heading with a bit of content, tag it as :crypt:, and save the file. Bam, it's not encrypted. Now I call M-x org-encrypt-entries, and the heading is encrypted. So org-crypt does work, I can decrypt and encrypt headings manually, but it won't do it automatically. And indeed, before-save-hook is nil in a fresh org file and stays so when I visit an org file. Now I call M-x org-mode on that file, add a space so it is modified and I can save it, call C-x C-s, and it is encrypted as it should. org-mode set before-save-hook to (org-encrypt-entries t) as it should. Only I have to manually call org-mode once the file is open, it won't do it automatically. I C-x k the file, re-visit it, and I have to call M-x org-mode on it again before it will automatically encrypt the headings. All other org-mode functionnality seems to work fine. Any idea ? Thanks, -- Rémi
[O] How to put times into tables
Hi list, I'm preparing a scenario of an event, and I'd like to have a table like this: | Time | Duration | What happens | | | (minutes) | | |---+---+--| | 10:00 |10 | ... | | 10:10 | 2 | | | 10:12 | 5 | | | 10:17 | | | Is it possible to devise some smart formula to put into column one, so that I only have to fill in the Duration column? I skimmed through the Calc manual, but didn't found much about displaying HMS forms /without seconds/. TIA, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] Non-breaking space
Dnia 2014-09-12, o godz. 08:18:39 Erwan jah...@imag.fr napisał(a): My 2 cents: \newcommand{\sectionref}[1]{Section~\ref{#1}} and then write \sectionref{bla} instead of Section~\ref{bla} and ditto for figure, etc. My 2 cents: or just use the cleveref package instead of reinventing the wheel;-), write \cref{bla} or \Cref{bla} and let LaTeX remember whether {bla} is a~section, subsection, equation, theorem or whatever. Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Adam Mickiewicz University
Re: [O] org-ref no key found
Hi John, I am resending this... I think it did not went through the previous time. I think I can replicate the org-ref bug now (if it is a bug). This is the situation: a) If I open emacs, load a file that already has some link, and click on the link (or place the cursor on it and press enter) I get the no key found message and I cannot open the notes file (I get a Wrong type argument: stringp, nil), although the link to the pdf file works. If I open more than one file, links do not work in any of them. At this point if I check the value of the org-ref-default-bibliography variable, I get the correct path and filename of my .bib file. b) If I insert a new citation (using Ctrl-]) in any of the documents, links work as they should in all documents (this is, I get the title and I can open the notes file). I should say that I am not using the org-ref-insert-bibliography-link function, because I use biblatex and I prefer to insert the Latex \printbibliography command. But if use it and insert the bibliography link, the behaviour does not change. This is what I have in my .emacs file that is related to RefTex and org-ref: -- ;; Load RefTex (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode (autoload 'reftex-mode reftex RefTeX Minor Mode t) (autoload 'turn-on-reftex reftex RefTeX Minor Mode nil) (autoload 'reftex-citation reftex-cite Make citation nil) (autoload 'reftex-index-phrase-mode reftex-index Phrase mode t) (add-hook 'LaTeX-mode-hook 'turn-on-reftex) ; with AUCTeX LaTeX mode (add-hook 'latex-mode-hook 'turn-on-reftex) ; with Emacs latex mode ;; Make RefTeX faster (setq reftex-enable-partial-scans t) (setq reftex-save-parse-info t) (setq reftex-use-multiple-selection-buffers t) (setq reftex-plug-into-AUCTeX t) (setq reftex-default-bibliography '(/home/julian/Documents/Refs/BibTex/references.bib)) (setq reftex-sort-bibtex-matches author) ; Sort entries found in BibTex database (setq bibtex-dialect biblatex) -- (require 'org-ref) (setq org-ref-bibliography-notes /home/julian/Documents/org files/notes.org org-ref-default-bibliography '(/home/julian/Documents/Refs/BibTex/references.bib) org-ref-pdf-directory /home/julian/Documents/Refs/) (setq org-ref-default-citation-link parencite) -- Below I am sending you very simple .org and .bib files that (in my computer) reproduce this behaviour. In this file I did use org-ref-insert-bibliography-link. Let me know if I can give you any other information. All the best, Julian --Start trial.org file * Trial Some references parencite:Brown2011a,Hobbs2006 bibliography:~/Documents/trial.bib --End trial.org file - --Start trial.bib file Article{Brown2011a, Title= {Quantitative approaches in climate change ecology}, Author = {Brown, C.J. and Schoeman, D.S. and Sydeman, W.J. and Brander, K. and Buckley, L.B. and Burrows, M. and Duarte, C.M. and Moore, P.J. and Pandolfi, J.M. and Poloczanska, E. and others}, Journaltitle = {Global Change Biology}, Year = {2011}, Crossref = {burnhm}, File = {:Brown2011a.pdf:PDF}, Publisher= {Wiley Online Library} } @Article{Hobbs2006, Title= {Alternatives to statistical hypothesis testing in ecology: a guide to self teaching}, Author = {Hobbs, N.T. and Hilborn, R.}, Journaltitle = {Ecological Applications}, Year = {2006}, Number = {1}, Pages= {5--19}, Volume = {16}, Crossref = {Quick2010}, File = {:Hobbs2006.pdf:PDF}, Publisher= {Eco Soc America} } --End trial.bib file - Julian M. Burgos writes: John, for some weird reason everything seems to be working now. Thanks for your help... I will let you know if I break it again. John Kitchin writes: that is odd. this means org-ref is not finding the key you clicked on. could you send me a small example that reproduces your problem (an org-file and the bib file)? Julian M. Burgos jul...@hafro.is writes: Hi John, No, they still do not work even after I click on the bibliography link and get my .bib file opened. Julian John Kitchin writes: Julian M. Burgos jul...@hafro.is writes: If you click on the bibliography link to open the file, and then go
Re: [O] Problem with org-indent-block
Thanks for your hint. The problem was not in in org.el:org-indent-block but in org.el:org-hide-block-toggle. This function should toggle special-block blocks too, else it barfs on them. In my setup, when an org file is restored by desktop.el, global visibility is set, which triggers calls to org-hide-block-all. Fabrice 2014-09-12 9:53 GMT+02:00 Nicolas Goaziou m...@nicolasgoaziou.fr: Hello, Fabrice Popineau fabrice.popin...@gmail.com writes: Recently, I started to get problems with org-indent-block returning errors Not at a block. Unfortunately, this is happening while restarting emacs, and I have no idea about how to debug it. AFAICT, nothing in the code base calls `org-indent-block' automatically. Out of curiosity, is there something in your setup doing this? It would be nice if somehow this function could give the file and the point in the file where the error is happening. Any idea on how to achieve this? It is an interactive function, so the user is expected to know where he called it. Anyway, you could modify function in org.el to use: (user-error Not at a block in %s, line %s (buffer-name) (org-current-line)) It will probably help understanding the issue. Regards, -- Nicolas Goaziou
Re: [O] org-crypt doesn't automatically encrypt on save
Darlan Cavalcante Moreira writes: In my case I only have one file where I use org-crypt and I define the function below --8---cut here---start-8--- (defun my-find-senhas-org-heading nil (interactive) (require 'org-crypt) (find-file ~/org/passwords.org) ) --8---cut here---end---8--- If you only use one file for your passwords and want it encrypted (that you should), you can also check org-passwords.el that is included in the contrib directory. Best, -- Jorge.
Re: [O] org-crypt doesn't automatically encrypt on save
One note first, if you change org-modules manually like that you must make sure this change is done before org-mode is loaded. I prefer to use the customize interface just for org-modules for that reason. I also add org-crypt to org-modules like you do. If I open my password.org file and open it directly I will have the same behaviour you get. Maybe the save magic does not work reliable when org-crypt is loaded through org-modules, I'm not sure. When I call my function that requires org-crypt and calls org-crypt-use-before-save-magic before opening my password file everything works. But I only do it like this because I have a single file with encrypted entries and I prefer to delay loading org-crypt initialization. I profiled my configuration some time ago and decided to do that to reduce i little bit the initialization time. Since you already require org-crypt, just add (org-crypt-use-before-save-magic) after the require and see if that solves your problem. Rémi Letot writes: Darlan Cavalcante Moreira darc...@gmail.com writes: You need to load org-crypt and call org-crypt-use-before-save-magic before you open the org file. I have this in my config: (add-to-list 'org-modules 'org-crypt) (require 'org-crypt) So I think that's what is done. I also checked org-mode-hook on a fresh start of emacs, and it does include a stanza for org-encrypt-entries. C-h v org-mode-hook begins with this: - Value: (#[nil \300\301\302\303\304$\207 [org-add-hook before-save-hook org-encrypt-entries nil t] 5] - So I think that part is ok. Now I visit a new file, say test.org, which doesn't exist yet. I create one heading with a bit of content, tag it as :crypt:, and save the file. Bam, it's not encrypted. Now I call M-x org-encrypt-entries, and the heading is encrypted. So org-crypt does work, I can decrypt and encrypt headings manually, but it won't do it automatically. And indeed, before-save-hook is nil in a fresh org file and stays so when I visit an org file. Now I call M-x org-mode on that file, add a space so it is modified and I can save it, call C-x C-s, and it is encrypted as it should. org-mode set before-save-hook to (org-encrypt-entries t) as it should. Only I have to manually call org-mode once the file is open, it won't do it automatically. I C-x k the file, re-visit it, and I have to call M-x org-mode on it again before it will automatically encrypt the headings. All other org-mode functionnality seems to work fine. Any idea ? Thanks,
[O] Get :PROPERTY: value from drawer in other heading during HTML export?
When generating an HTML file from an org-mode document, I'd like to do a GET operation to retrieve a property value from the drawer of an arbitrary heading, using the CUSTOM_ID property to identify the heading. From Google-searching, I suspect that org-heading-components will be involved, but I'm not proficient enough in elisp to be able to figure out how to use it from the on-line examples I've found --- and I'm not proficient enough in Emacs to use any built-in documentation about it (apropos doesn't produce any results). Here's an example, where GET-PROP is a macro I'd like to use: ==BEGIN== #+MACRO: get-prop [] #+MACRO: get-title [omitted -- thanks to Nicolas Goaziou for the get-title macro, at https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00386.html] * CLAUSES ** Affiliate status from voting control :PROPERTIES: :CUSTOM_ID: AffilDefn :CD-ID: AFFIL-VOTE :IMPORTANCE: Situational :PUSHBACK: Unlikely :END: (a) One individual or organization (Person) is an {{{DEFN(Affiliate)}}} of another Person if, directly or indirectly via one or more intermediaries, one of those Persons /controls/ (as defined in subdivision (b) below), or is controlled by, or is under common control with, the other Person. (b) [other text omitted] * CONTRACT TEMPLATES ** Nondisclosure Agreement {{{GET-PROP(AffilDefn,CD-ID)}}}: {{{GET-TITLE(AffilDefn)}}} -- pushback from the other side is {{{GET-PROP(AffilDefn,PUSHBACK)}}}. # This should export to: # AFFIL-VOTE: Affiliate status from voting control -- pushback from the other side is: Unlikely. ==END== Thanks in advance, --D. C. *D*ell *C*harles D. C. Toedt III *(my** last name is pronounced Tate) * Attorney and neutral arbitrator -- tech contracts and intellectual property Lecturer, University of Houston Law Center Editor, Common Draft http://www.commondraft.org/ project: A readable library of best-practices contract clauses, with extensive citations and commentary, updated often. d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt Calendar https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK (redacted) O: +1 (713) 364-6545C: +1 (713) 516-8968 Houston, Texas (Central time zone) Unless expressly stated otherwise, this message is not intended to serve as an electronic signature nor as assent to an agreement.
[O] Boxquote for code in UTF-8 export
Hello, I'd advice to use UTF-8 characters more wildly available in the different fonts for drawing the Boxquote around code, in function: ╭ │ (defun org-ascii--box-string (s info) │ Return string S with a partial box to its left. │ INFO is a plist used as a communication channel. │ (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))) │ (format (if utf8p ╭\n%s\n╰ ,\n%s\n`) │ (replace-regexp-in-string │ ^ (if utf8p │ | ) │ ;; Remove last newline character. │ (replace-regexp-in-string \n[ \t]*\\' s) ╰ Even if it may always work in NT Emacs, thanks to font substitution, it does not in Cygwin Emacs. And, even with substitution, the effect may be not completely right, as you can see on http://screencast.com/t/3P4oRqKd. I've looked for corner characters in - Consolas, - Courier New, - DejaVu Sans Mono, - Lucida Console, and - Lucida Sans Typewriter. The results is that only \u250C and \u2514 are universal (except in Lucida Sans Typewriter which implements almost nothing -- unlike DejaVu Sans Mono which implements almost everything). Best regards, Seb -- Sebastien Vauban
[O] org-mode-hook not called when entering org files (Was: Re: org-crypt doesn't automatically encrypt on save)
look near the end of the post for org-mode-hook specific explanation :-) Darlan Cavalcante Moreira darc...@gmail.com writes: One note first, if you change org-modules manually like that you must make sure this change is done before org-mode is loaded. I prefer to use the customize interface just for org-modules for that reason. Hmmm, the starter kit requires org in the very first step of initialization, so that might be the problem... I dug a bit in the doc and tried org-reload, which doesn't solve my problem... I also add org-crypt to org-modules like you do. If I open my password.org file and open it directly I will have the same behaviour you get. Maybe the save magic does not work reliable when org-crypt is loaded through org-modules, I'm not sure. I didn't know what org-modules did, so I had a look at the source (great first for me :-) Apparently it just requires the listed extensions, so requiring org-crypt does the same. When I call my function that requires org-crypt and calls org-crypt-use-before-save-magic before opening my password file everything works. But I only do it like this because I have a single file with encrypted entries and I prefer to delay loading org-crypt initialization. I profiled my configuration some time ago and decided to do that to reduce i little bit the initialization time. Since you already require org-crypt, just add (org-crypt-use-before-save-magic) after the require and see if that solves your problem. It's already just under the require :-) Here is my complete org-crypt config: (add-to-list 'org-modules 'org-crypt) (require 'org-crypt) ; Encrypt all entries before saving (org-crypt-use-before-save-magic) (setq org-tags-exclude-from-inheritance (quote (crypt))) ; GPG key to use for encryption (setq org-crypt-key 730D80837333AD60) org-crypt-use-before-save-magic just populates org-mode-hook with a before-save-hook, which is correctly done in my case. The trick is that org-mode-hook doesn't seem to fire when I open an org file... confirmed: I had a look at the other variables that it should change, and they do not appear to be modified when I open an org file. all org seems to work fine, but for some reason org-mode-hook is not called when I open an org file... Changing the title as I have a more precise problem :-) Thanks, -- Rémi
Re: [O] org-mode-hook not called when entering org files
hob...@poukram.net (Rémi Letot) writes: org-crypt-use-before-save-magic just populates org-mode-hook with a before-save-hook, which is correctly done in my case. The trick is that org-mode-hook doesn't seem to fire when I open an org file... confirmed: I had a look at the other variables that it should change, and they do not appear to be modified when I open an org file. all org seems to work fine, but for some reason org-mode-hook is not called when I open an org file... That's very unlikely: the hook is run using a general emacs mechanism, so if it were broken, a *lot* of things would be broken. You can check with (setq org-mode-hook nil) (add-hook 'org-mode-hook (function (lambda () (message RL - my org-mode-hook ran this perhaps in a minimal .emacs, and then opening a foo.org file (assuming your auto-mode-alist is set up correctly). I'd be really surprised if this does not work as expected. And if it does, your problem is probably a bit deeper than emacs does not run the org-mode-hook: perhaps cleaning out your org-mode-hook, restarting emacs and then adding things back in one at a time would help to figure out the problem. HTH, Nick
Re: [O] Problem with org-indent-block
Fabrice Popineau fabrice.popin...@gmail.com writes: The problem was not in in org.el:org-indent-block but in org.el:org-hide-block-toggle. This function should toggle special-block blocks too, else it barfs on them. In my setup, when an org file is restored by desktop.el, global visibility is set, which triggers calls to org-hide-block-all. This should be fixed. Thank you for the report. Regards, -- Nicolas Goaziou
Re: [O] Get :PROPERTY: value from drawer in other heading during HTML export?
Hello, D. C. Toedt d...@toedt.com writes: When generating an HTML file from an org-mode document, I'd like to do a GET operation to retrieve a property value from the drawer of an arbitrary heading, using the CUSTOM_ID property to identify the heading. From Google-searching, I suspect that org-heading-components will be involved, but I'm not proficient enough in elisp to be able to figure out how to use it from the on-line examples I've found --- and I'm not proficient enough in Emacs to use any built-in documentation about it (apropos doesn't produce any results). [...] #+MACRO: get-title [omitted -- thanks to Nicolas Goaziou for the get-title macro, at https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00386.html] You can use the same macro, replacing (org-get-heading nil nil) with (org-entry-get (point) $2) IOW, #+MACRO: GET-PROP (eval (or (save-excursion (ignore-errors (let ((org-link-search-inhibit-query t)) (org-open-link-from-string [[#$1]]) (org-entry-get (point) $2 UNKNOWN VALUE)) Regards, -- Nicolas Goaziou
Re: [O] Boxquote for code in UTF-8 export
Hello, Sebastien Vauban sva-news-D0wtAvR13HarG/idocf...@public.gmane.org writes: I'd advice to use UTF-8 characters more wildly available in the different fonts for drawing the Boxquote around code, in function: ╭ │ (defun org-ascii--box-string (s info) │ Return string S with a partial box to its left. │ INFO is a plist used as a communication channel. │ (let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8))) │ (format (if utf8p ╭\n%s\n╰ ,\n%s\n`) │ (replace-regexp-in-string │^ (if utf8p │ | ) │;; Remove last newline character. │(replace-regexp-in-string \n[ \t]*\\' s) ╰ [...] The results is that only \u250C and \u2514 are universal (except in Lucida Sans Typewriter which implements almost nothing -- unlike DejaVu Sans Mono which implements almost everything). There are three characters required. You are only suggesting two. What should be the third? Anyhow, do you want to provide a patch? Regards, -- Nicolas Goaziou
[O] Using color in latex export
Hello all, I would like to have some text in color when I export my org document to latex. I tried this: ... #+latex_header: \usepackage{color} \textcolor{red}{Text I want in red} ... But, this is producing ... \usepackage{color} \textcolor{red}\{Text I want in red\} in the exported latex document. ... How can I properly export the org file to latex and still have colored text. How can I escape braces '{'? Best regards, Chai -- 42
Re: [O] Using color in latex export
Chaitanya Krishna icym...@gmail.com writes: Hello all, I would like to have some text in color when I export my org document to latex. I tried this: ... #+latex_header: \usepackage{color} \textcolor{red}{Text I want in red} ... But, this is producing ... \usepackage{color} \textcolor{red}\{Text I want in red\} in the exported latex document. ... How can I properly export the org file to latex and still have colored text. How can I escape braces '{'? Try this: --8---cut here---start-8--- Here is some @@latex:\textcolor{red}{red text}@@ --8---cut here---end---8--- Nick
Re: [O] Get :PROPERTY: value from drawer in other heading during HTML export?
Beautiful -- thanks! Is there any documentation I can read to get a sense of how things work? I've done a little bit of browsing inside org.el and its comments, but that seems like it's not the most effective way to get up to speed. Regards, --D. C. *D*ell *C*harles D. C. Toedt III *(my** last name is pronounced Tate) * Attorney and neutral arbitrator -- tech contracts and intellectual property Lecturer, University of Houston Law Center Editor, Common Draft http://www.commondraft.org/ project: A readable library of best-practices contract clauses, with extensive citations and commentary, updated often. d...@toedt.com LinkedIn: dctoedt http://www.linkedin.com/in/dctoedt Calendar https://www.google.com/calendar/embed?src=dc.to...@toedt.commode=WEEK (redacted) O: +1 (713) 364-6545C: +1 (713) 516-8968 Houston, Texas (Central time zone) Unless expressly stated otherwise, this message is not intended to serve as an electronic signature nor as assent to an agreement. On Fri, Sep 12, 2014 at 2:06 PM, Nicolas Goaziou m...@nicolasgoaziou.fr wrote: Hello, D. C. Toedt d...@toedt.com writes: When generating an HTML file from an org-mode document, I'd like to do a GET operation to retrieve a property value from the drawer of an arbitrary heading, using the CUSTOM_ID property to identify the heading. From Google-searching, I suspect that org-heading-components will be involved, but I'm not proficient enough in elisp to be able to figure out how to use it from the on-line examples I've found --- and I'm not proficient enough in Emacs to use any built-in documentation about it (apropos doesn't produce any results). [...] #+MACRO: get-title [omitted -- thanks to Nicolas Goaziou for the get-title macro, at https://lists.gnu.org/archive/html/emacs-orgmode/2014-02/msg00386.html] You can use the same macro, replacing (org-get-heading nil nil) with (org-entry-get (point) $2) IOW, #+MACRO: GET-PROP (eval (or (save-excursion (ignore-errors (let ((org-link-search-inhibit-query t)) (org-open-link-from-string [[#$1]]) (org-entry-get (point) $2 UNKNOWN VALUE)) Regards, -- Nicolas Goaziou
Re: [O] Using color in latex export
Aloha Chai, Chaitanya Krishna icym...@gmail.com writes: Hello all, I would like to have some text in color when I export my org document to latex. I tried this: ... #+latex_header: \usepackage{color} \textcolor{red}{Text I want in red} One way is with a macro, e.g., #+MACRO: red \textcolor{red}{$1} This is {{{red(Text I want in red)}}}. Which exports to This is \textcolor{red}{Text I want in red}. Or, more generally, #+MACRO: color \textcolor{$1}{$2} This is {{{color(green,Text I want in green)}}}. Which exports to This is \textcolor{green}{Text I want in green}. hth, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Boxquote for code in UTF-8 export
if boxquote is going to be changed, perhaps another option that would be nice for boxquote would be to optionally not print anything to the left of the contents? On 9/12/14, Sebastien Vauban sva-n...@mygooglest.com wrote: ╭ │ (defun org-ascii--box-string (s info) ^ here -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. And ANYBODY can get it. Denmark: free Karina Hansen NOW.