Re: org-refile, org-capture byte-compiling failure with recent emacs-git
Hello, ** Kyle Meyer [2022-03-02 23:11:53 -0500]: > Kyle Meyer writes: >> Kyle Meyer writes: >> >>> However, it seems unintended that with-demoted-errors would actually >>> error here now rather than give a warning; again, will need to take a >>> closer look. >> >> The patch at <https://debbugs.gnu.org/54225> demotes the error to the >> intended warning. > And Emacs's d52c929e3 has been ported to Org's bugfix branch to avoid > these failures regardless of whether the patch there is applied. Thank you Kyle, commit 91681fc03 compiles fine. --- WBR, Vladimir Lomov -- Nearly every complex solution to a programming problem that I have looked at carefully has turned out to be wrong. -- Brent Welch signature.asc Description: PGP signature
org-refile, org-capture byte-compiling failure with recent emacs-git
Hello, org-refile and org-capture failed to byte-compile by emacs from git (commit: 8c8093aa6f20a7a4f3799cbdb9270cac013ef71d) with following messages: ... Compiling /home/vladimir/pkgs/emacs-org-mode/src/emacs-org-mode/lisp/org-capture.el... In toplevel form: org-capture.el:1455:12: Error: Wrong number of arguments: (1 . 2), 4 ... Compiling /home/vladimir/pkgs/emacs-org-mode/src/emacs-org-mode/lisp/org-refile.el... In toplevel form: org-refile.el:566:17: Error: Wrong number of arguments: (1 . 2), 4 ... I also see this warning: ... Compiling /home/vladimir/pkgs/emacs-org-mode/src/emacs-org-mode/lisp/org-agenda.el... org-refile.el: Warning: Error: %S org-refile.el: Warning: Error: %S ... but not sure if it is related to above errors. P.S. I tried the latest git commit (ef0cf495b2bc6a4eb5b3c21e26d9df8c7577). --- WBR, Vladimir Lomov -- I come from a small town whose population never changed. Each time a woman got pregnant, someone left town. -- Michael Prichard signature.asc Description: PGP signature
Re: [BUG] Warning (emacs): org-element--cache: Unregistered buffer modifications detected. Resetting. [9.5 (release_9.5-223-g876e81 @ /usr/share/emacs/site-lisp/org/)]
Hello, ** Ihor Radchenko [2021-11-11 13:54:05 +0800]: > Vladimir Lomov writes: >> A few weeks ago I started seeing these warnings from Emacs: >> >> Warning (emacs): org-element--cache: Unregistered buffer modifications >> detected. Resetting. >> ... >> This happens when I edit a table. Even if I disable the warning >> ("showing" and "logging"), editing is still very slow compared to what it >> was. > Thanks for reporting! > Are you able to reproduce with emacs -Q? No, editing table 'charges.org' in Emacs running as 'emacs -Q' works fine, but it uses org mode shipped with Emacs. If I launch emacs as 'emacs -Q -l org-min.el' then I see the same messages. An interesting observation (I didn't check that before): if I use English language (latin keyboard) all goes fine, but when I switch input method (C-\, Russian language) I see these warnings and editing slows down. > Are you using any third-party packages that have anything to do with tables? I use several emacs packages, but they don't interact with Org buffers (except CDLaTeX but I don't use it in particular file). This is 'org-min.el' file: - 8< - (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") ; (add-to-list 'load-path "/usr/share/emacs/site-lisp/org_contrib") - 8< - > Best, > Ihor --- WBR, Vladimir Lomov -- Q: What's the difference between USL and the Graf Zeppelin? A: The Graf Zeppelin represented cutting edge technology for its time. signature.asc Description: PGP signature
[BUG] Warning (emacs): org-element--cache: Unregistered buffer modifications detected. Resetting. [9.5 (release_9.5-223-g876e81 @ /usr/share/emacs/site-lisp/org/)]
org-edit-src-auto-save-idle-delay 3 org-agenda-before-write-hook '(org-agenda-add-entry-text) org-babel-tangle-lang-exts '(("perl" . "pl") ("asymptote" . "asy") ("emacs-lisp" . "el") ("elisp" . "el")) org-src-mode-hook '(org-src-babel-configure-edit-buffer org-src-mode-configure-edit-buffer (lambda nil (define-key org-src-mode-map [f2] 'org-edit-src-save))) org-confirm-elisp-link-function 'yes-or-no-p org-todo-keywords '((sequence "TODO(t)" "|" "DONE(d)") (types "УНИВЕР(u)" "ИНСТИТУТ(i)" "ПОЛИТЕХ(p)" "ДОМ(h)" "|" "СДЕЛАНО(c)")) org-speed-command-hook '(org-speed-command-activate org-babel-speed-command-activate) org-export-backends '(ascii html latex odt org) org-persist-before-write-hook '(org-element--cache-persist-before-write) org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-babel-header-arg-expand) org-link-shell-confirm-function 'yes-or-no-p org-babel-pre-tangle-hook '(save-buffer) org-agenda-loop-over-headlines-in-active-region nil org-occur-hook '(org-first-headline-recenter) org-metadown-hook '(org-babel-pop-to-session-maybe) org-link-parameters '(("attachment" :follow org-attach-follow :complete org-attach-complete-link) ("info" :follow org-info-open :export org-info-export :store org-info-store-link) ("docview" :follow org-docview-open :export org-docview-export :store org-docview-store-link) ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link) ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete org-bbdb-complete-link :store org-bbdb-store-link) ("id" :follow org-id-open) ("file+sys") ("file+emacs") ("doi" :follow org-link--open-doi) ("elisp" :follow org-link--open-elisp) ("file" :complete org-link-complete-file) ("ftp" :follow #[514 "\301\300\302Q\"\207" ["ftp" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("help" :follow org-link--open-help :store org-link--store-help) ("http" :follow #[514 "\301\300\302Q\"\207" ["http" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("https" :follow #[514 "\301\300\302Q\"\207" ["https" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("mailto" :follow #[514 "\301\300\302Q\"\207" ["mailto" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("message" :follow (lambda (path) (browse-url (concat "message:" path ("news" :follow #[514 "\301\300\302Q\"\207" ["news" browse-url ":"] 6 "\n\n(fn URL ARG)"]) ("shell" :follow org-link--open-shell)) org-mark-ring-length 64 org-metaup-hook '(org-babel-load-in-session-maybe) org-return-follows-link t org-src-lang-modes '(("elisp" . emacs-lisp) ("asymptote" . asy) ("dot" . fundamental) ("sqlite" . sql) ("calc" . fundamental) ("C" . c) ("cpp" . c++) ("C++" . c++) ("screen" . shell-script) ("shell" . sh) ("bash" . sh) ("latex" . LaTeX)) org-attach-store-link-p 'attached ) -- WBR, Vladimir Lomov God save us from a bad neighbor and a beginner on the fiddle. Critical Infrastructure & Key Resources Fedayeen SHA PGP white noise advisors Water borne FKS Venezuela CBOT PSAC NSA Tamiflu Maple Vaccine --
Re: [PATCH] Allow tangling to a list of files
Hello, ** Greg Minshall [2021-07-07 09:56:06 +0300]: > Vladimir, >> I couldn't find in Org manual how tangling should work if there are >> several source code blocks with the same file name for ':tangle'. The >> Org manual section "15.8 Extracting Source Code" is a bit >> obscure. There are these two sentences > i think what Tim answered is correct. but, i believe the "desired" > approach is to put all those blocks to be tangled to the same file under > a headline with a property drawer containing something like: > > :header-args+::tangle "submsim.jl" > Hmm, the more I read the manual and your answers the less I understand. As I said I didn't find in the manual any mention of feature you and Tim referring to. Besides I didn't find definition of [source] code block. If Org document has several #+BEGIN/END_SRC constructions is this the one "code block" or not? May be they are different if they use different "language" identifier? Again, I didn't find any definition or explanation in the manual. This is either lack of documentation or feature of how Org deals with source blocks. In my opinion, this is undocumented feature. > i believe this is for performance of tangling, but possibly the > "multiple source blocks to same :tangle'd file" feature may disappear? > cheers, Greg --- WBR, Vladimir Lomov -- How do I get HOME? signature.asc Description: PGP signature
Re: [PATCH] Allow tangling to a list of files
Hello Jacopo. ** Jacopo De Simoi [2021-07-06 11:24:40 -0400]: > Dear Vladimir, > thanks for your reply. > Let me show you two examples; they are both WIP and incomplete, but you'll > get > the gist. > - Example 1 > https://gist.github.com/85c9b9c9ab151c5fd35bd761ef6ef569 > This is my literate config for .zshrc; as you can see different blocks are > tangled to different set of files; hence the output files differ (as some > blocks are present and other are not) I couldn't find in Org manual how tangling should work if there are several source code blocks with the same file name for ':tangle'. The Org manual section "15.8 Extracting Source Code" is a bit obscure. There are these two sentences When Org tangles code blocks, it expands, merges, and transforms them. Then Org recomposes them into one or more separate files, as configured through the options. The second sentence assumes that it might be possible to tangle to more than one file but possible options for ':tangle' don't give certain answer: yes’ Export the code block to source file. The file name for the source file is derived from the name of the Org file, and the file extension is derived from the source code language identifier. Example: ‘:tangle yes’. FILENAME Export the code block to source file whose file name is derived from any string passed to the ‘tangle’ header argument. Org derives the file name as being relative to the directory of the Org file’s location. Example: ‘:tangle FILENAME’. If I understand first choice correctly then the only source block ("the code block") will be tangled (exported) to a source file. What Org will do if there are several source blocks? Concatenate them or write to a file only last one? (I didn't test that). The same applies to 'FILENAME' case: what Org will do if there are several source code blocks with the same 'FILENAME' for ':tangle'. I would say that you use here undocumented feature and you workflow could be broken if in some future Org version developers decide to implement only documented features. > - Example 2 > https://gist.github.com/2bce5d6df3f04c934fb4beda0c6560ad > This is my literate config for xkb maps; I have several keyboards, and some > of > them require slightly different maps. > Once again, likely all this can be accomplished by some noweb magic, but I > find > my approach much less intrusive (particularly the initial bit in the .zshrc, > which I am still refactoring, where the list of tangle targets is inferred > from the headline tags) I found you way of doing things a bit strange. As I already told I use 'noweb' feature a lot. I won't advise you to use it or not to use it but I find it very powerful. > Thanks again for your comments. I'd really like to see how to do the same > with noweb and compare my approach with the "standard" one. Once more, I > hope these examples clarify my point of view. If you don't distract by foreign language (Russian) you could look how I use 'noweb' feature for scripts (one example): https://git.sr.ht/~vp1981/scripts/tree/master/item/docs/scripts/misc.org for shell configurations: https://git.sr.ht/~vp1981/scripts/tree/master/item/docs/shell/bash.org and for Emacs configuration: https://git.sr.ht/~vp1981/scripts/tree/master/item/docs/emacs/emacs.org > Best > Jacopo [...] --- WBR, Vladimir Lomov -- str->str_pok |= SP_FBM; /* deep magic */ s = (unsigned char*)(str->str_ptr); /* deeper magic */ -- Larry Wall in util.c from the perl source code signature.asc Description: PGP signature
Re: [PATCH] Allow tangling to a list of files
Hello! ** Jacopo De Simoi via General discussions about Org-mode. [2021-07-06 01:09:30 -0400]: > Hi Greg, > thanks for your comments! > On Tuesday, July 6, 2021 12:43:54 AM EDT Greg Minshall wrote: >> hi, Jacopo, >> >> i'm not convinced this is needed over and above your old "solution" of >> using <> witn N-different source blocks, each :tangle'ing to a >> different file. > To be honest I never quite managed to get it work... =) > My point here is to be able to have one org file tangle'ing to several, > slightly different outputs. Ideally I want to use one readable literate > config > for all my machines; the config can then be published (or exported) to html I do the same with 'noweb' feature. > Say I want to create an org file to tangle .tmux.conf (or .zshrc) for > different > machines; then most of the conf file would be the same (and each such block > would be tangled to all files) whereas some specifics could be tangled to > corresponding files only (e.g. ALIASes or EDITORs) How this could be solved by your approach by tangling to several files? They will be identical! > Even if a solution using noweb could work, I find being able to tangle to a > list of files more readable and elegant. Could you explain this a bit more? How you will see that (assuming you have exported Org to HTML) this goes into different files? Again, if you tangle to several files they content will be the same! Then why you need different files? > Especially when exporting the org in an external format, > I think the noweb solution would look like a hack, IMHO, yes, this is a hack and the "standard" way. I would suggest to read again Org manual concerning "Literate programming". > whereas a solution with tangle-to-list would be much easier to parse. How that? You will tangle source block to several files, they content will be identical! Or you suggesting to add some syntax for source block indicating to which file to tangle that code snippet? I would recommend you to describe your needs and how you do things right now. [...] > Best, > Jacopo --- WBR, Vladimir Lomov -- When a camel flies, no one laughs if it doesn't get very far! signature.asc Description: PGP signature
Re: [PATCH] Allow tangling to a list of files
Hello ** Jacopo De Simoi [2021-07-05 18:54:14 +]: > Dear All, I do use 'tangle' feature and I have several Org documents that tangle shell scripts as well as shell configurations so I could comment your proposal a bit. > Please find attached a patch (against master) that adds a feature to the > tangle framework. Essentially, the following block would now tangle to two > files > #+begin_src sh '("filename1" "filename2") > #my script > #+end_src May be you mean #+begin_src sh :tangle '("filename1" "filemane2") # some shell script #+end_src > Usecases > - literate config (e.g. .zshrc) of several machines at once (e.g. tangling > via tramp). IMO this is very specific use case but still it could be solved using existing technique. I would suggest storing all configuration files (as well as Org documents) in git repository, tangle them on a host, push to a repository and pull them on destination host (I do this myself, it helps me to avoid errors). > - literate similar versions of the same script which differ only in small > chunks (I use it for a slightly different latexmkrc for my projects on > Dropbox) Again, IMO, this is very specific use case. You could use standard way to get desire result. Besides if you want tangle to several files they content will be the same, won't it be? So you couldn't get different results from one code block. I do a bit similar thing: I have Org document describing shell configuration for several hosts. I tangle to different files using standard technique and use 'noweb' feature to adapt to different hosts. May be it would worth if you describe what you want to achieve and how you are doing it now? [...] --- WBR, Vladimir Lomov -- Software suppliers are trying to make their software packages more "user-friendly". ... Their best approach, so far, has been to take all the old brochures, and stamp the words, "user-friendly" on the cover. -- Bill Gates, Microsoft, Inc. [Pot. Kettle. Black.] signature.asc Description: PGP signature
Re: Using b6paper for pdf output
Hello, ** Christopher Dimech [2021-06-24 06:50:50 +0200]: > Am using org-mode with latex commands but need to have the page as b6paper. Try 'geometry' package, (untested) #+LATEX_HEADER: \usepackage[b6paper]{geometry} --- WBR, Vladimir Lomov -- Honesty pays, but it doesn't seem to pay enough to suit some people. -- F. M. Hubbard signature.asc Description: PGP signature
Re: suggestion to change default org-latex-pdf-process to latexmk
Hello, ** Tim Cross [2021-06-02 12:56:59 +1000]: > "Bruce D'Arcus" writes: >> On Tue, Jun 1, 2021 at 9:09 PM Scott Randby wrote: >> >>> As a constant user of Org's LaTeX export capability, this change would break >>> my ability to export to PDF, and it would be difficult for me to fix. I >>> don't >>> support this change. >> >> Can you explain this, Scott? Why would anything "break'? >> >> And for those that think this is a bad idea, suggested alternatives? >> >> With the status quo; new org-cite users will run latex/pdf output >> process and will be surprised by the results, as there will be no >> citations or bibliography. >> >> I suppose the easy solution is a prominent note in the documentation. >> > I'm guessing Scott is referring to the latexmk not being part of a > 'standard' texlive installation and if not installed, pdf generation > would fail. If you are talking about Linux then there is TeX Live distribution (TUG TeX Live) and texlive packages. latexmk availability depends on how you install TUG TeX Live (full scheme or not, I didn't investigate this I prefer to use full always) but if you are referring to texlive packages (Linux distribution packages) then the latexmk could be available as distribution package. It could be a problem either on Windows (suppose one could use MikTeX but Emacs on Windows is a bit a pain, IMHO) or on Mac but if one uses TUG TeX Live I'm sure there would be latexmk. Of course, it would be best if there will be a note in documentation. [...] --- WBR, Vladimir Lomov -- I can't decide whether to commit suicide or go bowling. -- Florence Henderson signature.asc Description: PGP signature
Re: Toggle headline underlining in text export?
Hello, ** Loris Bennett [2021-02-16 11:00:08 +0100]: > Hi, > I have an Org file which I export to a text file. A separate program I > have written then uses this text file as the body of an email which is > sent to a number of people. > The problem I have is that the underlining of the headlines is much > longer than the headline text itself if a proportional font is used to > view the email. This contradicts a bit to first paragraph. I would assume that you export to text format to send email message as plain text. > As most of the recipients will probably not be using a fixed-width font for > their mail clients, And this assumes that they are fine with html messages otherwise they would use fixed-width font. > I would like to be able to toggle the underlining and just rely on the > numbering of the headlines. > I'd didn't find anything which seemed relevant here > https://orgmode.org/manual/Export-Settings.html > so is this possible? Is there a (better) alternative? May be send them a html message? > Cheers, > Loris --- WBR, Vladimir Lomov -- To get something clean, one has to get something dirty. To get something dirty, one does not have to get anything clean. signature.asc Description: PGP signature
Re: Bug: Font highlighting with in-line latex math broken [9.4 (9.4-dist)]
Hello, ** Edmund Christian Herenz [2020-11-25 16:50:46 -0300]: > Hi, > me again... > On Wed, Nov 25, 2020 at 04:32:28PM -0300, Edmund Christian Herenz wrote: >> This is only cosmetical, but a bit annoying. > Ah, and while we are at it > Entering a line break in $math > mode$ is also valid and should not break the font highlighting. Did you try to use \(y=\sin(x)\) instead of $y=\sin(x)$ ? > CH. --- WBR, Vladimir Lomov -- Virtue is not left to stand alone. He who practices it will have neighbors. -- Confucius signature.asc Description: PGP signature
Re: Survey: changing a few default settings for Org 9.4
Hello ** Bastien [2020-02-19 18:24:43 +0100]: > Hi Nicolas, > Nicolas Goaziou writes: >> I don't understand. C-c C-, combination is as fast as Org Tempo: >> >> C-c C-, s : 3 keys >> < s TAB : 3 keys > I'm tempted to count the number of fingers involved ;) C-c C-, s --> Ctrl c , s < s TAB --> Shift , s TAB ??? > Which may not be *that* stupid when considering "fast" typing. > But eh, I don't want vimers to come and laugh at us. How this relate with the topic? Please, don't take decision so light (because some people just ask on (not very well-known) channel about something that even NOT documented), take in mind that quick solutions most of time are troublesome in long living products (programs). [...] P.S. I wouldn't mention any "number of fingers" or '"fast" typing' especially when I know that users may use different than QWERTY/QWERTZ/AZERTY keyboards and even DVORAK layout. --- WBR, Vladimir Lomov -- When a person goes on a diet, the first thing he loses is his temper. signature.asc Description: PGP signature
Re: [O] Bug and quick bugfix
Hello, ** Nicolas Goaziou [2019-10-13 09:26:42 +0200]: > Hello, > > Godefroy writes: > >> I recently encountered a bug when exporting an org file to LaTeX: when >> generating a figure with a caption, the LaTeX result has the following >> shape: >> >> \begin{figure} >> … >> \caption{\label{…} >> Content of the caption} >> \end{figure} >> >> When compiling to LaTeX, the carriage return causes a indesirable white >> space in some cases. What I would expect is: >> >> \begin{figure} >> … >> \caption{Content of the caption} >> \label{…} >> \end{figure} >> >> To fix this, I have changed the org-latex--caption/label-string function >> in ox-latex.el on lines 1314 and 1315: >> >> (format (if nonfloat "\\captionof{%s}%s{%s%s}\n" >> "\\caption%s%s{%s%s}\n") >> >> becomes >> >> (format (if nonfloat "\\captionof{%s}%s{%s}\n%s" >> "\\caption%s%s{%s}\n%s") > > IIRC, the label has to be included in the caption command. I applied > a different solution. Let me know if that works for you. There is no strict rule but a general good practice: for caption material put label command inside the caption macro. Otherwise there might be some side effects. > Regards, > > -- > Nicolas Goaziou --- WBR, Vladimir Lomov -- QOTD: "I thought I saw a unicorn on the way over, but it was just a horse with one of the horns broken off." signature.asc Description: PGP signature
Re: [O] Org can't export inline image link to PDF
Hello, ** stardiviner [2019-02-23 18:19:05 +0800]: [...] >>> I checked the =Resume.tex= file. The raw latex is this: >>> >>> #+begin_src latex >>> \begin{center} >>> \includegraphics[width=2.0in]{data/images/me_picture 23.jpg} >>> \end{center} >>> #+end_src >>> >>> No "23.bb", I search over the whole TeX file, nothing found. But the >>> compiled PDF file still have "23.bb". >> >> May be you find what '.bb' file is if you look into the 'graphics' >> package documentation (assuming that you use TeX Live run 'texdoc >> graphicx', in my local copy on page 13 there is example of .bb file, >> search the document for .ps.bb). >> >> As for spaces in file name, if you cannot avoid them use 'grffile' >> package with 'graphicx' package. > > I have not found '.bb' files. Neither '.ps.bb' files. I checked out variable > ~org-latex-packages-alist~, it have 'grffile' and 'graphicx' packages. >> P.S. The question how the .bb file comes on scene completely related how >> LaTeX works with graphic file. Look into documentation or ask question >> on TeX.SO or on texhax mailing list. The LaTeX cannot work directly with graphic files. In past when only latex and dvips were existed a user was able to use only PS/EPS graphic files. latex can work with any graphic files using graphics/graphicx package. One of the purpose of the package is to provide to latex information about the size of a figure (Bounding Box) what is found in EPS file. Sometimes EPS files were gzipped but latex was unable on-fly decompress them and extract BB information. The workaround for this situation is to either provide bb keyword for '\includegraphics' command or create file with extension .eps.bb which will hold necessary information. Actual inclusion of graphic file was done by dvips program. Nowadays almost everyone uses pdflatex/xelatex/luatex engines. They use graphic files in format PDF (native), PNG, JPEG. In most situations the engine could determine the size of a figure but when it fails it will include the figure with wrong size. The problem that you faced is a bit another, while it is looked as being related to missing BB (bounding box): the latex engine don't like the space in file name. pdflatex engine being run in special mode don't stop on missing file but show you information about missing .bb file. A workaround to use graphic files with spaces in file name is to use package 'grffile'. Note, however, this workaround is only for graphic files and don't work to input other LaTeX files with spaces in they filenames into current one. --- WBR, Vladimir Lomov -- Sales tax applies. signature.asc Description: PGP signature
Re: [O] Org can't export inline image link to PDF
Hello, ** stardiviner [2019-02-22 17:16:41 +0800]: > > Nicolas Goaziou writes: > >> Hello, >> >> stardiviner writes: >> >>> Here is the screenshot in attachment, you can see the characters 23.bb >>> left side of the inline image. >>> >>> The original Org inline image format is: >>> >>> ```org >>> #+ATTR_ORG: :width 200 >>> #+ATTR_LATEX: :width 2.0in >>> #+ATTR_HTML: :id avatar :width 200px :alt 那时23岁的我 >>> [[file:data/images/me_picture%2023.jpg]] >> >> Would it be an issue with LaTeX? Does "23.bb" appear anywhere in the >> LaTeX code generated by Org? >> >> Maybe LaTeX experts could chime in. > > I checked the =Resume.tex= file. The raw latex is this: > > #+begin_src latex > \begin{center} > \includegraphics[width=2.0in]{data/images/me_picture 23.jpg} > \end{center} > #+end_src > > No "23.bb", I search over the whole TeX file, nothing found. But the > compiled PDF file still have "23.bb". May be you find what '.bb' file is if you look into the 'graphics' package documentation (assuming that you use TeX Live run 'texdoc graphicx', in my local copy on page 13 there is example of .bb file, search the document for .ps.bb). As for spaces in file name, if you cannot avoid them use 'grffile' package with 'graphicx' package. >> >> Regards, > > > -- > [ stardiviner ] >I try to make every word tell the meaning what I want to express. > >Blog: https://stardiviner.github.io/ >IRC(freenode): stardiviner, Matrix: stardiviner >GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 > P.S. The question how the .bb file comes on scene completely related how LaTeX works with graphic file. Look into documentation or ask question on TeX.SO or on texhax mailing list. --- WBR, Vladimir Lomov -- Will this never-ending series of PLEASURABLE EVENTS never cease? signature.asc Description: PGP signature
[O] Small fix for Org manual
Hello, recent changes in org-manual.org (commit b94e6e2b459d03429f983b2b11ed6a3095b9d12c) breaks typesetting from texi to pdf (texi2pdf). I made small fix for the issue. --- WBR, Vladimir Lomov -- When you are in the middle of a story it isn't a story at all, but only a confusion; a dark roaring, a blindness, a wreckage of shattered glass and splintered wood, like a house in a whirlwind, or else a boat crushed by the icebergs or swept over the rapids, and all aboard powerless to stop it. It's only afterwards that it becomes anything like a story at all. When you are telling it, to yourself or to someone else. -- Margaret Atwood, "Alias Grace" diff --git a/doc/org-manual.org b/doc/org-manual.org index f15dd7dfb7..1da9484d7c 100644 --- a/doc/org-manual.org +++ b/doc/org-manual.org @@ -19265,7 +19265,6 @@ can operate on the reports with the following keys: ** MobileOrg :PROPERTIES: :DESCRIPTION: Viewing and capture on a mobile device. -:APPENDIX: Appendix :END: #+cindex: iPhone #+cindex: smartphone
Re: [O] [BUG] Org manual without correct org-version
Hello, ** Nicolas Goaziou [2018-04-14 16:43:31 +0200]: > Vladimir Lomov writes: > >> Earlier there was "full" "git" version in Manual and I found it convenient >> (I read the manual from time to time to find how to do something in org) >> but now when I open Info with Org manual I'm a bit puzzled, it shows >> version 9.1 while Org from Emacs (I use Emacs from git) shows version >> 9.1.9 and that confuses me completely, which version is "fresh"? > > Barring typos and rewording, Org 9.1.9 is expected to have the same > manual as 9.1.0, or 9.1.13. An Org 9.1 manual means it is accurate for > Org 9.1.9. There is nothing puzzling. I thought that for software versions 9.1 < 9.1.9 and means that 9.1 preceding the 9.1.9. And first thing that comes to my mind about recent changes is a "template" system, there was '> I understand that, but on the other hand, when I/someone uses Org from >> git explicitly it would worth to show the "actual" version in Org Manual >> (as seen by Info). WDYT? > > If you use Org from git, you know the manual is on par with HEAD. As > a developer, I don't need to know the "git" version in manual. I'm > curious: what information are you missing? I prefer search for information in most recent docs than in "out-dated" (see example with 'Structure Templates' above). So simple check of version would help to find out what document is 'fresh' enough. --- WBR, Vladimir Lomov -- Don't change the reason, just change the excuses! -- Joe Cointment
Re: [O] [BUG] Org manual without correct org-version
Hello, ** Nicolas Goaziou [2018-04-13 19:37:09 +0200]: > Hello, > > Vladimir Lomov writes: > >> I'm using org-mode from git and found that now it is not show the >> 'git' version but simply 9.1 in Info file. In doc/ there is >> 'org-version.inc', it is included into 'orgguide.texi' but not in >> 'org.texi'. >> >> As I understand the 'org.texi' is generated from 'org-manual.org', so >> 'org-manual.org' should either somehow includes that file or provide >> other way to get version information. > > Why should it include the exact commit? Manual is for users. I'm not > sure this has any value. Earlier there was "full" "git" version in Manual and I found it convenient (I read the manual from time to time to find how to do something in org) but now when I open Info with Org manual I'm a bit puzzled, it shows version 9.1 while Org from Emacs (I use Emacs from git) shows version 9.1.9 and that confuses me completely, which version is "fresh"? > Actually, "org-manual.org" strips, on purpose, the bugfix number and the > commit release. I understand that, but on the other hand, when I/someone uses Org from git explicitly it would worth to show the "actual" version in Org Manual (as seen by Info). WDYT? > Regards, > > -- > Nicolas Goaziou --- WBR, Vladimir Lomov -- After a time, you may find that "having" is not so pleasing a thing, after all, as "wanting." It is not logical, but it is often true. -- Spock, "Amok Time", stardate 3372.7
[O] [BUG] Org manual without correct org-version
Hello, I'm using org-mode from git and found that now it is not show the 'git' version but simply 9.1 in Info file. In doc/ there is 'org-version.inc', it is included into 'orgguide.texi' but not in 'org.texi'. As I understand the 'org.texi' is generated from 'org-manual.org', so 'org-manual.org' should either somehow includes that file or provide other way to get version information. P.S. I'm practially do the following: 1. git clone/"update" to/the local repo; 2. byte-compile the files; 3. make a package (for my distro). --- WBR, Vladimir Lomov -- Sattinger's Law: It works better if you plug it in.
Re: [O] Heads-up: test failures
Hello, ** John Hendy [2017-02-14 20:32:59 -0600]: > On Mon, Feb 13, 2017 at 12:48 PM, Nick Dokos wrote: >> I just updated to >> >> Org mode version 9.0.5 (release_9.0.5-260-geb59c7 @ >> /home/nick/elisp/org-mode/lisp/) >> >> and `make test' gives me: > > Since others are adding in to the party! I ran after a fresh pull on > my normal setup. > > $ uname -a > Linux whammy 4.9.8-1-ARCH #1 SMP PREEMPT Mon Feb 6 12:59:40 CET 2017 > x86_64 GNU/Linux > > $ emacs --version > GNU Emacs 25.1.1 > > M-x org-version > Org mode version 9.0.5 (release_9.0.5-288-g4caad0 @ > /home/jwhendy/.elisp/org/lisp/) > > Ran 705 tests, 705 results as expected (2017-02-14 20:12:26-0600) > 9 expected failures > > Since there was some mention of the emacs version, I just grabbed the > Arch AUR emacs-git package and re-ran. This is with 26.0.50.1: > > Ran 705 tests, 701 results as expected, 4 unexpected (2017-02-14 > 20:28:42-0600) > 9 expected failures > > 4 unexpected results: >FAILED test-org-list/move-item-down >FAILED test-org-list/move-item-up >FAILED test-org/custom-properties >FAILED test-org/forward-paragraph > > > Looks like emacs version is involved. I want to join this party: -- 8< - $ uname -a Linux smoon4.vl-lomov.ru 4.9.9-1-ck-sandybridge #1 SMP PREEMPT Thu Feb 9 16:04:12 EST 2017 x86_64 GNU/Linux -- 8< - -- 8< - $ cat /etc/os-release NAME="Arch Linux" PRETTY_NAME="Arch Linux" ID=arch ID_LIKE=archlinux ANSI_COLOR="0;36" HOME_URL="https://www.archlinux.org/"; SUPPORT_URL="https://bbs.archlinux.org/"; BUG_REPORT_URL="https://bugs.archlinux.org/"; -- 8< - -- 8< - $ pacman -Qs emacs-git | head -n 1 local/emacs-git 25.2_rc1_2988_g31b4d9a137-1 -- 8< - -- 8< - $ emacs --version GNU Emacs 26.0.50.1 Copyright (C) 2017 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU General Public License. For more information about these matters, see the file named COPYING. -- 8< - Cloned git repo to ~/tmp/emacs-org-mode and run in it -- 8< - $ make compile -- 8< - -- 8< - $ LANG=C make test Ran 705 tests, 699 results as expected, 6 unexpected (2017-02-15 11:43:22+0800) 9 expected failures 6 unexpected results: FAILED test-org-clock/clocktable/scope FAILED test-org-colview/columns-summary FAILED test-org-list/move-item-down FAILED test-org-list/move-item-up FAILED test-org/custom-properties FAILED test-org/forward-paragraph make: *** [mk/targets.mk:104: test] Error 1 -- 8< - Not sure what this mean, but if I run the 'make test' with my default locale (ru_RU.UTF-8) then it reported about 10 unexpected results: -- 8< - Ran 705 tests, 695 results as expected, 10 unexpected (2017-02-15 11:47:39+0800) 9 expected failures 10 unexpected results: FAILED test-org-clock/clocktable/scope FAILED test-org-colview/columns-summary FAILED test-org-list/move-item-down FAILED test-org-list/move-item-up FAILED test-org/add-planning-info FAILED test-org/clone-with-time-shift FAILED test-org/custom-properties FAILED test-org/deadline FAILED test-org/forward-paragraph FAILED test-org/schedule make: *** [mk/targets.mk:104: test] Ошибка 1 -- 8< - I will try to repeat the test with other emacs commit (current one is 31b4d9a137). -- Welcome to boggle - do you want instructions? DGGO OYAN ADBT KISP Enter words: >
Re: [O] Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)]
Hello, ** Nicolas Goaziou [2016-05-15 19:03:57 +0200]: > Hello, > > Vladimir Lomov writes: > >> Correct me if I understand you wrong, but you suggest to bind ~F2~ key >> to ~org-edit-src-save~. But then this will work only in Org buffer, and >> how about LaTeX mode then. Or I should bind ~F2~ to something like that: >> (global-set-key [f2] >> (if (functionp org-edit-src-save) org-edit-src-save save-buffer)) > > Actually, I meant to bind F2 to `org-edit-src-save' in > `org-src-mode-map'. With your advice I came to following code for my init file: #+BEGIN_SRC emacs-lisp (add-hook 'org-src-mode-hook (lambda () (define-key org-src-mode-map [f2] 'org-edit-src-save) ) ) #+END_SRC This works fine, though at first I thought it would be enough to add only following code #+BEGIN_SRC emacs-lisp (define-key org-src-mode-map [f2] 'org-edit-src-save) #+END_SRC into emacs init file. Of course, this don't work and emacs complains about ~org-src-mode-map~. Only one thing bother me: is it normal to add such hook into ~org-src-mode-hook~ ? >> On second thought, I considered org-src buffer as auxiliary buffer, >> depending on (main) Org document buffer, so saving org-src buffer should >> save Org document buffer. > > This is the case already with C-x C-s, not for `save-buffer'. > > Regards, > > -- > Nicolas Goaziou -- "If you can, help others. If you can't, at least don't hurt others." -- the Dalai Lama
Re: [O] Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)]
Hello, ** Nicolas Goaziou [2016-05-15 09:40:03 +0200]: > Hello, > > Vladimir Lomov writes: > >> I have small example that worked before the commit, please see attached >> Org document. > > While it's true this worked before, I don't consider it to be > a regression. There was no guarantee that `save-buffer' would save the > source buffer. In fact, I think instrumenting `save-buffer' is not > a good idea, because it is surprising. Usually, minor modes change > bindings instead of altering functions. > > You can bind `org-edit-src-save' to F2 in this case. Correct me if I understand you wrong, but you suggest to bind ~F2~ key to ~org-edit-src-save~. But then this will work only in Org buffer, and how about LaTeX mode then. Or I should bind ~F2~ to something like that: (global-set-key [f2] (if (functionp org-edit-src-save) org-edit-src-save save-buffer)) (don't test this code, just idea, may be this code won't work or even there is more elegant code and idea). On second thought, I considered org-src buffer as auxiliary buffer, depending on (main) Org document buffer, so saving org-src buffer should save Org document buffer. I agree that there should be possibility to save org-src buffer and if ~write-buffer~ works it is Ok and it is Ok to call it manually. This is just my thoughts. > > Regards, > > -- > Nicolas Goaziou --- WBR, Vladimir Lomov -- Q: Why does Washington have the most lawyers per capita and New Jersey the most toxic waste dumps? A: God gave New Jersey first choice.
Re: [O] Bug: Write file while editing babel code block doesn't work as expected [8.3.4 (release_8.3.4-778-g8127b3 @ /usr/local/share/emacs/site-lisp/org/)]
Hello, ** Nicolas Goaziou [2016-05-13 14:12:20 +0200]: > Hello, > > Aaron Ecay writes: > >> Is this a correct change? Previously, C-x C-s in the org-src buffer >> would save the underlying .org file, which was useful. AFAICS this now >> would not work. > > Why do you think so ? C-x C-s is still bound to `org-edit-src-save'. Do > you have an ECM demonstrating the issue? I have small example that worked before the commit, please see attached Org document. >> I also wonder whether autosave will work correctly from >> the org-src buffer. > > Again, why wouldn't it work? It calls `org-edit-src-save'. > >> I think the other suggestion in this thread (to use write-region) is >> a better solution. > > The problem is about `write-file' (C-x C-w). If this function is not > behaving as expected, it should be fixed, if possible. > > In any case, I think the lines of code I removed were useless anyway. Do > you have any use case in mind for them? > > > Regards, > > -- > Nicolas Goaziou > --- WBR, Vladimir Lomov -- Economists are still trying to figure out why the girls with the least principle draw the most interest. ex.org Description: Lotus Organizer (global-set-key [f2] 'save-buffer) (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (add-to-list 'load-path "/usr/share/emacs/site-lisp/org_contrib")
Re: [O] [patch, ox] suppress title
Hello, ** Rasmus [2015-02-12 01:47:06 +0100]: > Nicolas Goaziou writes: > >> Rasmus writes: >> >>> Nicolas Goaziou writes: >>> >>>> Could you also add a test in `test-org-export/handle-options'? >>> >>> How would I make this test proper? >> >> You can't, my bad. It is obviously handled at the back-end level. > > OK pushed without that then. e6fcc853. Please consider the attached small patch for org.texi P.S. It would be nice to test not only changes in *.el files but also test building process. --- WBR, Vladimir Lomov -- The only thing worse than X Windows: (X Windows) - X diff --git a/doc/org.texi b/doc/org.texi index 406579b..f02fca8 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -10818,7 +10818,6 @@ Toggle inclusion of TODO keywords into exported text @item |: @vindex org-export-with-tables Toggle inclusion of tables (@code{org-export-with-tables}). -@end table @item title: @vindex org-export-with-titles
Re: [O] [BUG?] Is there a bug with 'noweb' header when tangling source block?
** Bastien [2014-04-19 14:56:19 +0200]: > Hi Vladimir, > Vladimir Lomov writes: >> please consider attached example Org document 'ex.org'. There seems to >> be a problem when tangling a source block with noweb reference, without >> it source block is tangled fine. > yes, a bug I introduced myself, fixed now. > Thanks for reporting this, Thank you, I updated org-mode and now all work fine. --- WBR, Vladimir Lomov -- Those who are mentally and emotionally healthy are those who have learned when to say yes, when to say no and when to say whoopee. -- W.S. Krabill
[O] [BUG?] Is there a bug with 'noweb' header when tangling source block?
Hello, please consider attached example Org document 'ex.org'. There seems to be a problem when tangling a source block with noweb reference, without it source block is tangled fine. Two examples are also attached. Emacs version: 24.4.50 (trunk rev. 116991); org-mode: Org-mode version 8.2.5h (release_8.2.5h-991-g06c947 @ /usr/share/emacs/site-lisp/org/) --- WBR, Vladimir Lomov -- Anyway, I keep picturing all these little kids playing some game in this big field of rye and all. Thousands of little kids, and nobody's around -- nobody big, I mean -- except me. And I'm standing on the edge of some crazy cliff. What I have to do, I have to catch everybody if they start to go over the cliff -- I mean if they're running and they don't look where they're going I have to come out from somewhere and catch them. That's all I'd do all day. I'd just be the catcher in the rye. I know it; I know it's crazy, but that's the only thing I'd really like to be. I know it's crazy. -- J.D. Salinger, "Catcher in the Rye" ex.org Description: Lotus Organizer ex-ex1.sh Description: Bourne shell script ex-ex2.sh Description: Bourne shell script
Re: [O] HTML table export options essentially undocumented
Hello, ** James Harkins [2014-03-18 13:52:10 +0800]: > The documentation here seems rather un-detailed. > http://orgmode.org/manual/Tables-in-HTML-export.html#Tables-in-HTML-export > What I wanted to do was to have vertical rules between all columns, but not > horizontal rules. Neither this section of the documentation, nor the > docstring for org-html-table-default-attributes, provide any details on how > to do this. > It's a rather busy day and I'm not in the mood to scour through the elisp > sources, so, could someone please enlighten (and fix the docs)? AFAIU, in current state table decoration is hard coded into exporter. But that doesn't mean you cannot change they style. Take a look on this small example: -- 8< ------ #+TITLE: Table with borders #+AUTHOR: Vladimir Lomov #+HTML_HEAD_EXTRA: * Small table | Name | Address| |--+| | Clifford, A. | Kensington Av. | | Euler, G | Krechet Str. | * CSS Style:noexport: #+BEGIN_SRC css :tangle tbl.css table { border: solid 1px; } td { border: solid 1px; } #+END_SRC -- 8< -- How to try: tangle the SRC block and then export the document into HTML. Open it in any web-browser that supports CSS. > hjh --- WBR, Vladimir Lomov -- Some people have a way about them that seems to say: "If I have only one life to live, let me live it as a jerk."
[O] Header ':comments noweb' mangles lines in tangled code
Hello, consider the following example Org document: -- 8< -- #+TITLE: Example #+AUTHOR: Vladimir Lomov * How ~comments~ interferes with ~noweb~ #+NAME: code1 #+BEGIN_SRC sh var1 #+END_SRC #+NAME: code2 #+BEGIN_SRC sh [[ -t ${SHELL} ]] #+END_SRC #+BEGIN_SRC sh :noweb yes :tangle ex-sh.sh <> = <> <> && { echo "HELLO..." } #+END_SRC ** Now ~comments~ is on At first, ~comments~ is ~link~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:link.sh :comments link <> = <> <> && { echo "HELLO..." } #+END_SRC Then ~comments~ is ~org~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:org.sh :comments org <> = <> <> && { echo "HELLO..." } #+END_SRC Now ~comments~ is ~both~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:both.sh :comments both <> = <> <> && { echo "HELLO..." } #+END_SRC And finally, ~comments~ is ~noweb~ #+BEGIN_SRC sh :noweb yes :tangle ex-c:noweb.sh :comments noweb <> = <> <> && { echo "HELLO..." } #+END_SRC -- 8< -- All combinations except ':comments noweb' give expected results, while the last one produces a file with mangled lines, - 8< ex-c:noweb.sh 8< -- # [[file:ex.org::*Now%20~comments~%20is%20on][Now\ ~comments~\ is\ on:4]] # [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code1]] var1 # code1 ends here = # [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code1]] <> = var1 <> = # code1 ends here # [[file:~/tmp/ex.org::*How%20~comments~%20interferes%20with%20~noweb~][code2]] [[ -t ${SHELL} ]] # code2 ends here && { echo "HELLO..." } # Now\ ~comments~\ is\ on:4 ends here -- 8< -- Is it expected behaviour meaning a limitation of ':comments noweb' or a bug? I'm using Org mode: Org-mode version 8.2.5h (release_8.2.5h-777-g5d8cc3 @/usr/share/emacs/site-lisp/org/) --- WBR, Vladimir Lomov -- My mother was a test tube; my father was a knife. -- Friday
Re: [O] LaTeX export: Handle hash symbol in footnote url links
Hello, ** Michael Bach [2014-02-21 11:52:14 +0100]: > Dear org-mode Devs and Users, > I am trying to export the following snippet > #+BEGIN_ORG > * LaTeX export of url with hash symbol > The Org mode export facilities can be used to export Org documents or > parts of Org documents to a variety of other formats.[fn:1] > * Footnotes > [fn:1] [[http://orgmode.org/org.html#Exporting]] > #+END_ORG > Now the exported .tex file contains the link as > : \footnote{\url{http://orgmode.org/org.html#Exporting}} > Which LaTeX does not like: > : Illegal parameter number in definition of \Hy@tempa > FWIW, there is a workaround for the percent symbol described on SO[1] > using `\urldef` - but this does not work with the hash symbol. > Is there another workaround/solution that works with org-mode? Hash (#), as well as several other symbols have to be espaced when used as is in LaTeX documents. See, for example, "The Not So Short Introduction to LaTeX2e", 1.3.2 Special Characters. In general it is duty of ox-latex (LaTeX export backend) to espace such characters. > [1] bit.ly/1cwYJaM --- WBR, Vladimir Lomov -- God grant us the serenity to accept the things we cannot change, courage to change the things we can, and wisdom to know the difference.
Re: [O] semantic-mode is conflict with org-mode
Hello, ** Sebastien Vauban [2014-02-06 09:21:43 +0100]: > Xue Fuqiao wrote: >> semantic-mode uses `C-c ,' as a prefix for several commands. org-mode uses >> `C-c ,' for org-priority. I don't use semantic-mode within org-mode. Is >> there a way to disable semantic-mode just in org-mode buffers in Emacs? >> If so, can someone include in in [[info:org#Conflicts]]? >> (I'm using Org 8.2.5c on Emacs 24.3.50.) > See http://lists.gnu.org/archive/html/emacs-orgmode/2014-01/msg00866.html. > It shows this is not the only key binding stolen by Org mode. On contrary, semantic-mode is minor mode so it hides `C-c ,' binded by Org mode (that it shouldn't do, that thread is about that). > Best regards, > Seb --- WBR, Vladimir Lomov -- The first version always gets thrown away.
Re: [O] Nested ordered lists?
Hello, ** Peter Davis [2014-01-21 15:45:05 -0500]: > On Tue, Jan 21, 2014 at 12:37:53PM -0800, Josiah Schwab wrote: >>> but my html output had all list items numbered. >> Please read >> http://orgmode.org/worg/org-faq.html#sec-11-5 > Thank you, Josiah. > That does explain it. > It would be nice if there were CSS classes for various numbering > schemes: > org-ol-1 > org-ol-A > org-ol-a > org-ol-i > etc. Meanwhile, I'll make do. You may use CSS when exporting to HTML. Let's take this small example: #+BEGIN_EXAMPLE 1) First item of high level 1. First item of sublevel; 2. second item of sublevel. 2) Second item of high level 1. First item of sublevel, following next high level item; 2. second item of sublevel. Best regards. #+END_EXAMPLE With the following CSS high level items are numbered with digits but items of sublevel are numbered with letters #+BEGIN_EXAMPLE ol[class="org-ol"] { list-style-type: decimal; } ol[class="org-ol"] * ol[class="org-ol"] { list-style-type: lower-alpha; } #+END_EXAMPLE Of course, it would be much easier if "items" of different levels have different classes. > Thanks! > -pd --- WBR, Vladimir Lomov -- Hokey religions and ancient weapons are no substitute for a good blaster at your side. - Han Solo
Re: [O] [bug][ox-latex] Captions in equations
Hello, ** Rasmus [2014-01-19 15:19:40 +0100]: > Vladimir Lomov writes: >> Hello, >> ** Rasmus [2014-01-18 20:36:35 +0100]: >>> Hi, >>> This example produces invalid LaTeX code: >>> #+CAPTION: test >>> #+ATTR_LATEX: :mode math :environment pmatrix >>> | \alpha | \beta | \gamma | >>> Namely, >>> \begin{equation} >>> \caption{test text} >>> \mathbf{H}=\begin{pmatrix} >>> \vdots & 0 & \vdots \\ >>> \vdots & H & \vdots \\ >>> \vdots & 0 & \vdots \\ >>> \end{pmatrix}. >>> \end{equation} [...] >> IMHO, this is wrong approach. > I don't understand. As I said, this is IMHO. >> I would consider this example as a special way to generate a matrix >> when exporting to LaTeX, then CAPTION is useless here. Also, HTML >> export will give differently looking result. > But it shouldn't. It should produce a matrix as well, e.g. via > MathJax. At first, I wanted to write the following: And would will be if one doesn't use MathJax? For example, I prefer to use dvipng to generate PNG images (there are several reasons for this). So, basically, this is a special case, and an user evidently knows about this. But then I tried to export this example document to HTML with MathJax and it fails. Consider these two examples: 'ex-tbl.org' and 'ex-tbl2.org' (attached to the message). After exporting first to html I get 'ex-tbl.html' without MathJax, the second has MathJax but only for formula. As I expected, problem occurs only for LaTeX export, due to a bit weird combination. I'm not a mathematician but I read many books on mathematics and theoretical physics (I'm a physicist) and don't remember examples of use an equation with a caption. Equation enclosed into a frame, yes, I see and use that, numbered or tagged equations, even placed into a float (though didn't try yet). Again, this was my IMHO. And I can't imagine situation when I would need a caption for equation, because there are other ways to emphasize an equation. What I see from this special example is how it is convenient to create a matrix for "math mode" in Org document. > –Rasmus --- WBR, Vladimir Lomov -- Monotheism is a gift from the gods. ex-tbl.org Description: Lotus Organizer ex-tbl2.org Description: Lotus Organizer Title: ex-tbl ex-tbl Table 1: test α β γ Author: Vladimir Lomov Created: 2014-01-20 Пн 09:38 Emacs 24.3.50.1 (Org mode 8.2.5d) Validate Title: ex-tbl2 ex-tbl2 Table 1: test α β γ This is the Euler formula \(\exp^{\imath\phi}=\cos{\phi}+\imath\sin{\phi}\). Author: Vladimir Lomov Created: 2014-01-20 Пн 09:40 Emacs 24.3.50.1 (Org mode 8.2.5d) Validate
Re: [O] [bug][ox-latex] Captions in equations
Hello, ** Rasmus [2014-01-18 20:36:35 +0100]: > Hi, > This example produces invalid LaTeX code: > #+CAPTION: test > #+ATTR_LATEX: :mode math :environment pmatrix > | \alpha | \beta | \gamma | > Namely, > \begin{equation} > \caption{test text} > \mathbf{H}=\begin{pmatrix} > \vdots & 0 & \vdots \\ > \vdots & H & \vdots \\ > \vdots & 0 & \vdots \\ > \end{pmatrix}. > \end{equation} > But an equation cannot have a caption. > I'm not sure what the desired behavior is. (i) To silently drop the > caption, (ii) to wrap the equation in some sort of float and give it a > caption; or (iii) to print the text sans the \caption{·}. > (iii) can be archived with math-prefix. (ii) is a bit weird, but > could be archived relatively easy, but it's not really what one would > expect; it's consistent with how captions work for tables (turned into > a float when a caption is present). (i) is also a bit weird, but > seems the most reasonable to me. > Since I don't know what the correct behavior is, I don't have a patch > right now. IMHO, this is wrong approach. I would consider this example as a special way to generate a matrix when exporting to LaTeX, then CAPTION is useless here. Also, HTML export will give differently looking result. So, generally, question here is what the use-case to have special transformation of a table for LaTeX export, providing that other export backends never will do any special with given table (or will apply different transformation), and to give a CAPTION to a table. > –Rasmus --- WBR, Vladimir Lomov -- Fear is the greatest salesman. -- Robert Klein
Re: [O] Angular brackets break LaTex environment in html-export
Hello, ** Axel [2014-01-14 20:00:58 +0100]: > Hi, > When I use angular brackets in a LaTeX environment, sometimes they break the > mathjax-rendering when exported to html/Rhtml (See example below). Export > into LaTeX-pdf works fine in all cases, but export into html fails without > whitespaces. Is this due to interference with the timestamps in org-mode? > --8<---cut here---start->8--- > * heading > \( \sim t \) > \( < R^2 > \sim t \) > \[ \left \sim t \] > \[ \left< R^2 \right> \sim t \] > -8<---cut here---end->8--- Did you try to use \langle and \rangle instead of < and >? IMO, use of < and > only "possible" in relations. > Cheers > Axel --- WBR, Vladimir Lomov -- The major sin is the sin of being born. -- Samuel Beckett
Re: [O] Change section (headings) numbering style
Hello, ** Axel E. Retif [2014-01-14 02:36:30 -0600]: > Greetings! > I need to change the numbering style of the first level sections (*) in the > exported html file. > Right now they are exported as > 1 First section ;; for * First section > 1.1 First subsection ;; for ** First subsection > etc. > For the first part of the document that's all right, but for the next part I > need > A First new section ;; for * First new section > A.1 First new subsection ;; for ** First new subsection > and so on. > I've tried with different combinations of #+ATTR_HTML and #+OPTIONS with > section-number-2 with no success. I can suggest CSS way to accomplish this. I checked that it works with firefox, but not sure for other browsers. Minimal Org example: #+BEGIN_SRC org #+TITLE: An example ,#+OPTIONS: num:nil ,#+HTML_HEAD_EXTRA: ,* This is title on top level Text for document body. ,** Title for subtop level Text for body of subtop level. ,* This is title of next top level heading Text text text. ,** Title of second order Text text text. #+END_SRC Additional CSS #+BEGIN_SRC css body { counter-reset: level; } #table-of-contents > h2:before { content: normal; counter-increment: level; } h2:before { content: counter(level, upper-latin) " "; counter-increment: level; } h2 { counter-reset: sublevel; } h3:before { content: counter(level, upper-latin) "." counter(sublevel) " "; counter-increment: sublevel; } #+END_SRC Note, that use have to turn off 'automatic' numbering when exporting from Org, this is because export routine inserts numbers 'by-hand' don't relying on CSS (imho, not bad because there are browsers that don't support CSS, but it would be great to have option to switch this on/off). Second, in example only headings of two levels (top, subtop) will have desired format. --- WBR, Vladimir Lomov -- The difference between the right word and the almost right word is the difference between lightning and the lightning bug. -- Mark Twain
Re: [O] Bug: Export to Latex - Incorrect output for list items starting with left bracket [8.2.3c (8.2.3c-elpa @ /Users/jdegenhardt/.emacs.d/elpa/org-20131115/)]
Hello, ** Nicolas Goaziou [2014-01-13 17:51:05 +0100]: > Hello, > Jon Degenhardt writes: >> Export to Latex (org-latex-export-to-pdf) generates incorrect latex when >> list items start with a left square bracket. This occurs because the >> \item command interprets the left square bracket as the start of an >> argument list. An example: >> An item list: >> - abc def >> - [def] ghi >> - [jkl m n o] >> - pqr >> This produces the latex fragment: >> An item list: >> \begin{itemize} >> \item abc def >> \item [def] ghi >> \item [jkl m n o] >> \item pqr >> \end{itemize} >> The pdf output renders the second and third items incorrectly. If there >> is no right bracket to terminate the argument, then pdf generation may >> fail with message: >> >> org-latex-compile: PDF file ./example.pdf wasn't produced: Runaway >> argument > Thank you for the report. Would the following patch solves the problem? I didn't test this patch, and could interpret it wrong, but, IMHO, when exporting lists to LaTeX into itemize or enumerate environments the most suitable approach would be to insert '\item's as \item{} or \item\relax Both prevents LaTeX engine to read next character and interpret it in some special way (simple \item read next character and if it is [], then it assumes that this is an optional argument to the command). > Regards, --- WBR, Vladimir Lomov -- I had the rare misfortune of being one of the first people to try and implement a PL/1 compiler. -- T. Cheatham
Re: [O] Bug: Export to Latex - Incorrect output for list items starting with left bracket [8.2.3c (8.2.3c-elpa @ /Users/jdegenhardt/.emacs.d/elpa/org-20131115/)]
Hello, ** Jon Degenhardt [2014-01-11 13:18:29 -0800]: > Export to Latex (org-latex-export-to-pdf) generates incorrect latex when > list items start with a left square bracket. This occurs because the > \item command interprets the left square bracket as the start of an > argument list. An example: > An item list: > - abc def > - [def] ghi > - [jkl m n o] > - pqr > This produces the latex fragment: > An item list: > \begin{itemize} > \item abc def > \item [def] ghi > \item [jkl m n o] > \item pqr > \end{itemize} > The pdf output renders the second and third items incorrectly. If there > is no right bracket to terminate the argument, then pdf generation may > fail with message: > > org-latex-compile: PDF file ./example.pdf wasn't produced: Runaway argument This is (mis-)feature of LaTeX itemize and enumerate environments. The most simple way to "correct" output is to put '\relax' right after '\item' or output for these environments '\item[]' instead of solely '\item'. > I fixed these cases in my local environment using defadvise on org-latex-item > to wrap an initial left square bracket in braces. I used this form: > (eval-after-load "ox-latex" > '(progn > (defadvice org-latex-item (after escape-initial-bracket activate) > (setq ad-return-value > (replace-regexp-in-string > "item \\[" > "item {[}" > ad-return-value) > This changes the latex fragment for the above example to: > An item list: > \begin{itemize} > \item abc def > \item {[}def] ghi > \item {[}jkl m n o] > \item pqr > \end{itemize} > This form renders PDF correctly. My knowledge of latex is very limited, > I don't know if this is a reasonable approach or not. There appears to > be one other function in the ox-latex.el generating the \item command: > (org-latex-headline). I did not try to reproduce this case. [...] FWIW, itemize and enumerate environments are built on top of \list command, as well as 'description' environment. But only last environment uses 'optional' arguments for '\item', the first two shouldn't have such option. Unfortunately, there is only one '\item' command, that is used in all three environments. It is impossible to redefine "kernel" environments itemize and enumerate to work properly with '[]' after item, but some LaTeX packages could 'patch' standard environments to 'fix' the issue, for example, 'enumitem' package. --- WBR, Vladimir Lomov -- In an age when the fashion is to be in love with yourself, confessing to be in love with somebody else is an admission of unfaithfulness to one's beloved. -- Russell Baker
Re: [O] make doc failing
Hello, ** Rustom Mody [2013-12-30 11:27:46 +0530]: > Nick wrote: >> Rusi wrote: >>> $ makeinfo --version >>> makeinfo (GNU texinfo) 5.2 >>> Is yours the same? >> No, mine is 4.13 - apparently before the perl switcheroo. > And doc/Makefile has: > %.pdf:LC_ALL=C# work around a bug in texi2dvi > %.pdf:LANG=C# work around a bug in texi2dvi > %.pdf:%.texi org-version.inc > $(TEXI2PDF) $< > Commenting out the LC/LANG lines makes the perl warning go away > Generation is still a problem > Works from command line texi2dvi > Fails with make doc > In short texi2dvi works texi2pdf fails Try to add -q option to TEXI2PDF, I resolved that issue when texinfo 5.0 (actually I don't remember when, though could dig git log of my repo) apperead in my distro (Archlinux). P.S. If you are interesed how I do this, see this file (package build script), https://github.com/vp1981/pkgbuild/blob/master/emacs-org-mode/PKGBUILD especially line with TEXI2PDF. --- WBR, Vladimir Lomov -- Oppernockity tunes but once.
[O] Updated Russian translation for some 'export' strings
Hello, this is rather 'long' patch, but it only adds new translations for several 'export' strings. I hope it would be accepted (imho, it is not TINYCHANGE, if to count number of 'changed' lines). --- WBR, Vladimir Lomov -- Brian Kernighan has an automobile which he helped design. Unlike most automobiles, it has neither speedometer, nor gas gauge, nor any of the numerous idiot lights which plague the modern driver. Rather, if the driver makes any mistake, a giant "?" lights up in the center of the dashboard. "The experienced driver", he says, "will usually know what's wrong." >From 5ac88e7c4fcfb9cd2bb36168fe323c6effe339e4 Mon Sep 17 00:00:00 2001 From: Vladimir Lomov Date: Sun, 29 Dec 2013 08:06:26 +0900 Subject: [PATCH 2/2] Export: Russian translation for all supported strings * ox.el: Completed Russian translation for all available strings. Signed-off-by: Vladimir Lomov --- lisp/ox.el | 25 +++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 644b434..2160826 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -5349,7 +5349,9 @@ them." ("it" :default "Continua da pagina precedente") ("ja" :utf-8 "前ページからの続き") ("nl" :default "Vervolg van vorige pagina") - ("pt" :default "Continuação da página anterior")) + ("pt" :default "Continuação da página anterior") + ("ru" :html "(Продолжение)" + :utf-8 "(Продолжение)")) ("Continued on next page" ("de" :default "Fortsetzung nächste Seite") ("es" :default "Continúa en la siguiente página") @@ -5357,7 +5359,9 @@ them." ("it" :default "Continua alla pagina successiva") ("ja" :utf-8 "次ページに続く") ("nl" :default "Vervolg op volgende pagina") - ("pt" :default "Continua na página seguinte")) + ("pt" :default "Continua na página seguinte") + ("ru" :html "(Продолжение следует)" + :utf-8 "(Продолжение следует)")) ("Date" ("ca" :default "Data") ("cs" :default "Datum") @@ -5390,6 +5394,8 @@ them." ("no" :default "Ligning") ("nb" :default "Ligning") ("nn" :default "Likning") + ("ru" :html "Уравнение" + :utf-8 "Уравнение") ("sv" :default "Ekvation") ("zh-CN" :html "方程" :utf-8 "方程")) ("Figure" @@ -5401,6 +5407,7 @@ them." ("no" :default "Illustrasjon") ("nb" :default "Illustrasjon") ("nn" :default "Illustrasjon") + ("ru" :html "Рисунок" :utf-8 "Рисунок") ("sv" :default "Illustration") ("zh-CN" :html "图" :utf-8 "图")) ("Figure %d:" @@ -5413,6 +5420,7 @@ them." ("no" :default "Illustrasjon %d") ("nb" :default "Illustrasjon %d") ("nn" :default "Illustrasjon %d") + ("ru" :html "Рис. %d.:" :utf-8 "Рис. %d.:") ("sv" :default "Illustration %d") ("zh-CN" :html "图%d " :utf-8 "图%d ")) ("Footnotes" @@ -5448,6 +5456,8 @@ them." ("fr" :default "Liste des programmes") ("no" :default "Dataprogrammer") ("nb" :default "Dataprogrammer") + ("ru" :html "Список распечаток" + :utf-8 "Список распечаток") ("zh-CN" :html "代码目录" :utf-8 "代码目录")) ("List of Tables" ("da" :default "Tabeller") @@ -5458,6 +5468,8 @@ them." ("no" :default "Tabeller") ("nb" :default "Tabeller") ("nn" :default "Tabeller") + ("ru" :html "Список таблиц" + :utf-8 "Список таблиц") ("sv" :default "Tabeller") ("zh-CN" :html "表格目录" :utf-8 "表格目录")) ("Listing %d:" @@ -5468,6 +5480,8 @@ them." ("fr" :default "Programme %d :" :html "Programme %d :") ("no" :default "Dataprogram %d") ("nb" :default "Dataprogram %d") + ("ru" :html "Распечатка %d.:" + :utf-
[O] [HTML][PATCH] use 'class' instead of 'align' for caption
Hello, I prepared a small patch to make ox-html use 'class' attribute instead of 'align' in caption element when it is used in tables. The reason is simple, according to xhtml1 Strict specification 'caption' element doesn't have 'align' attribute, this is true for HTML5 too. Instead of 'align' attribute it is more cleanly to use 'class' attribute and to add corresponding entries to CSS. In included patch I didn't add word TINYCHANGE because I don't is it small or not (I don't understand what exactly the phrase > your total contribution (all patches you submit) should change less than > 15 lines means, how lines are counted). --- WBR, Vladimir Lomov -- Never argue with a man who buys ink by the barrel. >From 449cfb3cb93a14c58591df15f4a5ff8c7fe1a72a Mon Sep 17 00:00:00 2001 From: Vladimir Lomov Date: Sun, 29 Dec 2013 07:33:59 +0900 Subject: [PATCH 1/2] HTML export: Use class for caption instead of align * ox-html.el: when exporting tables with caption use 'class' attributes instead of 'align', add two new entries into css section to put caption at top or at bottom of table. Signed-off-by: Vladimir Lomov --- lisp/ox-html.el | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/ox-html.el b/lisp/ox-html.el index 9fa0a8c..38988ed 100644 --- a/lisp/ox-html.el +++ b/lisp/ox-html.el @@ -280,6 +280,8 @@ for the JavaScript code in this tag. pre.src-sql:before { content: 'SQL'; } table { border-collapse:collapse; } + caption.t-above { caption-side: top; } + caption.t-bottom { caption-side: bottom; } td, th { vertical-align:top; } th.right { text-align: center; } th.left { text-align: center; } @@ -3268,8 +3270,8 @@ contextual information." (if (equal attributes "") "" (concat " " attributes)) (if (not caption) "" (format (if org-html-table-caption-above - "%s" - "%s") + "%s" + "%s") (concat "" (format (org-html--translate "Table %d:" info) number) -- 1.8.5.2
Re: [O] Latex export does not work
Hello, ** Cecil Westerhof [2013-11-06 14:23:15 +0100]: > 2013/11/6 Cecil Westerhof >> 2013/11/6 Cecil Westerhof >>> I am only getting a message: >>> ! Package inputenc Error: Unicode char \u8:- not set up for use with >>> LaTeX. >>> But that should be solvable. >> I solved that by changing in my .tex file: >> \usepackage[utf8]{inputenc} >> to: >> \usepackage[utf8x]{inputenc} >> and running pdflatex. >> Is there a way to get this automatically in the .tex file, so I do not >> have to change it? > Based on > http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=bb488fa3b1eaa61ea2dfe7238f9da85bc42b0ffb > I have: > (defcustom org-export-latex-inputenc-alist '(\"utf8\" . \"utf8x\") "") > But still the .tex file contains: > \usepackage[utf8]{inputenc} > instead of: > \usepackage[utf8x]{inputenc} > What is the right way to do this? I'm not give an advice how to get 'utf8x' option for inputenc (personally I redefine all LaTeX stuff of Org) but for the record this is very useful information about 'utf8' vs 'utf8x': http://tex.stackexchange.com/questions/13067/utf8x-vs-utf8-inputenc Also, you may try lualatex instead of pdflatex. --- WBR, Vladimir Lomov -- Under the wide and starry sky, Dig my grave and let me lie, Glad did I live and gladly die, And laid me down with a will, And this be the verse that you grave for me, Here he lies where he longed to be, Home is the sailor home from the sea, And the hunter home from the hill. -- Robert Loius Stevenson, "Requiem"
Re: [O] Most Recent Org Update
Hello, ** Dov Grobgeld [2013-11-05 09:24:24 +0200]: > I had the same problem after pulling from git yesterday and worked around > it by doing: > ; This is a bug work around > (defun org-element-cache-reset (&optional all) (interactive)) > before requiring org. I noticed that 'org-element-cache-reset' function is "defined" in 'org.el' (actually it is "declare-function" as many others) and used in 2 placed in that file. At 1/5 of 'org.el' file there is (require 'org-footnote) and in that file there only one "call" to org-element-cache-reset function *without* defining it (no 'declare-function'). That "call" is in function 'org-footnote-section' and has form :initialize 'custom-initialize-set :set (lambda (var val) (set var val) (org-element-cache-reset 'all)) As I understand, the chain: (require 'org) [in .emacs] which it turns (require 'org-footnote) which has 'initialize' and call to 'org-element-cache-reset' leads to this issue. (As I said earlier I don't know Emacs Lisp well enough so use quoted terms). I tried to put 'declare-function' into 'org-footnote.el' but without luck (other error message), so I came up to my workaround (I noticed that there is a line in 'org.el' which do something with 'org-footnote-section' and set it to nil). --- WBR, Vladimir Lomov -- Fourth Law of Applied Terror: The night before the English History mid-term, your Biology instructor will assign 200 pages on planaria. Corollary: Every instructor assumes that you have nothing else to do except study for that instructor's course.
Re: [O] Most Recent Org Update
Hello, ** Achim Gratz [2013-11-04 20:59:58 +0100]: > Sam Flint writes: > > I pulled org from git just now, restarted Emacs, and got this error: > > Symbol's function definition is void: org-element-chache reset > > Any ideas why? > You probably meant to type org-element-cache-reset... my guess is you > didn't actually re-load Org after the Git pull. No, that call was introduced in commit 0cecf32a0ae559266555b96668dc305710366c96 by Nicolas Goaziou. I faced with the same problem; I started a fresh session of Emacs with Org-mode from git but Emacs stuck showing me that message (Symbol's function ...). I don't know Emacs Lisp very well but according to the commit now 'org-footnote-section' must call 'org-element-cache-reset' at initialization time (:set line in defcustom of 'org-footnote-section') and exactly that causes a problem. The workaround I found is to set 'org-section-footnote' to nil _before_ (require 'org) in .emacs. > Regards, > Achim. --- WBR, Vladimir Lomov -- The net is like a vast sea of lutefisk with tiny dinosaur brains embedded in it here and there. Any given spoonful will likely have an IQ of 1, but occasional spoonfuls may have an IQ more than six times that! -- James 'Kibo' Parry
Re: [O] Very large svg file output from latex block using =#+header: :imagemagick=
Hello, ** John Hendy [2013-11-02 16:31:02 -0500]: > I'm trying to following along with the example here: > - > http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-LaTeX.html#sec-4-3 > I don't need dual export, so I tried this instead for straight html > compatible output: > #+header: :file tree.svg > #+header: :imagemagick > #+begin_src latex > \usetikzlibrary{trees} > \begin{tikzpicture} > \node [circle, draw, fill=red!20] at (0,0) {1} > child { node [circle, draw, fill=blue!30] {2} > child { node [circle, draw, fill=green!30] {3} } > child { node [circle, draw, fill=yellow!30] {4} }}; > \end{tikzpicture} > #+end_src > Should this work? I get this error: > org-babel-execute:latex: Can not create svg files, please specify a > .png or .pdf file or try the :imagemagick header argument > In perusing another thread, it looks like the argument might be > =:imagemagic yes=? > - http://lists.gnu.org/archive/html/emacs-orgmode/2011-02/msg01302.html > When I do that and run the above, I get a 30.9mb file as the .svg > output. Surely I'm doing something incorrectly? I don't know details how latex fragments are translated into SVG but there is good tool for this: dvisvgm. It is provided by TeX Live though it works only on DVI files. > Just pulled this morning before executing: > Org-mode version 8.2.1 (release_8.2.1-163-ge7397d @ > /home/jwhendy/.elisp/org.git/lisp/) > Thanks for any suggestions! > John --- WBR, Vladimir Lomov -- Some performers on television appear to be horrible people, but when you finally get to know them in person, they turn out to be even worse. -- Avery
[O] CDLaTeX in Org document
Hello, I'm using CDLaTeX with Org documents and with LaTeX ones (AUCTeX major mode). I configured cdlatex to insert closing brackets and dollar ( '$({[' ) and this works fine in AUCTeX major mode. Is it possible to use similar feature in combination Org+cdlatex? I tested with following settings 8< (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex") (setq cdlatex-simplify-sub-super-scripts nil) (setq cdlatex-paired-parens "$([{") (require 'org) (add-hook 'org-mode-hook 'turn-on-org-cdlatex) (setq org-use-sub-superscripts '{}) ---- 8< And it didn't work. --- WBR, Vladimir Lomov -- There's no heavier burden than a great potential.
Re: [O] [BUG] Exporting to HTML a document with a #+CALL
Hello, ** Eric Schulte [2013-10-22 08:44:18 -0600]: > This issue only manifests with the Emacs compiled from source, and as > such I can not reproduce it. > If this bug makes it into a released version of Emacs I can address it > then. Until then perhaps this should be reported to the emacs-dev list. I found which revision introduced this behaviour (114069) but I don't know how to prepare minimal example which would show incorrect behaviour and wouldn't use Org syntax. Is that possible at all? Nevertheless, I'll try to write a bug report based on Org example but only tomorrow. P.S. I suppose there must be another problem commit because error message was changed somewhere between commits 114100 and 114200, I don't have time right now to dig deeper. [...] --- WBR, Vladimir Lomov -- You will lose your present job and have to become a door to door mayonnaise salesman.
Re: [O] [BUG] Exporting to HTML a document with a #+CALL
Hello, ** Eric Schulte [2013-10-22 08:44:18 -0600]: > This issue only manifests with the Emacs compiled from source, and as > such I can not reproduce it. > If this bug makes it into a released version of Emacs I can address it > then. Until then perhaps this should be reported to the emacs-dev list. > Best, Thank you Eric for confirmation that example works with release version of Emacs and problem not with Org mode. I'll try to find out what revision of Emacs trunk introduced such behaviour. > Vladimir Lomov writes: >> Hello, >> I have to ask again about this issue: the following example document >> 8< >> * Function definition >> #+NAME: simp-func >> #+BEGIN_SRC emacs-lisp :var name="My name is..." >> (format "[You passed data] %S" name) >> #+END_SRC >> * This is title of first section >> Call me: >> #+CALL: simp-func() >> 8< >> is not exported to HTML with message in minibuffer >> #+BEGIN_EXAMPLE >> Marker points into wrong buffer: # >> #+END_EXAMPLE >> Org version: >> Org-mode version 8.2.1 (release_8.2.1-113-ga24775 @ >> /usr/share/emacs/site-lisp/org/) >> Emacs version: >> GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.2) of >> 2013-10-22 on smoon3 >> (actually it is emacs compiled from bzr trunk revno 114741) >> Emacs is started in following way >> emacs -Q --eval "(add-to-list 'load-path >> \"/usr/share/emacs/site-lisp/org\")" --eval "(require 'org)" --eval >> "(require 'ox-html)" ex-call3.org >> (ex-call3.org is the name of example document). --- WBR, Vladimir Lomov. -- Something unpleasant is coming when men are anxious to tell the truth. -- Benjamin Disraeli
[O] [BUG] Exporting to HTML a document with a #+CALL
Hello, I have to ask again about this issue: the following example document 8< * Function definition #+NAME: simp-func #+BEGIN_SRC emacs-lisp :var name="My name is..." (format "[You passed data] %S" name) #+END_SRC * This is title of first section Call me: #+CALL: simp-func() 8< is not exported to HTML with message in minibuffer #+BEGIN_EXAMPLE Marker points into wrong buffer: # #+END_EXAMPLE Org version: Org-mode version 8.2.1 (release_8.2.1-113-ga24775 @ /usr/share/emacs/site-lisp/org/) Emacs version: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.2) of 2013-10-22 on smoon3 (actually it is emacs compiled from bzr trunk revno 114741) Emacs is started in following way emacs -Q --eval "(add-to-list 'load-path \"/usr/share/emacs/site-lisp/org\")" --eval "(require 'org)" --eval "(require 'ox-html)" ex-call3.org (ex-call3.org is the name of example document). --- WBR, Vladimir Lomov. -- A lost ounce of gold may be found, a lost moment of time never.
Re: [O] [BUG?] Strange message in minibuffer while exporting into HTML
Hello, ** Eric S Fraga [2013-10-11 08:45:09 +0100]: > Vladimir Lomov writes: >> Hello, >> please consider this sample Org document (ex-call.org): > [...] >> Recently I faced with a strange message in minibuffer: >> #+BEGIN_EXAMPLE >> Marker points into wrong buffer: # >> #+END_EXAMPLE >> when exporting the Org document into HTML. > [...] > I think this might be a is the same problem I posted about a couple of days > ago, a > problem that affects both #+call: and call_ invocations of babel blocks. > When I try your file, exporting to either HTML or LaTeX, I get the same > error. I am using the latest emacs snapshot. > What is interesting is that if I save your file as t.org, extra buffers > named t.org<2> and t.org<2><2> are created after having done two export > attempts. Do either of these appear for you? No, I think because export function fails so it can't produce any buffer. > By the way, what version of Emacs are you using? Emacs compile from bzr repository (currently this is 114588). --- WBR, Vladimir Lomov -- "For three days after death hair and fingernails continue to grow but phone calls taper off." -- Johnny Carson
Re: [O] [BUG?] Strange message in minibuffer while exporting into HTML
Hello, ** Sebastien Vauban [2013-10-11 09:32:12 +0200]: > Hello Vladimir, [...] > I confirm the problem on my Windows environment: > - GNU Emacs 24.3.50.1 (i686-pc-mingw32) of 2013-09-30 on LEG570 > - Org-mode version 8.1.1 (release_8.1.1-13-ga1f9a1) > ... and I don't see any problem with your syntax. I'm as puzzled as you are. > Would you wanna help, I think trying to bisect Org mode would be a great step > into fixing what I think to be a problem in Org. Hm, this is my the best approach to "debug": 1. in all cases I run emacs like #+BEGIN_EXAMPLE emacs -Q --eval "(add-to-list 'load-path \"~/tmp/org-mode\")" --eval "(require 'org)" --eval "(require 'ox-html)" ex-call2.org #+END_EXAMPLE 2. this is the file 'ex-call2.org': #+BEGIN_SRC org ,* This is title of first section Call me: ,#+CALL: simp-func() ,* Function definition ,#+NAME: simp-func() ,#+BEGIN_SRC emacs-lisp :var name="My name is..." (format "[You passed data] %S" name) ,#+END_SRC #+END_SRC 3. before run 'C-c C-e h h' (export into HTML) I run ~M-x org-version~ to ensure what version I run; 4. I started from releases: 8.2.1, 8.2... 8.0 and found that in all release begins with 8.1 I see mentioned message, but in releases 8.0.6 and 8.0.7 there is another message: #+BEGIN_QUOTE Reference 'simp-func' not found in this buffer #+END_QUOTE so I decided to find out which commit changed this message. 5. I did: =git bisect release_8.1 release_8.0.7= and after some steps I got: #+BEGIN_EXAMPLE 685b2967247597f75d22cb77896bc8a70503b2c3 is the first bad commit commit 685b2967247597f75d22cb77896bc8a70503b2c3 Author: Eric Schulte Date: Tue Jun 25 07:55:32 2013 -0600 evaluate elisp header args at original call site * lisp/ob-core.el (org-babel-execute-src-block): Ensure that the location is set before anything else is done. * lisp/ob-ref.el (org-babel-ref-parse): Evaluate Emacs Lisp values in header arguments at the location of the original code block. * testing/lisp/test-ob.el (test-ob/location-of-header-arg-eval): Test defending the new header argument evaluation behavior. :04 04 9e11b15cf73c6a0a9856f2a3393f27419e251f14 b106e079f13673e440c391bcb6a1e6dddb4994ed M lisp :04 04 3935206e2970ec1f338a8b5524906a6d32e58d0e 19f36ce174bbfcd58f6e2bad5313d2de7cdc43c7 M testing #+END_EXAMPLE I have to stop here because I don't know Emacs Lisp and org-mode internals to debug further. --- WBR, Vladimir Lomov -- solaris is bsd, so it should work * Espy takes wichert's crack pipe away
Re: [O] [BUG?] Compilation failure with Emacs 24.3.50.1 (trunk) on 'ox-publish' (Multiple args to , are not supported)
Hello, ** Vladimir Lomov [2013-10-10 16:15:27 +0900]: > Hello, > topic title states my problem completely, some details: > - I use emacs compiled from bzr trunk (revno 114606) on my system: > Archlinux x86_64 with gcc 4.8.1 and make 4.0; > - org-mode: 8.2.1-86-gbe3dad. > This is excert from make log: > #+BEGIN_EXAMPLE > ... > Compiling > /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/ox-publish.el... > In toplevel form: > ox-publish.el:887:1:Error: Multiple args to , are not supported: (\, (\` > (when (quote (\, force)) (org-publish-remove-all-timestamps))) (\` (let > ((org-publish-use-timestamps-flag (if (quote (\, force)) nil (\, > org-publish-use-timestamps-flag (org-publish-projects (quote (\, > org-publish-project-alist)) > ... > #+END_EXAMPLE I have found the reason of such behaviour: commit 114570 of Emacs repository introduced this, below diff between 114569 and 114570: -- 8< -- === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2013-10-08 03:48:01 + +++ lisp/ChangeLog 2013-10-08 04:30:31 + @@ -1,5 +1,8 @@ 2013-10-08 Stefan Monnier + * emacs-lisp/backquote.el (backquote-process): Catch uses of , and ,@ + with more than one argument (bug#15538). + * mpc.el (mpc-songs-jump-to): Adjust to different playlist format. * vc/pcvs.el: Use lexical-binding. === modified file 'lisp/emacs-lisp/backquote.el' --- lisp/emacs-lisp/backquote.el2013-01-01 09:11:05 + +++ lisp/emacs-lisp/backquote.el2013-10-08 04:30:31 + @@ -153,11 +153,18 @@ (list 'quote s ((eq (car s) backquote-unquote-symbol) (if (<= level 0) -(cons 1 (nth 1 s)) +(if (> (length s) 2) +;; We could support it with: (cons 2 `(list . ,(cdr s))) +;; But let's not encourage such uses. +(error "Multiple args to , are not supported: %S" s) + (cons 1 (nth 1 s))) (backquote-delay-process s (1- level ((eq (car s) backquote-splice-symbol) (if (<= level 0) -(cons 2 (nth 1 s)) +(if (> (length s) 2) +;; (cons 2 `(append . ,(cdr s))) +(error "Multiple args to ,@ are not supported: %S" s) + (cons 2 (nth 1 s))) (backquote-delay-process s (1- level ((eq (car s) backquote-backquote-symbol) (backquote-delay-process s (1+ level))) -- 8< -- So, I don't know whom to blame for this behaviour. P.S. I also noted other strange thing in function 'org-publish-all': there two almost identical lines in that function: -- 8< -- (when force (org-publish-remove-all-timestamps)) -- 8< ------ but first is run with backquote. Earlier I found out that commenting line with backquote solves the problem. --- WBR, Vladimir Lomov -- i'd solve a windows key problem with fdisk :)
Re: [O] [BUG?] Strange message in minibuffer while exporting into HTML
Hi, ** Vladimir Lomov [2013-10-11 13:11:11 +0900]: > Hello, > please consider this sample Org document (ex-call.org): [...] > I have typed above document in Emacs run as > emacs -Q -l min-org.el --eval "(require 'ox-html)" ex-call.org I forgot to include minimal configuration 'min-org.el': --- 8< --- (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") --- 8< --- --- WBR, Vladimir Lomov -- Cat, n.: Lapwarmer with built-in buzzer.
[O] [BUG?] Strange message in minibuffer while exporting into HTML
Hello, please consider this sample Org document (ex-call.org): 8< #+TITLE: Example with CALL directive #+AUTHOR: Vladimir Lomov #+OPTIONS: num:nil * This is first section Recently I faced with a strange message in minibuffer: #+BEGIN_EXAMPLE Marker points into wrong buffer: # #+END_EXAMPLE when exporting the Org document into HTML. At first I was puzzled what causes this message in that particular Org document, while rest my Org documents are exported to HTML just fine. After a while I tried to strip down that document to figure out what may cause that message. And seems that problem is in CALL strings. In that particural document I have several CALL directive, commenting out them (just added a ~#~ at beginning of a line with a space after it) allows me to export that document into HTML. The purpose of this example document to ensure that even simple CALL line could cause such behaviour. This is CALL directive, it calls function defined below #+CALL: simple-func() Even without evaluation of this directive exporting into HTML fails with above message. Commenting that directive make it possible to export into HTML. Another attempt: #+CALL: simple-func(name="Vladimir Lomov") * The simple Emacs Lisp function This simple Emacs Lisp function has to be called by CALL directive: #+NAME: simple-func #+BEGIN_SRC emacs-lisp :var name="My name" (format "[You told me:] %S" name) #+END_SRC 8< My system: - Archlinux x86_64, gcc 4.8.1, make 4.0 - emacs: GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.10.0) of 2013-10-10 on smoon4 (compile from bzr trunk, revno 114606) - org-mode: Org-mode version 8.2.1 (release_8.2.1-77-g8aaf3c @ /usr/share/emacs/site-lisp/org/) I have typed above document in Emacs run as emacs -Q -l min-org.el --eval "(require 'ox-html)" ex-call.org Is this really a bug or my misunderstanding of 'CALL' directive usage? --- WBR, Vladimir Lomov -- Being overloaded is the sign of a true Debian maintainer. -- JHM on #Debian
[O] [BUG?] Compilation failure with Emacs 24.3.50.1 (trunk) on 'ox-publish' (Multiple args to , are not supported)
Hello, topic title states my problem completely, some details: - I use emacs compiled from bzr trunk (revno 114606) on my system: Archlinux x86_64 with gcc 4.8.1 and make 4.0; - org-mode: 8.2.1-86-gbe3dad. This is excert from make log: #+BEGIN_EXAMPLE ... Compiling /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/ox-publish.el... In toplevel form: ox-publish.el:887:1:Error: Multiple args to , are not supported: (\, (\` (when (quote (\, force)) (org-publish-remove-all-timestamps))) (\` (let ((org-publish-use-timestamps-flag (if (quote (\, force)) nil (\, org-publish-use-timestamps-flag (org-publish-projects (quote (\, org-publish-project-alist)) ... #+END_EXAMPLE Full log of make work is attached. I don't know the reason of this problem because the last change to 'ox-publish.el' file was at Sep. 27 but I could swear I was able to compile it on Oct. 6. Nevertheless, if I comment line 896: #+BEGIN_EXAMPLE `(when ',force (org-publish-remove-all-timestamps)) #+END_EXAMPLE then I'm able to compile org-mode successfully. --- WBR, Vladimir Lomov -- To get something done, a committee should consist of no more than three persons, two of them absent. == = Invoke "make help" for a synopsis of make targets. = = Created a default local.mk template. = = Setting "oldorg" as the default target.= = Please adapt local.mk to your local setup! = == Loading /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/org-compat.el (source)... Loading /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/mk/org-fixup.el (source)... Saving file /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/local.mk... Wrote /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/local.mk make -C doc clean; make -C lisp clean; make[1]: Entering directory '/home/vladimir/buildpkg/emacs-org-mode/src/org-mode/doc' rm -f org *.pdf *.html *_letter.tex org-version.inc \ *.aux *.cp *.cps *.dvi *.fn *.fns *.ky *.kys *.pg *.pgs \ *.toc *.tp *.tps *.vr *.vrs *.log *.html *.ps make[1]: Leaving directory '/home/vladimir/buildpkg/emacs-org-mode/src/org-mode/doc' make[1]: Entering directory '/home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp' rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc rm -f *.elc make[1]: Leaving directory '/home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp' make -C lisp compile make[1]: Entering directory '/home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp' rm -f org-version.el org-loaddefs.el org-version.elc org-loaddefs.elc org-install.elc org-version: 8.2.1 (release_8.2.1-86-gbe3dad) Loading /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/org-compat.el (source)... Loading /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/mk/org-fixup.el (source)... Saving file /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/org-version.el... Wrote /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/org-version.el org-loaddefs: 8.2.1 (release_8.2.1-86-gbe3dad) Loading /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/lisp/org-compat.el (source)... Loading /home/vladimir/buildpkg/emacs-org-mode/src/org-mode/mk/org-fixup.el (source)... Generating autoloads for ob-C.el... Generating autoloads for ob-C.el...done Generating autoloads for ob-R.el... Generating autoloads for ob-R.el...done Generating autoloads for ob-abc.el... Generating autoloads for ob-abc.el...done Generating autoloads for ob-asymptote.el... Generating autoloads for ob-asymptote.el...done Generating autoloads for ob-awk.el... Generating autoloads for ob-awk.el...done Generating autoloads for ob-calc.el... Generating autoloads for ob-calc.el...done Generating autoloads for ob-clojure.el... Generating autoloads for ob-clojure.el...done Generating autoloads for ob-comint.el... Generating autoloads for ob-comint.el...done Making generated-autoload-file local to *autoload-file* while let-bound! Generating autoloads for ob-core.el... Generating autoloads for ob-core.el...done Generating autoloads for ob-css.el... Generating autoloads for ob-css.el...done Generating autoloads for ob-ditaa.el... Generating autoloads for ob-ditaa.el...done Generating autoloads for ob-dot.el... Generating autoloads for ob-dot.el...done Generating autoloads for ob-emacs-lisp.el... Generating autoloads for ob-emacs-lisp.el...done Generating autoloads for ob-eval.el... Generating autoloads for ob-eval.el...done Generating autoloads for ob-exp.el... Generating autoloads for ob-exp.el...done Generating autoloads for ob-fortran.el... Generating autoloads for ob-fortran.el...done Generating autoloads for ob-gnuplot.el... Generating autoloads for ob-gnuplot.el...done Generating autoloads for ob-haskell.el... Generating autoloads for ob-haskell.el...done Gen
Re: [O] [Babel] Padlines
Hello, ** Eric Schulte [2013-09-28 06:17:51 -0600]: >> The blank line which was inserted between blocks isn't anymore for me. >> ECM: >> --8<---cut here---start->8--- >> * Tangle these blocks >> :PROPERTIES: >> :tangle: yes >> :padline: yes >> :END: >> #+begin_src emacs-lisp :file test.csv >> "data" >> #+end_src >> #+begin_src emacs-lisp :file test.csv >> "datb" >> #+end_src >> --8<---cut here---end--->8--- >> results in: >> --8<---cut here---start->8--- >> "data" >> "datb" >> --8<---cut here---end--->8--- >> Note that I tried adding ":padline" to yes, but I normally should not, as it >> is >> the default. >> Best regards, >> Seb > Hi Seb, > Thanks for this bug report, there was a problem in my previous patch in > this thread. I've just pushed up a fix which should solve this problem. And seems that you miss another 'padline' in function 'org-babel-spec-to-string', line 323. I attached small patch which removes that line so I can tangle Org document with shell scripts. --- WBR, Vladimir Lomov -- Coming to Stores Near You: 101 Grammatically Correct Popular Tunes Featuring: (You Aren't Anything but a) Hound Dog It Doesn't Mean a Thing If It Hasn't Got That Swing I'm Not Misbehaving And A Whole Lot More... diff --git a/lisp/ob-tangle.el b/lisp/ob-tangle.el index 63d0a47..f655711 100644 --- a/lisp/ob-tangle.el +++ b/lisp/ob-tangle.el @@ -322,7 +322,6 @@ that the appropriate major-mode is set. SPEC has the form: (insert-comment (lambda (text) (when (and comments (not (string= comments "no")) (> (length text) 0)) - (when padline (insert "\n")) (comment-region (point) (progn (insert text) (point))) (end-of-line nil) (insert "\n") (when comment (funcall insert-comment comment))
[O] How to add custom markup elements and to define custom backends?
Hello, sometimes I need markup elements than missing in Org mode, for example combination of both bold and italic. Some backends, for instance html and latex (with minor exception) support such combinations. So I wonder 1) how to define custom or new markup elements that can be used in backends, if it is possible 2) and how to extend or customize (write a custom backend) to take into accout these new elements. Thanks in advance, Vladimir Lomov -- You will triumph over your enemy.
[O] [BUG][PATCH] Commit '3142297d69f6063221215757a3ba9c74adcf3e43' breaks some my files
Hello, as title states, commit '3142297d69f6063221215757a3ba9c74adcf3e43' breaks one of my Org document (I have many but faced with a bug only with particular one). In that file tables contain data (three columns, one header) which are transformed and tangle to files (xml, txt). Before the commit '3142297d69f6063221215757a3ba9c74adcf3e43' all works fine, begining with it I can't tangle files with error message BEGIN_EXAMPLE mapc: Wrong type argument: consp, nil END_EXAMPLE By means of trial-and-error I made small patch which fixes the problem for me. As I'm know very few in Emacs Lisp I'm not sure if my fix is correct, so I just added two lines without "proper" reindenting of whole block. BEGIN_EXAMPLE diff --git a/lisp/ob-core.el b/lisp/ob-core.el index c2722db..013646b 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2353,6 +2353,7 @@ parameters when merging lists." (setq vars (reverse vars)) (while vars (setq params (cons (cons :var (cddr (pop vars))) params))) ;; clear out col-names and row-names for replaced variables +(when (and (consp :colname-names) (consp :rowname-names)) (mapc (lambda (name) (mapc @@ -2365,6 +2366,7 @@ parameters when merging lists." params))) (list :colname-names :rowname-names))) clearnames) +) (mapc (lambda (hd) (let ((key (intern (concat ":" (symbol-name hd END_EXAMPLE P.S. I was lazy to prepare MWE. The mentioned document is available at https://github.com/vp1981/scripts/blob/master/docs/openbox/rc.org --- WBR, Vladimir Lomov -- pessimist: A man who spends all his time worrying about how he can keep the wolf from the door. optimist: A man who refuses to see the wolf until he seizes the seat of his pants. opportunist: A man who invites the wolf in and appears the next day in a fur coat.
[O] [BUG] A typo introduced in '6abc114f188267e4b804a3eca8794900eee66db0'
Hello, a typo introduced in commit '6abc114f188267e4b804a3eca8794900eee66db0' prevents `org-agenda.el' to compile into 'elc' (actually Emacs shows me an error which I don't understand). I compared `org-agenda.el' of '6abc114f188267e4b804a3eca8794900eee66db0' commit with previous commit and made small patch which fixes the problem. --- WBR, Vladimir Lomov -- There's nothing very mysterious about you, except that nobody really knows your origin, purpose, or destination. diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b4f604b..04e80a3 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -3133,9 +3133,9 @@ before running the agenda command." (let (org-agenda-sticky) (if (> (length cmd-key) 2) (org-tags-view nil cmd-key) - (org-agenda nil cmd-key))) + (org-agenda nil cmd-key (set-buffer org-agenda-buffer-name) -(princ (buffer-string +(princ (buffer-string))) (defvar org-agenda-info nil)
Re: [O] Proper use of 'org-file-apps'
Hello, ** Nick Dokos [2013-06-27 09:33:41 -0400]: > Vladimir Lomov writes: >> ** Nick Dokos [2013-06-27 01:52:49 -0400]: >>> Vladimir Lomov writes: >>>> #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el >>>> (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") >>>> (require 'org) >>>> (setq org-file-apps >>>>'( ("\\.pdf::\\(\\d+\\)\\'" . "run-me --page %1 %s") >>>> ("\\.pdf\\'" . "run-me %s") >>>> ) >>>> ) >>>> #+END_SRC >>> \d is Perl regexp syntax for matching a digit, but (afaik) not emacs >>> syntax. Try >>>>'( ("\\.pdf::\\([0-9]+\\)\\'" . "run-me --page %1 %s") >>>or >>>>'( ("\\.pdf::\\([[:digit:]]+\\)\\'" . "run-me --page %1 %s") >>> instead. >> D'oh, I had searched Emacs manual about meaning of \' but didn't try to >> check if \d is acceptable. Nevertheless, 'org-file-apps' docstring must >> be updated then, because this \\d part is from it. > Yes, indeed. There's also the vexing question of backslashes. At least > in my version of the C-h v org-file-apps output, the examples appear > with single backslashes in the quoted strings, so if somebody just cuts > and pastes, it is *not* going to work. > Could you make a patch? Something like that? --- WBR, Vladimir Lomov -- Are we running light with overbyte? >From 7840435bd76b38ab536108dfc105fdc53a6aa80d Mon Sep 17 00:00:00 2001 From: Vladimir Lomov Date: Fri, 28 Jun 2013 08:42:15 +0900 Subject: [PATCH] Fix docstring for `org-file-apps' * lisp/org.el: `org-file-apps' docstring: doubled backslashes (would give usable output when run 'C-h v org-file-apps') and use correct regexp to match digits. TINYCHANGE --- lisp/org.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d0dffc7..5e56231 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -1940,8 +1940,8 @@ file identifier are filename matches the regexp. If you want to use groups here, use shy groups. - Example: (\"\\.x?html\\'\" . \"firefox %s\") - (\"\\(?:xhtml\\|html\\)\" . \"firefox %s\") + Example: (\".x?html'\" . \"firefox %s\") + (\"(?:xhtml|html)\" . \"firefox %s\") to open *.html and *.xhtml with firefox. - Regular expression which contains (non-shy) groups: @@ -1956,7 +1956,7 @@ file identifier are In a custom lisp form, you can access the group matches with (match-string n link). - Example: (\"\\.pdf::\\(\\d+\\)\\'\" . \"evince -p %1 %s\") + Example: (\".pdf::([[:digit:]]+)'\" . \"evince -p %1 %s\") to open [[file:document.pdf::5]] with evince at page 5. `directory' Matches a directory -- 1.8.3.1
Re: [O] Proper use of 'org-file-apps'
** Nick Dokos [2013-06-27 01:52:49 -0400]: > Vladimir Lomov writes: > > #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el > > (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") > > (require 'org) > > (setq org-file-apps > >'( ("\\.pdf::\\(\\d+\\)\\'" . "run-me --page %1 %s") > > ("\\.pdf\\'" . "run-me %s") > > ) > > ) > > #+END_SRC > \d is Perl regexp syntax for matching a digit, but (afaik) not emacs > syntax. Try > >'( ("\\.pdf::\\([0-9]+\\)\\'" . "run-me --page %1 %s") > or > >'( ("\\.pdf::\\([[:digit:]]+\\)\\'" . "run-me --page %1 %s") > instead. D'oh, I had searched Emacs manual about meaning of \' but didn't try to check if \d is acceptable. Nevertheless, 'org-file-apps' docstring must be updated then, because this \\d part is from it. Thank you Nick, [[:digit:]] works fine. --- WBR, Vladimir Lomov -- My family history begins with me, but yours ends with you. -- Iphicrates
[O] Proper use of 'org-file-apps'
Hello, I wonder how to use 'org-file-apps'. As I understand, when I run ~C-c C-o~ on a link of form [[file:file.pdf][a PDF file]] Org mode uses this variable to decide how to 'open' this type of file. Instead of docview mode of Emacs I want to use Okular (it allows to select text from PDF file), so I read docstring of 'org-file-apps' variable and tried to change it accordingly, but seems I do something strange because following example don't work. ### #+TITLE: Self-contained example #+AUTHOR: Vladimir Lomov #+PROPERTY: padline no * Minimal configuration for Emacs This is minimal configuration to run Emacs #+BEGIN_SRC emacs-lisp :tangle org-apps-c.el (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (require 'org) (setq org-file-apps '( ("\\.pdf::\\(\\d+\\)\\'" . "run-me --page %1 %s") ("\\.pdf\\'" . "run-me %s") ) ) #+END_SRC The test script ~run-me~ #+BEGIN_SRC sh :tangle run-me :shebang "#!/bin/bash" file=run-me.log echo "INPUT" >> ${file} echo "'$@'" >> ${file} #+END_SRC The test Org document #+BEGIN_SRC org :tangle sample.org ,#+TITEL: A sample ,* Sample head 1. First item, PDF file, [[file:file.pdf][a file]]; 2. second item, PDF file with selected page, [[file:file.pdf::2][a file]]. #+END_SRC Note, that to actually test it one needs a PDF file named as ~file.pdf~ located in the same directory as the test Org document. This is how I run Emacs to test my settings: #+BEGIN_EXAMPLE emacs -Q -l org-apps-c.el --eval '(find-file "sample.org")' #+END_EXAMPLE What I expect? After I run ~C-c C-o~ on both links, I would expect to see two different lines (parameters passed to test script) in ~run-me.log~ file. Instead, both parameters are the same. What I do wrong? Did I understand ~org-file-apps~ correctly? Org mode version is #+BEGIN_EXAMPLE Org-mode version 8.0.3 (release_8.0.3-276-g685b29 @ /usr/share/emacs/site-lisp/org/) #+END_EXAMPLE Emacs version is #+BEGIN_EXAMPLE GNU Emacs 24.3.50.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.8.2) of 2013-06-26 on HOST #+END_EXAMPLE ### --- WBR, Vladimir Lomov -- (Never thought I'd be telling Malcolm and Ilya the same thing... :-) -- Larry Wall in <199711071819.kaa29...@wall.org>
[O] Issue with HTML export of Org document with a list
Hello, I faced a strange problem with either my configuration or Org settings. Please consider the attached Org document, ~ex.org~ and it's export to HTML. What I expect (and that used to be earlier): a list with sequential numbers each has source block. Would be glad to provide more information. Thanks in advance. --- WBR, Vladimir Lomov -- Okay ... I'm going home to write the "I HATE RUBIK's CUBE HANDBOOK FOR DEAD CAT LOVERS" ... ex.org Description: Lotus Organizer Title: Example document Example document Hello, I faced with a problem when export Org document with a list and block examples within to HTML. Let's consider following small initialization file for Emacs #+BEGIN_SRC emacs-lisp :tangle min-org.el :padline no (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (require 'org) (require 'ox-html) #+END_SRC List is written according to guide for lists in manual, which says that all items belong to one list must be indented on the same level. Interestingly enough, that even M-q works wrong on this example: it puts beginning of first sentence after block on the same line as END_SRC. The Emacs is started by following command in terminal #+BEGIN_SRC sh emacs -Q -l min-org.el #+END_SRC Here min-org.el file is the one tangled from previous source block. To demonstrate the problem it is enough to export to HTML this document and to see the result. For example, let's take a look on this source block (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (require 'org) (require 'ox-html) (add-to-list 'load-path "~/.emacs.d/mode") I have cdlatex.el file in ~/.emacs.d/mode. While one have to indent BEGIN|END of source block as it is requirement for lists, it is unnecessary to indent they content. Moreover it would be wrong because tangled code will be indented too and it is may be undesired. Let's see another example of source block (add-to-list 'load-path "/usr/share/emacs/site-lisp/org") (require 'org) (require 'ox-html) (add-to-list 'load-path "/usr/share/emacs/site-lisp/auctex") (add-to-list 'load-path "~/.emacs.d/mode") But something is fundamentally broken, either on my side or with Org settings. Because every item with a source block which content is not indented (as it should be) will break the list and any following item (considered as sequential item in one list) will be interpreted as new list. To finish with list let's show once again minimal example of Emacs initialization for Org mode with cdlatex #+BEGIN_SRC emacs-lisp :tangle min-org-cdlatex.el :noweb yes :padline no (add-to-list 'load-path "usr/share/emacs/site-lisp/auctex") (add-to-list 'load-path "~.emacs.d/mode") #+END_SRC Is this the last sentence of last item of the one list of the document? However, lists without source blocks works fine First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. First. Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Second, Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Third. Another problem (?). First and third entries of above list isn't reformatted by M-q. Org-mode version 8.0.3 (release_8.0.3-225-g8e9c10 @ usr/share/emacs/site-lisp/org) Author: Vladimir Lomov Created: 2013-06-11 Вт 16:41 Emacs 24.3.50.1 (Org mode 8.0.3) Validate
Re: [O] "Ignore following space" coding?
Hello, ** Hideki Saito [2013-04-22 02:36:09 -0700]: > Hello, > I briefly searching the list and but I'm unsure if this was discussed > before, so excuse me if this was discussed before. > I've got a question regarding how I can make this work with languages > that doesn't separate words with spaces. > The problem is if I'm trying to write: > 文字*太字*文字 > This essentially prevents text surrounded by * treated as a regular > character as opposed to marked as bold, as this is pretty much > equivalent of the following case: > aa*bb*aa > I could make the previous text so it says: > 文字 *太字* 文字 (aa *bb* aa) > inserting space between them. But this means that space gets exported. > I'm curious if there are any way I can tell Org-mode "yes there's a > space here so you know where to separate but do not treat like so when > you are exporting." > If there are any suggestions, that will be helpful! > Cheers, > Hideki Saito > http://goo.gl/ErBLy If I understand you correctly these may help you: http://www.mail-archive.com/emacs-orgmode@gnu.org/msg45926.html http://www.mail-archive.com/emacs-orgmode@gnu.org/msg37638.html http://www.mail-archive.com/emacs-orgmode@gnu.org/msg59490.html --- WBR, Vladimir Lomov -- Just because you're paranoid doesn't mean they AREN'T after you.
Re: [O] Does '#+OPTIONS LaTeX:dvipng' deprecated in 8.0 pre or a bug?
Hello, ** Nicolas Goaziou [2013-04-06 22:58:43 +0200]: > Hello, > Vladimir Lomov writes: >> Hello, the following simple Org document >> #+BEGIN_SRC org >> ,#+OPTIONS: LaTeX:dvipng ^:{} >> This is small example $\exp^{\imath\phi}=\cos\phi+\imath\sin\phi$. >> #+END_SRC >> gives me wrong HTML export, see attached html file. > It should be #+OPTIONS: tex:dvipng Thank you Nicolas. --- WBR, Vladimir Lomov -- The Ranger isn't gonna like it, Yogi.
[O] Commit 'cf5e96c8e1be5d0f9df2d98415f3ee16df9408f0' introduces texi syntax error
Hello, as topic states, I attached small patch. --- WBR, Vladimir Lomov -- For some reason a glaze passes over people's faces when you say "Canada". Maybe we should invade South Dakota or something. -- Sandra Gotlieb, wife of the Canadian ambassador to the U.S. diff --git a/doc/org.texi b/doc/org.texi index 3ce5c61..547ce3d 100644 --- a/doc/org.texi +++ b/doc/org.texi @@ -14188,11 +14188,11 @@ argument. #+header: :file /tmp/it.png #+begin_src dot :post attr_wrap(width="5cm", data=*this*) :results drawer - digraph{ + digraph@{ a -> b; b -> c; c -> a; - } + @} #+end_src #+RESULTS:
Re: [O] Can I clone worg using http protocol?
Hello, ** John Hendy [2013-03-24 20:34:09 -0500]: > On Sun, Mar 24, 2013 at 7:54 PM, Vladimir Lomov wrote: >> Hello, >> ** John Hendy [2013-03-24 12:52:34 -0500]: >>> I can't use git protocol due to being behind a firewall at work, >>> otherwise I would. I was trying to clone Worg via http protocol and am >>> getting an error >>> #+begin_src bash >>> $ git clone http://orgmode.org/w/worg.git >>> Cloning into 'worg'... >>> error: The requested URL returned error: 403 Forbidden while accessing >>> http://orgmode.org/w/worg.git/info/refs?service=git-upload-pack >>> fatal: HTTP request failed >>> #+end_src >>> I guess I figured I could given the line later on, which says, "If you >>> already have your local clone of Worg obtained via http protocol,..." >>> As a side note (forgive being a git novice if this should be evident), >>> I don't get this setting suggestion for .gitconfig: >>> #+begin_example >>> [url "git://w...@orgmode.org:worg.git"] >>> pushInsteadOf = http://repo.or.cz/r/ >>> #+end_example >>> If the pull was from orgmode.org/w/worg.git, why am I setting an >>> option to push with git to repo.or.cz? >>> Any suggestions? >> This works for me >> git clone http://orgmode.org/org-mode.git > I have been accessing orgmode git via http (I have to since I update > at work) for some time. But can you do the same with worg (the Orgmode > wiki, not orgmode itself)? Sorry, didn't read your message carefully. There is way to just clone worg repository but not, AFAIK, to push to it: git clone http://orgmode.org/cgit.cgi/worg.git I have successfully clone worg repo (takes ages to complete it). AFAIU, in order to push to worg it must be accessible over https, but seems https://orgmode.org/cgit.cgi/worg.git don't work. > Thanks, > John --- WBR, Vladimir Lomov -- Probable-Possible, my black hen, She lays eggs in the Relative When. She doesn't lay eggs in the Positive Now Because she's unable to postulate How. -- Frederick Winsor
Re: [O] Can I clone worg using http protocol?
Hello, ** John Hendy [2013-03-24 12:52:34 -0500]: > I can't use git protocol due to being behind a firewall at work, > otherwise I would. I was trying to clone Worg via http protocol and am > getting an error > #+begin_src bash > $ git clone http://orgmode.org/w/worg.git > Cloning into 'worg'... > error: The requested URL returned error: 403 Forbidden while accessing > http://orgmode.org/w/worg.git/info/refs?service=git-upload-pack > fatal: HTTP request failed > #+end_src > I guess I figured I could given the line later on, which says, "If you > already have your local clone of Worg obtained via http protocol,..." > As a side note (forgive being a git novice if this should be evident), > I don't get this setting suggestion for .gitconfig: > #+begin_example > [url "git://w...@orgmode.org:worg.git"] > pushInsteadOf = http://repo.or.cz/r/ > #+end_example > If the pull was from orgmode.org/w/worg.git, why am I setting an > option to push with git to repo.or.cz? > Any suggestions? This works for me git clone http://orgmode.org/org-mode.git It may take some time to clone. > John --- WBR, Vladimir Lomov -- "'Tis true, 'tis pity, and pity 'tis 'tis true." -- Poloniouius, in Willie the Shake's _Hamlet, Prince of Darkness_
[O] Seems that commit 'e8742b78e0a982a7fca0bf25b4f3551be58660ef' breaks html output
Hello, Seems that commit 'e8742b78e0a982a7fca0bf25b4f3551be58660ef' breaks code blocks output: they are indented with all other text that is wrong. As I understand this is intended, that commit mentions 'org-html-indent' variable but IMHO it is strange that this option is on by default or alternatively code works bad with source blocks while exporting. Also I see strange extra space at bottom of any source block (pre tag) but this may be unrelated with that commit. --- WBR, Vladimir Lomov -- The Seventh Commandments for Technicians: Work thou not on energized equipment, for if thou dost, thy fellow workers will surely buy beers for thy widow and console her in other ways.
[O] [BUG] [HTML] Export to html calls publish function
Hello, I faced a problem and I think this is a bug in new exporter, html, introduced in commit 93a70ac59805bb270d15e951a14be63b9eb1d553 ox-publish: Implement tools to resolve external fuzzy links Small test files #+BEGIN_SRC org :tangle test1.org ,#+TITLE: This is test1 file ,#+AUTHOR: Vladimir Lomov ,* Purpose of this document The purpose of this document is to show or not to show a problem with exporting Org document into html. #+END_SRC #+BEGIN_SRC org :tangle test2.org ,#+TITLE: Test document number 2 ,#+AUTHOR: Vladimir Lomov ,* What I expect from this document I expect that when exported to html this file will have correct URL, http://www.orgmode.org, as well as link to external document, like [[file:test1.org::*Purpose%20of%20this%20document][Purpose of this document]]. #+END_SRC #+BEGIN_SRC emacs-lisp :tangle debug.el (setq load-path (cons "/usr/share/emacs/site-lisp/org" load-path)) (setq debug-on-error t) (require 'org) (require 'ox-html) #+END_SRC Backtrace: #+BEGIN_EXAMPLE Debugger entered--Lisp error: (error "`org-publish-cache-get' called, but no cache present") signal(error ("`org-publish-cache-get' called, but no cache present")) error("`org-publish-cache-get' called, but no cache present") org-publish-cache-get("/home/vladimir/tmp/test1.org") org-publish-cache-get-file-property("/home/vladimir/tmp/test1.org" :numbering nil t) org-publish-resolve-external-fuzzy-link("test1.org" "*Purpose of this document") org-html-link((link (:type "file" :path "test1.org" :raw-link "file:test1.org::*Purpose%20of%20this%20document" :application nil :search-option "*Purpose of this document" :begin 231 :end 308 :contents-begin 282 :contents-end 306 :post-blank 0 :parent (paragraph (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 :post-affiliated 95 :parent (section (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 :parent (headline (:raw-value "What I expect from this document" :begin 59 :end 310 :pre-blank 1 :hiddenp outline :contents-begin 95 :contents-end 310 :level 1 :priority nil :tags nil :todo-keyword nil :todo-type nil :post-blank 0 :footnote-section-p nil :archivedp nil :commentedp nil :quotedp nil :CATEGORY nil :title ... :parent ...) #4)) #2)) #("I expect that when exported to html this file will have correct URL,\n" 0 69 (:parent #2)) (link (:type "http" :path "//www.orgmode.org" :raw-link "http://www.orgmode.org"; :application nil :search-option nil :begin 164 :end 186 :contents-begin nil :contents-end nil :post-blank 0 :parent #2)) #(", as well as link to external document, like\n" 0 45 (:parent #2)) #0 #(".\n" 0 2 (:parent #2 #("Purpose of this document" 0 24 (:parent #0))) #("Purpose of this document" 0 24 (:parent (link (:type "file" :path "test1.org" :raw-link "file:test1.org::*Purpose%20of%20this%20document" :application nil :search-option "*Purpose of this document" :begin 231 :end 308 :contents-begin 282 :contents-end 306 :post-blank 0 :parent (paragraph (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 :post-affiliated 95 :parent (section (:begin 95 :end 310 :contents-begin 95 :contents-end 310 :post-blank 0 :parent ...) #4)) #("I expect that when exported to html this file will have correct URL,\n" 0 69 (:parent #4)) (link (:type "http" :path "//www.orgmode.org" :raw-link "http://www.orgmode.org"; :application nil :search-option nil :begin 164 :end 186 :contents-begin nil :contents-end nil :post-blank 0 :parent #4)) #(", as well as link to external document, like\n" 0 45 (:parent #4)) #2 #(".\n" 0 2 (:parent #4 #("Purpose of this document" 0 24 (:parent #2) (:input-file "/home/vladimir/tmp/test2.org" :title ("Test document number 2") :html-extension "html" :html-link-home "" :html-link-up "" :html-mathjax "" :html-postamble auto :html-preamble t :html-style "" :html-style-extra "" :html-style-include-default t :html-style-include-scripts t :html-table-tag "" :creator "Generated by http://orgmode.org\";>Org mode 7.9.3e in http://www.gnu.org/software/emacs/\";>Emacs 24.3.50.1." :with-latex t :infojs-opt nil :author ("Vladimir Lomov") :date nil :description nil :email "vladi...@smoon3.smoon.org" :exclude-tags ("noexport") :headline-levels 3 :keywords nil :language "en" :preserve-breaks nil ...)) org-export-data((link (:type "file" :path "test1.org" :raw-link "file:test1.org::*Purpose%20of%20this%20document&q
Re: [O] Org css
Hi, ** flav [2012-12-10 13:03:52 +0100]: > Hello, > I can't find out the css of the orgmode web site. > Is it possible to get it ? > Where ? > Thanks wget http://orgmode.org/org.css --- WBR, Vladimir Lomov -- Money will say more in one moment than the most eloquent lover can in years.
Re: [O] How to force markup without spaces
Hello, ** cin...@gmail.com [2012-11-19 14:32:21 +0900]: > Hi, > AFAIK, if the markup syntax (=code=, *bold*, ..) is directly followed > by non-whitespace characters, then it will not be marked-up: >=hello=there >/not/italic > This may be right decision on English text, but in some languages, the > postposition (grammar) will be postfixed without spaces into the > previous noun, so it will be the trouble. (Following text contains > Korean characters in UTF-8, you may need additional korean font to > read properly) >=printf=는 >=bold=로 >=철수=는 > I'm sure that some other languages will have same problem > (e.g. Japanese or Chinese). > Is there any way to force mark-up on this situation? > If this pattern cannot be implemented easily, how about to introduce > new escaping character to prevent to insert whitespace between > marked-up text and the following postfix text? For example: > =printf=\is => rendered in HTML: printfis > *bold*\asdf => rendered in HTML: boldasdf > /철수/\는=> rendered in HTML: 철수는 > I can't say the above solution is well-designed, but I'm sure that > you'll get the point. May be this will help you: http://article.gmane.org/gmane.emacs.orgmode/46263/match=zero+width+space -- "Had he and I but met By some old ancient inn,But ranged as infantry, We should have sat us down to wet And staring face to face, Right many a nipperkin! I shot at him as he at me, And killed him in his place. I shot him dead because -- Because he was my foe, He thought he'd 'list, perhaps, Just so: my foe of course he was; Off-hand-like -- just as I -- That's clear enough; although Was out of work -- had sold his traps No other reason why. Yes; quaint and curious war is! You shoot a fellow down You'd treat, if met where any bar is Or help to half-a-crown." -- Thomas Hardy
Re: [O] Bib file path relative to home using tilde ~ in Ubuntu
Hello, ** Sanjib Sikder [2012-10-14 11:53:52 +0530]: > Hi, > >> First of all can you confirm your .bashrc setting is working.? >> in the terminal >> --8<---cut here---start->8--- >> echo $BIBINPUTS > --8<---cut here---end--->8--- > *Here is the output* > ~$ echo $BIBINPUTS > .//:/home/USERNAME/bst//:.//:/home/USERNAME/bibFiles//: > -- >> and also can you check what is the value of BIBINPUTS in emacs.? Within >> Emacs >> evaluate the following (either in scratch buffer or with key press `M-:' or >> with `M-x eval-expression') >> --8<---cut here---start->8--- >> (getenv "BIBINPUTS") >> --8<---cut here---end--->8--- > *OUTPUT* is: nil > - >> May be the last resort would be setting the variable within your .emacs >> --8<---cut here---start->8--- >> (setenv "BIBINPUTS" ".:$HOME/bib:") >> --8<---cut here---end--->8--- > I will try this one > - > BTW how you are starting emacs? (command line or gui mouse click?) > I am starting emacs from GUI mouse click. All the above tests are done only > with the .bashrc, i.e., after removing the lines from .profile and .gnomerc You use incorrert path for bibtex files, use $HOME/texmf/bibtex/bib this is the standard. latex as well as bibtex searches for files in standard paths, like the one above. If your files located in other places you have to set env. variables (TEXINPUTS and BIBINPUTS). However setting env. variables is a bit tricky. If one uses only terminal session it is enough to set variables in apropriate RC files: bash uses ~/.bash_profile and ~/.bashrc depending on type of shell (login or not), for zsh see manual. When run graphical session it depends what DE and DM are used. GNOME, Unity launched by gdm or lightdm read user settings from ~/.profile --- WBR, Vladimir Lomov -- Walk softly and carry a big stick. -- Theodore Roosevelt
Re: [O] The "problem" with `flet' in Org-mode and (future) Emacs 24.2
Hello, ** Eric Schulte [2012-07-20 11:43:45 -0600]: [...] > Okay, I've noticed a number of these errors as well. It looks like the > old version of flet allowed the definition of recursive functions, but > the new cl-flet does not. > Below find my previous patch which now uses cl-flet* instead of cl-flet > in org-flet. This should be a universal fix. > Best, Thanks, would work fine with this small change: --- 0001-replace-flet-labels-with-org-flet-org-labels.patch.orig 2012-07-22 09:10:44.0 +0900 +++ 0001-replace-flet-labels-with-org-flet-org-labels.patch 2012-07-21 23:09:37.0 +0900 @@ -370,7 +370,7 @@ "Check if PARAMS require expansion in CONTEXT. CONTEXT may be one of :tangle, :export or :eval." - (flet ((intersect (as bs) -+ (org-flet ((intersect (as bs) ++ (org-labels ((intersect (as bs) (when as (if (member (car as) bs) (car as) --- WBR, Vladimir Lomov -- The core is not frozen, but slushy. -- Larry Wall in <199705101952.maa00...@wall.org>
Re: [O] The "problem" with `flet' in Org-mode and (future) Emacs 24.2
Hello, ** Vladimir Lomov [2012-07-20 10:19:45 +0900]: > ** Vladimir Lomov [2012-07-19 21:33:57 +0900]: >> Hello, >>> ** Eric Schulte [2012-07-18 22:13:45 -0600]: >>> This attached alternate patch introduces two new compatibility macros >>> named `org-flet' and `org-labels' in org-macs.el. These macros are >>> aliased to the appropriate cl macro depending on the version of Emacs in >>> use. [...] >> This is interesting, but seems not fully functional. After applying >> patch I tried export to html but got >> Symbol's function definition is void: matches >> I'll compare your and mine patches later. > I found the source of that message, in my patch I use `cl-flet*' for > `ob.el' (around lines 1264). I don't remember exactly why star version > is needed but it works. > I changed a bit Eric's patch with recent changes from Jambunathan and > checked it with simple "Export to HTML" on my real Org document, it > works. I was too rush, I compared again Eric's patch with mine and found two discrepancy (actually I faced with a problem checked all again). I hope this is final patch. --- WBR, Vladimir Lomov -- Q: How many Zen masters does it take to screw in a light bulb? A: None. The Universe spins the bulb, and the Zen master stays out of the way. >From bdc1181b1860cf423f58fde19a9bf831c0f8dd9f Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 18 Jul 2012 22:11:36 -0600 Subject: [PATCH] replace flet/labels with org-flet/org-labels This patch ensure Org-mode will build on all supported versions of Emacs, after the renaming of the cl macros behind the cl- prefix in the recent Emacs trunk. * lisp/org-compat.el (org-emacs-full-version): For checking versions smaller than the minor version. (org-flet): Compatibility function now that flet has been removed from cl-macs. (org-labels): Compatibility function now that labels has been removed from cl-macs. * lisp/ob-R.el (org-compat): Require org-compat. * lisp/ob-comint.el: Require org-compat. * lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility function. * lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to compatibility function. * lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility function. (org-babel-lob-execute): Switch to compatibility function. * lisp/ob-python.el (org-babel-python-evaluate-session): Switch to compatibility function. * lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility function. * lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility function. * lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility function. (org-babel-tangle): Switch to compatibility function. (org-babel-spec-to-string): Switch to compatibility function. * lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility function. (org-babel-execute-src-block): Switch to compatibility function. (org-babel-edit-distance): Switch to compatibility function. (org-babel-switch-to-session-with-code): Switch to compatibility function. (org-babel-sha1-hash): Switch to compatibility function. (org-babel-balanced-split): Switch to compatibility function. (org-babel-join-splits-near-ch): Switch to compatibility function. (org-babel-get-rownames): Switch to compatibility function. (org-babel-format-result): Switch to compatibility function. (org-babel-insert-result): Switch to compatibility function. (org-babel-examplize-region): Switch to compatibility function. (org-babel-merge-params): Switch to compatibility function. (org-babel-noweb-p): Switch to compatibility function. (org-babel-expand-noweb-references): Switch to compatibility function. * lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility function. (org-bibtex-fleshout): Switch to compatibility function. (org-bibtex-read): Switch to compatibility function. (org-bibtex-write): Switch to compatibility function. * lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to compatibility function. * lisp/org-exp.el (org-export-format-source-code-or-example): Switch to compatibility function. * lisp/org-macs.el (org-called-interactively-p): Indentation fix. * lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility function. (org-mouse-set-priority): Switch to compatibility function. (org-mouse-popup-global-menu): Switch to compatibility function. (org-mouse-context-menu): Switch to compatibility function. * lisp/org-plot.el (org-plot/gnuplot-to-grid-data): Switch to compatibility function. (org-plot/gnuplot-script): Switch to compatibility function. * lisp/org.el (org-entry-get): Switch to compatibility function. (org-fill-paragraph): Switch to compatibility function. (org-auto-fill-function): Switch to compatibility function. --- lisp/ob-awk.el
Re: [O] The "problem" with `flet' in Org-mode and (future) Emacs 24.2
** Vladimir Lomov [2012-07-19 21:33:57 +0900]: > Hello, > ** Eric Schulte [2012-07-18 22:13:45 -0600]: >> Achim Gratz writes: >>> Eric Schulte writes: >>>> This attached alternate patch introduces two new compatibility macros >>>> named `org-flet' and `org-labels' in org-macs.el. These macros are >>>> aliased to the appropriate cl macro depending on the version of Emacs in >>>> use. >>> Wouldn't you want to use defmacro instead of defalias? >> Why? Using `defalias' seems simpler because with `defmacro' I would >> have to copy the macro arguments and stub out a trivial macro body. >> Also, this way the version check only happens once (at load time), >> rather than every time the macro is called. >>> Also, I'd think that these two macros should go into org-compat.el >>> instead of org-macs.el. >> Agreed, I forgot about org-compat. The alternate patch below moves >> these definitions from org-macs.el to org-compat.el. >> Thanks, > [...] > This is interesting, but seems not fully functional. After applying > patch I tried export to html but got > Symbol's function definition is void: matches > I'll compare your and mine patches later. I found the source of that message, in my patch I use `cl-flet*' for `ob.el' (around lines 1264). I don't remember exactly why star version is needed but it works. I changed a bit Eric's patch with recent changes from Jambunathan and checked it with simple "Export to HTML" on my real Org document, it works. I attached modified patch. P.S. Seems I remember why I was confused: the `flet' function has to be changed in one places to `cl-flet' but in others to `cl-flet*'. --- WBR, Vladimir Lomov -- Do YOU have redeeming social value? >From bdc1181b1860cf423f58fde19a9bf831c0f8dd9f Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Wed, 18 Jul 2012 22:11:36 -0600 Subject: [PATCH] replace flet/labels with org-flet/org-labels This patch ensure Org-mode will build on all supported versions of Emacs, after the renaming of the cl macros behind the cl- prefix in the recent Emacs trunk. * lisp/org-compat.el (org-emacs-full-version): For checking versions smaller than the minor version. (org-flet): Compatibility function now that flet has been removed from cl-macs. (org-labels): Compatibility function now that labels has been removed from cl-macs. * lisp/ob-R.el (org-compat): Require org-compat. * lisp/ob-comint.el: Require org-compat. * lisp/ob-exp.el (org-babel-exp-do-export): Switch to compatibility function. * lisp/ob-gnuplot.el (org-babel-expand-body:gnuplot): Switch to compatibility function. * lisp/ob-lob.el (org-babel-lob-get-info): Switch to compatibility function. (org-babel-lob-execute): Switch to compatibility function. * lisp/ob-python.el (org-babel-python-evaluate-session): Switch to compatibility function. * lisp/ob-ref.el (org-babel-ref-index-list): Switch to compatibility function. * lisp/ob-sh.el (org-babel-sh-var-to-string): Switch to compatibility function. * lisp/ob-tangle.el (org-babel-load-file): Switch to compatibility function. (org-babel-tangle): Switch to compatibility function. (org-babel-spec-to-string): Switch to compatibility function. * lisp/ob.el (org-babel-view-src-block-info): Switch to compatibility function. (org-babel-execute-src-block): Switch to compatibility function. (org-babel-edit-distance): Switch to compatibility function. (org-babel-switch-to-session-with-code): Switch to compatibility function. (org-babel-sha1-hash): Switch to compatibility function. (org-babel-balanced-split): Switch to compatibility function. (org-babel-join-splits-near-ch): Switch to compatibility function. (org-babel-get-rownames): Switch to compatibility function. (org-babel-format-result): Switch to compatibility function. (org-babel-insert-result): Switch to compatibility function. (org-babel-examplize-region): Switch to compatibility function. (org-babel-merge-params): Switch to compatibility function. (org-babel-noweb-p): Switch to compatibility function. (org-babel-expand-noweb-references): Switch to compatibility function. * lisp/org-bibtex.el (org-bibtex-headline): Switch to compatibility function. (org-bibtex-fleshout): Switch to compatibility function. (org-bibtex-read): Switch to compatibility function. (org-bibtex-write): Switch to compatibility function. * lisp/org-exp-blocks.el (org-export-blocks-preprocess): Switch to compatibility function. * lisp/org-exp.el (org-export-format-source-code-or-example): Switch to compatibility function. * lisp/org-macs.el (org-called-interactively-p): Indentation fix. * lisp/org-mouse.el (org-mouse-timestamp-today): Switch to compatibility function. (org-mouse-set-priority): Switch to compat
Re: [O] The "problem" with `flet' in Org-mode and (future) Emacs 24.2
Hello, ** Eric Schulte [2012-07-18 22:13:45 -0600]: > Achim Gratz writes: >> Eric Schulte writes: >>> This attached alternate patch introduces two new compatibility macros >>> named `org-flet' and `org-labels' in org-macs.el. These macros are >>> aliased to the appropriate cl macro depending on the version of Emacs in >>> use. >> Wouldn't you want to use defmacro instead of defalias? > Why? Using `defalias' seems simpler because with `defmacro' I would > have to copy the macro arguments and stub out a trivial macro body. > Also, this way the version check only happens once (at load time), > rather than every time the macro is called. >> Also, I'd think that these two macros should go into org-compat.el >> instead of org-macs.el. > Agreed, I forgot about org-compat. The alternate patch below moves > these definitions from org-macs.el to org-compat.el. > Thanks, [...] This is interesting, but seems not fully functional. After applying patch I tried export to html but got Symbol's function definition is void: matches I'll compare your and mine patches later. --- WBR, Vladimir Lomov -- Never underestimate the bandwidth of a station wagon full of tapes. -- Dr. Warren Jackson, Director, UTCS
[O] The "problem" with `flet' in Org-mode and (future) Emacs 24.2
Hello, I'm using Emacs compiled from BZR trunk and Org-mode compiled from GIT. Begining from some revision (I don't remember exact revno) function `flet' was declared obsolete so Org-mode compilation is accompanied with warnings about that. If just ignore them then I get malfunction Org-mode. I made patch to change all `flet's to appropriate functions and it works. The problem is that these functions are new too. As I see it, the patch will "break" compatability with current and older versions of Emacs. WDYT? P.S. As I remember there are at least two problems with Org-mode compiled _without_ patch: exporting to HTML and code tangling. -- Nouvelle cuisine, n.: French for "not enough food". Continental breakfast, n.: English for "not enough food". Tapas, n.: Spanish for "not enough food". Dim Sum, n.: Chinese for more food than you've ever seen in your entire life. flet2cl-flet.patch.bz2 Description: BZip2 compressed data
Re: [O] Is Org mode gonna break on emacs 24.50.1x ?
Hello, ** Achim Gratz [2012-06-26 06:52:19 +0200]: > Baptiste Fouques writes: >> * lisp/emacs-lisp/cl.el (flet): Don't autoload. >> Makes my org not working in several places (babel, coupling with >> remenber, …). I think that the point in using 'flet' has appears >> several times in this group. It seems to become more crucial here. > All the files using flet (and other cl macros) should have an > (eval-when-compile (require 'cl)) > before first use, so whether or not flet is autoloaded should be a moot > point. If they don't, it's a bug in org. If they do and it still > doesn't work, the bug may be in org, but more likely in Emacs. I don't know if I understand what I do but I changed several `flet' to `labels' (I read `cl.el' and they go consequently). I post small patch that works for me, if it is ok (and I don't mess all around) I can change all other `flet' (but I can't check them all). > Regards, > Achim. Thanks again Achim, you point me in right direction (to change function :). P.S. Patch is bziped though it is small enough. --- WBR, Vladimir Lomov -- If you look good and dress well, you don't need a purpose in life. -- Robert Pante, fashion consultant flet-labels.patch.bz2 Description: BZip2 compressed data
Re: [O] Is Org mode gonna break on emacs 24.50.1x ?
Hello, ** Achim Gratz [2012-06-26 06:52:19 +0200]: > Baptiste Fouques writes: >> * lisp/emacs-lisp/cl.el (flet): Don't autoload. >> Makes my org not working in several places (babel, coupling with >> remenber, …). I think that the point in using 'flet' has appears >> several times in this group. It seems to become more crucial here. > All the files using flet (and other cl macros) should have an > (eval-when-compile (require 'cl)) > before first use, so whether or not flet is autoloaded should be a > moot point. I've searched the source (git actually) found where (require 'cl) is used without `eval-when-compile' (just a few, htmlize.el is an example) and changed them apropriately. Nothing changed, tangling is not working. > If they don't, it's a bug in org. > If they do and it still doesn't work, the bug may be in org, but more > likely in Emacs. So I dont' know where a bug is. I only know which rev. triggers it. > Regards, > Achim. --- WBR, Vladimir Lomov -- We didn't put in ^^ because then we'd have to keep telling people what it means, and then we'd have to keep telling them why it doesn't short circuit. :-/ -- Larry Wall in <199707300650.xaa05...@wall.org>
Re: [O] Is Org mode gonna break on emacs 24.50.1x ?
Hello, ** Baptiste Fouques [2012-06-25 17:38:22 +0200]: > Hi, > thanks all for org. > I wonder whether org-mode is going to break badly on next emacs > cleanup. IMHO, yes, see my message under topic 'Export and tangling is broken for Emacs rev. 108681+' (actually it should be 'Export and tangling are broken...') http://article.gmane.org/gmane.emacs.orgmode/57278 > --- > commit 1e211d886c96420904ad197cfee7fce7ae7b9d83 (HEAD, refs/heads/master) > Author: Stefan Monnier > Date: Fri Jun 22 09:42:38 2012 -0400 > … > * lisp/emacs-lisp/cl.el (flet): Don't autoload. > … > --- This is bzr rev. 108681 > Makes my org not working in several places (babel, coupling with > remenber, …). I think that the point in using 'flet' has appears > several times in this group. It seems to become more crucial here. > Don't think that the problem of emacs, but org … > Thanks. I'll wait the Org developers response. --- WBR, Vladimir Lomov -- I would like to urinate in an OVULAR, porcelain pool --
[O] Export and tangling is broken for Emacs rev. 108681+
Hello, as topic states, below example and extact messages copied from *Messages* buffer --- 8< --- #+TITLE: Example #+AUTHOR: Vladimir Lomov #+DESCRIPTION: This example shows a problem with Org mode and Emacs 108681 #+OPTIONS: LaTeX:dvipng ^:{} toc:nil num:nil * Example of code #+NAME: example #+BEGIN_SRC sh :tangle ex1-example :shebang "#!/bin/bash" echo "Hello, World" #+END_SRC When 'tangling' from Org document using =C-c C-v t= the minibuffer (echo area) shows #+BEGIN_EXAMPLE byte-code: Symbol's function definition is void: ap #+END_EXAMPLE When exporting to HTML using =C-c C-e h= in minibuffer I see #+BEGIN_EXAMPLE org-export-preprocess-string: Symbol's function definition is void: interblock #+END_EXAMPLE --- 8< --- P.S. I'm not familiar with emacs-lisp at all, but according to messages and bzr log I suspect the problem with bytecomp.el. Also, please note that GTK3 build is broken for revs. from 108687 til 108698, repaired in 108699. --- WBR, Vladimir Lomov -- Just once I would like to persuade the audience not to wear any article of blue denim. If only they could see themselves in a pair of brown corduroys like mine instead of this awful, boring blue denim. I don't enjoy the sky or sea as much as I used to because of this Levi character. If Jesus Christ came back today, He and I would get into our brown corduroys and go to the nearest jean store and overturn the racks of blue denim. Then we'd get crucified in the morning. -- Ian Anderson, of Jethro Tull
Re: [O] How to export both Asymptote code and its result
Hello, ** Nick Dokos [2012-05-30 03:31:02 -0400]: > Vladimir Lomov wrote: >> * Asymptote example >> Hello, can someone enlighten me what's the problem with the following >> example: >> I want to export both the Asymptote code and its (PNG) result: >> #+NAME: fig1 >> #+BEGIN_SRC asymptote :export code > This should be ``:exports both'' > See > (info "(org) exports") > Nick Thanks Nick, a typo :) I changed that and added ``:file "fig1.png"'' in header so now HTML has both: code and image. >> size(100); >> draw((0,0)--(1,0)--(1,1)--cycle); >> #+END_SRC >> This must be the result: >> #+CALL: fig1 :file "fig1.png" So I don't get the idea of ``#+CALL''. It doesn't work in this case. I thought I can show code and after small explanation the resulted image. But seems I'm allowed to get PNG file only with BEGIN|END_SRC block while image be placed right after the block. I came to this: #+NAME: fig1 #+BEGIN_SRC asymptote :exports both :results silent :file "fig1.png" <> #+END_SRC Result:\\ [[./fig1.png]] This is essential that I want. Thanks again. >> What I expect: the (highlighted) code and below it the resulted image. >> I added Asymptote to the list of Babel "active" languages >> #+BEGIN_SRC emacs-lisp >> ;;; Before lines are skipped >> (org-babel-do-load-languages >> 'org-babel-load-languages >> '((emacs-lisp . t) >> (gnuplot . t) >> (asymptote . t) >> (latex . t) >> (perl . t) >> (sh . t)) >> ) >> ;;; Rest lines are too. >> #+END_SRC >> When I export to HTML I confirm the code evaluation, >> but instead of the code and result I get nothing. >> If I comment the =asymptote= setting in above code then I get the code >> but not the image. >> Is it limitation of Asymptote support or I do something wrong? >> Also, I don't understand why viewer is run to show me the result of >> code evaluation (actually I know, because of ~-V~ option passed to >> ~asy~, but why it is passed to it?). >> My env: >> Emacs 24.1.50.1 (compiled from BZR trunk) >> Org-mode version 7.8.11 (=release_7.8.11-18-g244331 @ >> /usr/share/emacs/site-lisp/org/=) --- WBR, Vladimir Lomov -- A prisoner of war is a man who tries to kill you and fails, and then asks you not to kill him. -- Sir Winston Churchill, 1952
[O] How to export both Asymptote code and its result
* Asymptote example Hello, can someone enlighten me what's the problem with the following example: I want to export both the Asymptote code and its (PNG) result: #+NAME: fig1 #+BEGIN_SRC asymptote :export code size(100); draw((0,0)--(1,0)--(1,1)--cycle); #+END_SRC This must be the result: #+CALL: fig1 :file "fig1.png" What I expect: the (highlighted) code and below it the resulted image. I added Asymptote to the list of Babel "active" languages #+BEGIN_SRC emacs-lisp ;;; Before lines are skipped (org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (gnuplot . t) (asymptote . t) (latex . t) (perl . t) (sh . t)) ) ;;; Rest lines are too. #+END_SRC When I export to HTML I confirm the code evaluation, but instead of the code and result I get nothing. If I comment the =asymptote= setting in above code then I get the code but not the image. Is it limitation of Asymptote support or I do something wrong? Also, I don't understand why viewer is run to show me the result of code evaluation (actually I know, because of ~-V~ option passed to ~asy~, but why it is passed to it?). My env: Emacs 24.1.50.1 (compiled from BZR trunk) Org-mode version 7.8.11 (=release_7.8.11-18-g244331 @ /usr/share/emacs/site-lisp/org/=) --- WBR, Vladimir Lomov -- You got to pay your dues if you want to sing the blues, And you know it don't come easy ... I don't ask for much, I only want trust, And you know it don't come easy ...
Re: [O] "Bad" interaction between flyspell and org-mode with latest Emacs
Hello, ** Bastien [2012-04-29 11:31:10 +0200]: > Hi Vladimir, > Vladimir Lomov writes: >> Emacs: bzr revno 108056 >> org-mode: 7.8.09-413-g21e24f @ /usr/share/emacs/site-lisp/org/org-install.el >> The same example file (~example.org~) and the same procecure to get >> "strange" behavior (I don't know how to explain it more precisely than >> that: run =C-c '= in src block, enter new line and immediately run =C-c >> '= again), but now there is not message in echo area about 'flyspell'. > [...] >> Revno 108011 is ok with this example. > So a more recent Emacs does not have this problem? Well, may be I said it too obscure, it is ok for revno <= 108011, but >= 10812 have problem. > Anyway, looks like it's more related to Emacs than to Org anyway... > I'm putting this out of my radar, maybe others might help. Sorry! I've already reported on bug#11351 (seems bug#9642 somehow related with this issue), but I'm not confident that it is the same issue. I'll send my reply to that thread. --- WBR, Vladimir Lomov -- Fashions have done more harm than revolutions. -- Victor Hugo
Re: [O] "Bad" interaction between flyspell and org-mode with latest Emacs
Hello Bastien, ** Bastien [2012-04-27 23:49:06 +0200]: > Hello Vladimir, > I can't reproduce the problem you describe, but maybe I misunderstood > some of the steps... if you can, please describe a reproducible recipe. > Also mention Org's version explicitely. > I'm not using flyspell regularily, only for testing, so perhaps > others will have more helpful answers! It took me awhile to prepare minimal example. Emacs: bzr revno 108056 org-mode: 7.8.09-413-g21e24f @ /usr/share/emacs/site-lisp/org/org-install.el The same example file (~example.org~) and the same procecure to get "strange" behavior (I don't know how to explain it more precisely than that: run =C-c '= in src block, enter new line and immediately run =C-c '= again), but now there is not message in echo area about 'flyspell'. I prepared ~debug.el~ to run Emacs: $ emacs -Q -l ~/tmp/debug.el #+name: debug.el #+begin_src elisp (setq load-path (cons "/usr/share/emacs/site-lisp/org" load-path)) (custom-set-variables '(show-paren-mode t) ) (require 'org-install) #+end_src Again, it is rather hard to catch this, once I run the sequence of commands and seems it is ok, but next time it hangs (I run emacs in cgroup controlled environment with switched off swap so emacs is killed when memory is exhausted) Revno 108011 is ok with this example. P.S. There is similar bug report already (bug#11351), I posted my original message there, but now I not sure if it is the same problem. --- WBR, Vladimir Lomov -- Usage: fortune -P [-f] -a [xsz] Q: file [rKe9] -v6[+] file1 ...
[O] "Bad" interaction between flyspell and org-mode with latest Emacs
Hello, #+TITLE: Example with org-mode and flyspell on. #+AUTHOR: Vladimir Lomov * Org-mode src blocks and flyspell I faced with strange problem with Emacs and org-mode. In my real example I use src blocks and run =C-c '= to edit them in native mode (shell). If I enter into native mode, put new line and immediately run =C-c '= to return to org document Emacs hangs and consume all available memory (RAM and SWAP). Curiously that such behavior see only with revno 108012. In echo area I see message: #+BEGIN_QUOTE Error in post-command-hook (flyspell-post-command-hook): (error "Marker does not point anywhere") #+END_QUOTE This is extract from my document: #+BEGIN_SRC sh :exports code _num=${1:=_num} _num=$(( _num%5 )) #+END_SRC I enter into block, run =C-c '=, add new line between lines and run immediately =C-c '= again. If I open the file again in Emacs and run =M-x flyspell-mode= (in echo area I see 'flyspell disable') and do the same — I again get hang and memory consumption. If I commented the line in mine .emacs file: (add-hook 'org-mode-hook 'flyspell-mode) and tried again — all works fine. Is this known behavior or new "bug"? ** Info Emacs: build from BZR (rev. 108012+) vs GTK3; org-mode: packaged from git and installed in my system (Archlinux). P.S. I reported this here because don't know how to trigger similar behavior without org-mode. --- WBR, Vladimir Lomov -- If you notice that a person is deceiving you, they must not be deceiving you very well.
Re: [O] [PATCH] org-preview-latex-fragment not working with #+latex_header:\input{}
Hello, ** Benjamin Motz [2012-04-20 19:28:43 +0200]: > Bug: > #+latex_header:\input{commands.tex} is not considered in > org-preview-latex-fragment. Reason: the fragment is generated in /tmp > from where the file commands.tex can not be found. In my case, > commands.tex contains essential latex-code for displaying the > latex-fragment, so I consider this to be a bug. IMHO, you doing it in wrong way, I presume you are using some Linux: create ~/texmf/tex/latex/ben and put there your `commands.tex', then `\input{commands.tex}' will pick up that file. Of course it is true for LaTeX, if you use plain TeX use `~/texmf/tex/plain/ben' directorythen. > I have set the environment variable TEXINPUTS in > (org-create-formula-image) to work around this bug (see patch). Don't do it. If it is Ok to use in isolated environment and only once the TEXINPUTS variable it is bad practice. > However, this is the first time that I have written something like a > patch and furthermore I'm not at all familiar with lisp-programming. So > could you please have a look at my solution and tell me if it's complete > crap and how it could be done better?! > If it's no crap, I presume it should be submitted. > Thank you, Benjamin > diff --git a/org.el b/org.el.orig > index 4f5bef0..b1c15fb 100644 > --- a/org.el > +++ b/org.el.orig > @@ -17040,7 +17040,6 @@ inspection." >(condition-case nil > (progn > (cd tmpdir) > - (setenv "TEXINPUTS" concat(default-directory ":.:")) > (call-process "latex" nil nil nil texfile)) > (error nil)) > (cd dir)) P.S. I'm using org with latex math code and all works fine (I'm using very customized setup but it works very well). --- WBR, Vladimir Lomov -- I knew her before she was a virgin. -- Oscar Levant, on Doris Day
Re: [O] Problem with exporting TAB key
Hello, ** Bastien [2012-04-06 11:11:00 +0200]: > Hi Vladimir, > Vladimir Lomov writes: >> Just tried, I commented that line in org-exp.el, run Emacs open ORG file >> export it to HTML and tangle it. HTML document has spaces instead of TAB >> as well as shell file. > Can you try the change proposed by Nick in combination with > (setq org-src-preserve-indentation t) > an report? Details: 1. I (temporary) removed org files distributed with Emacs; 2. Tried following combinations: A - commented `untabify' line in `org-exp.el' B - run emacs with `org-src-preserve-indentation' set to `t' not(A) & not(B) -> TAB is replaced with spaces in `ex2.sh' A & not(B) -> TAB is replaced with spaces not(A) & B -> TAB remains in `ex2.sh' A & B -> TAB remains I'm not sure if step 1 is required but I want to be sure that org files which are in `/usr/share/emacs/site-package' to be used. I use package manager of my distro (Archlinux) to install Emacs compiled from source (bzr repo) and org package, taken from git repo (org files are installed to `/usr/share/emacs/site-package/org{,_contrib}'). P.S. There is another issue with indentation: when using `C-c '' to edit source block in appropriate major mode, then in case of shell one, it adds extra two spaces at begin on any command. If `org-src-preserve-indentation' is set to `t' that two spaces remains, though it is not big problem. --- WBR, Vladimir Lomov -- Drinking coffee for instant relaxation? That's like drinking alcohol for instant motor skills. -- Marc Price
Re: [O] [BUG] html export and org results block and indentation
Hello, ** Bastien [2012-04-06 10:54:13 +0200]: > Hi Vladimir, > Vladimir Lomov writes: >> How about that: >> [see attached file "ex.org"] >> I run it with my standard configuration (at end of attached file) and with >> emacs -Q -eval "(setq org-modules '(org-special-blocks))" ex.org > Thanks for this info. >> P.S. I looked into git log but the only recent changes in >> org-special-blocks.el were variable renaming: 'line' -> >> 'org-special-blocks-line'. > That's the problem indeed. > I reverted this commit: > http://orgmode.org/w/?p=org-mode.git;a=commit;h=9054ba39d085dc2910285a194ed2206b36875289 > Please confirm this fixes your problem. > Best, Just tried with fresh git commit, it works with enabled `org-special-blocks', thanks. --- WBR, Vladimir Lomov -- Q: How do you play religious roulette? A: You stand around in a circle and blaspheme and see who gets struck by lightning first.
Re: [O] Problem with exporting TAB key
Hello, ** Nick Dokos [2012-04-05 00:13:10 -0400]: > Vladimir Lomov wrote: >> #+TITLE: Problem with exporting TAB key >> #+AUTHOR: Vladimir Lomov >> * How to make TAB key to be exported from ORG document? >> Consider the following example: >> #+name: ex1 >> #+BEGIN_SRC sh :exports code >> sort -t "" -k 3 -o file2 file1 >> sort -t "" -k 3 -o file3 file >> #+END_SRC >> How I inserting the TAB key in example: for first line I use =C-q >> C-I=, for second line I use =C-q TAB=, but in tangled file and in >> exported HTML document it is NOT a TAB just spaces. >> How to force export and tangle functions not to convert TAB to spaces? > You can't: org-export-preprocess-string (in lisp/org-exp.el) contains a > call to untabify: > (untabify (point-min) (point-max)) > which converts tabs to spaces, no questions asked. I don't know why that > is, so maybe Bastien or Carsten can tell us the reason. > If you are feeling adventurous, you might want to try commenting out > that call and see what, if anything, breaks. Just tried, I commented that line in org-exp.el, run Emacs open ORG file export it to HTML and tangle it. HTML document has spaces instead of TAB as well as shell file. If there is no other way to preserve TAB in tangled file (I only concern with tanlged file) I will use another symbol to separate fields. >> * COMMENT >> #+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes >> <> >> #+END_SRC --- WBR, Vladimir Lomov -- College: The fountains of knowledge, where everyone goes to drink.
Re: [O] [bug] void-variable org-special-blocks-line when exporting to HTML
Hello, ** Bastien [2012-04-05 12:31:37 +0200]: > Hi Sébastien, > "Sebastien Vauban" writes: >> On Org-mode version 7.8.08 (release_7.8.07.217.gcf3b.dirty), >> I just experienced this when exporting to HTML: > I cannot reproduce this. Please provide the minimal setup for > reproducing this bug -- thanks! This sounds similar to http://article.gmane.org/gmane.emacs.orgmode/54278 (sorry I don't know other way to refer to message in mailing list). --- WBR, Vladimir Lomov -- Extraordinary claims demand extraordinary proof. There are many examples of outsiders who eventually overthrew entrenched scientific orthodoxies, but they prevailed with irrefutable data. More often, egregious findings that contradict well-established research turn out to be artifacts. I have argued that accepting psychic powers, reincarnation, "cosmic conciousness," and the like, would entail fundamental revisions of the foundations of neuroscience. Before abandoning materialist theories of mind that have paid handsome dividends, we should insist on better evidence for psi phenomena than presently exists, especially when neurology and psychology themselves offer more plausible alternatives. -- Barry L. Beyerstein, "The Brain and Conciousness: Implications for Psi Phenomena".
Re: [O] Problem with exporting TAB key
Hello, ** Olaf Meeuwissen [2012-04-05 14:01:37 +0900]: > Vladimir Lomov writes: >> Hello, >> ** Nick Dokos [2012-04-05 00:13:10 -0400]: >>> Vladimir Lomov wrote: >>>> #+TITLE: Problem with exporting TAB key >>>> #+AUTHOR: Vladimir Lomov >>>> * How to make TAB key to be exported from ORG document? >>>> Consider the following example: >>>> #+name: ex1 >>>> #+BEGIN_SRC sh :exports code >>>> sort -t " " -k 3 -o file2 file1 >>>> sort -t " " -k 3 -o file3 file >>>> #+END_SRC >>>> How I inserting the TAB key in example: for first line I use =C-q >>>> C-I=, for second line I use =C-q TAB=, but in tangled file and in >>>> exported HTML document it is NOT a TAB just spaces. > Just a thought but can't you use "\t"? That would be to simple :D. P.S. I wouldn't bother with and ^I if "\t" just work, it is much simple to type "\t" than ~C-q ~ or ~C-q ^I~, and portable. $ sort --version sort (GNU coreutils) 8.16 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Written by Mike Haertel and Paul Eggert. --- WBR, Vladimir Lomov -- Burnt Sienna. That's the best thing that ever happened to Crayolas. -- Ken Weaver
Re: [O] Problem with exporting TAB key
Hello, ** Nick Dokos [2012-04-05 00:13:10 -0400]: > Vladimir Lomov wrote: >> #+TITLE: Problem with exporting TAB key >> #+AUTHOR: Vladimir Lomov >> * How to make TAB key to be exported from ORG document? >> Consider the following example: >> #+name: ex1 >> #+BEGIN_SRC sh :exports code >> sort -t "" -k 3 -o file2 file1 >> sort -t "" -k 3 -o file3 file >> #+END_SRC >> How I inserting the TAB key in example: for first line I use =C-q >> C-I=, for second line I use =C-q TAB=, but in tangled file and in >> exported HTML document it is NOT a TAB just spaces. >> How to force export and tangle functions not to convert TAB to spaces? > You can't: org-export-preprocess-string (in lisp/org-exp.el) contains a > call to untabify: > (untabify (point-min) (point-max)) Now I understand why I get such results. > which converts tabs to spaces, no questions asked. I don't know why that > is, so maybe Bastien or Carsten can tell us the reason. I would be glad to hear the reason. > If you are feeling adventurous, you might want to try commenting out > that call and see what, if anything, breaks. I can do other thing: use another symbol to separate fields (I'm writing a script using literate programming approach and ORG, so it is a matter of taste what to use as separator), but I'll try your suggestion also. > Nick Thanks Nick. >> * COMMENT >> #+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes >> <> >> #+END_SRC P.S. I noticed that you send message to my e-mail directly and CC to mailing list. Is it "good practice" or just a habit? I thought that answering to ML only is enough. --- WBR, Vladimir Lomov -- Why use Windows, since there is a door? (By fac...@galileo.rhein-neckar.de, Andre Fachat)
[O] Problem with exporting TAB key
#+TITLE: Problem with exporting TAB key #+AUTHOR: Vladimir Lomov * How to make TAB key to be exported from ORG document? Consider the following example: #+name: ex1 #+BEGIN_SRC sh :exports code sort -t " " -k 3 -o file2 file1 sort -t " " -k 3 -o file3 file #+END_SRC How I inserting the TAB key in example: for first line I use =C-q C-I=, for second line I use =C-q TAB=, but in tangled file and in exported HTML document it is NOT a TAB just spaces. How to force export and tangle functions not to convert TAB to spaces? * COMMENT #+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes <> #+END_SRC --- WBR, Vladimir Lomov
Re: [O] [BUG] html export and org results block and indentation
Hello, ** Bastien [2012-04-03 08:26:12 +0200]: > Nick Dokos writes: >> Andreas Leha wrote: >>> The difference seems to come from me loading the module >>> org-special-blocks. Without loading this module, I also get your >>> result. >> One mystery down, two to go: so there is a (possible) bug in the html >> exporter with indented #+BEGIN_ORG/#+END_ORG blocks and another >> (possible) bug in org-special-blocks: they are multiplying like >> rabbits :-) > So let's herd rabbits and hang them thread by thread: can you/Andreas > post a bug report for each rabbit with a description of the rabbit's > anatomy and a way to double-check its anatomy? How about that: [see attached file "ex.org"] I run it with my standard configuration (at end of attached file) and with emacs -Q -eval "(setq org-modules '(org-special-blocks))" ex.org P.S. I looked into git log but the only recent changes in org-special-blocks.el were variable renaming: 'line' -> 'org-special-blocks-line'. I remember that export function works Mar. 31 but don't remember what commit of org-mode this was. --- WBR, Vladimir Lomov -- "sic transit discus mundi" (From the System Administrator's Guide, by Lars Wirzenius) ex.org Description: Lotus Organizer
[O] [PATCH] Adding Russian translation for org-exp
Hello, I prepared small patch to add Russian translation to org-exp. --- WBR, Vladimir Lomov -- Weiner's Law of Libraries: There are no answers, only cross references. diff --git a/lisp/org-exp.el b/lisp/org-exp.el index 174619a..a1102a8 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -199,6 +199,7 @@ This option can also be set with the +OPTIONS line, e.g. \"-:nil\"." ("nb" "Forfatter" "Dato" "Innhold" "Fotnoter") ;; nb = Norsk (bokm.l) ("nn" "Forfattar" "Dato" "Innhald" "Fotnotar") ;; nn = Norsk (nynorsk) ("pl" "Autor" "Data" "Spis treści" "Przypis") +("ru" "Автор" "Дата" "Содержание" "Сноски") ("sv" "Författare" "Datum" "Innehåll" "Fotnoter")) "Terms used in export text, translated to different languages. Use the variable `org-export-default-language' to set the language,
[O] Including SVG images in html document
Hello, according to org mode documentation it is possible to include SVG images while exporting to Docbook, but is it possible to use them in html export too? Small example: #+TITLE: Export to HTML with SVG image #+AUTHOR: Vladimir Lomov * SVG image in HTML document #+name: gnuplot-img1 #+begin_src gnuplot :exports both set term svg set output "gnuplot-img1.svg" plot [-pi:pi] sin(x) #+end_src The graph of \sin(x) function in range [-\pi;\pi] [[file:gnuplot-img1.svg]] --- WBR, Vladimir Lomov -- No one can feel as helpless as the owner of a sick goldfish.
Re: [O] How to get header in second table generated by src block
Hello, ** Marc-Oliver Ihm [2012-03-10 17:58:52 +0100]: > Hi, > if you add ":colnames yes", like this: > #+call: raw-to-table[:exports results](table=raw2) :colnames yes > you get the headers, that you expect. Aha, I thought I should put ~:colnames~ inside ~[]~ > regards, Marc Thanks Marc. --- WBR, Vladimir Lomov -- "...and the fully armed nuclear warheads, are, of course, merely a courtesy detail."
[O] How to get header in second table generated by src block
--- 8< --- #+TITLE: One code two tables Hello, I'm adopting my workflow to org, and now I want to understand what I do wrong in following. Suppose I have two tables with headers and three columns. In export to html I want to get two tables with first and third columns only. The first table is #+name: raw-to-table #+begin_src emacs-lisp :var table=raw :exports results (mapcar (lambda (row) (if (equal row 'hline) ;; <- special handling for 'hline row (list (concat "~" (nth 0 row) "~") (nth 2 row table) #+end_src The second table is #+call: raw-to-table[:exports results](table=raw2) In my environment the second table doesn't have headers. Why? What I do wrong? * COMMENT The tables data #+tblname: raw | Key | Code | Description | |--+---+-| | KEY1 | CODE1 | DESCR1 | | KEY2 | CODE2 | DESCR2 | | KEY3 | CODE3 | DESCR3 | Second table, key, code and description differ. #+tblname: raw2 | Key| Code| Description | |+-+-| | KEY_A1 | CODE_A1 | DESCR_A1| | KEY_A2 | CODE_A2 | DESCR_A2| | KEY_A3 | CODE_A3 | DESCR_A3| P.S. This is not mine code I borrowed it from Eric Schulte. Thanks Eric for the code! P.S.S. The ~:exports results~ in ~#+call~ is taken from previous version of code when I tried src block with ~:exports none~ (at first I wanted to separate code and where to insert table). --- 8< --- -- It has been said that man is a rational animal. All my life I have been searching for evidence which could support this. -- Bertrand Russell