Re: [O] Elisp programming style
Tom Prince tom.pri...@ualberta.net writes: Perhaps ,--- | (defun main-function (args) | (let ((var (assoc :key1 args))) ; extracting var once | ... | (helper-function1 ... var ...) ; inside let using var | (helper-function2 ... var ...) ; inside let using var | )) | | (defun helper-function1 (var') | ... | ) | | (defun helper-function2 (var') | ... | ) `--- or ,- | (defun get-key1 (args) (assoc :key1 args)) | (defun main-function (args) | (let ((value (get-key1 args)) ; extracting var 1st time | ... | ) | (helper-function1 ...) ; outside let | (helper-function2 ...) ; outside let | ) | | (defun helper-function1 (args) | (let ((value (get-key1 args)) ; extracting var 2nd time | ... | )) | | (defun helper-function2 (args) | (let ((value (get-key1 args)) ; extracting var 3rd time | ... | )) `- I likely wouldn't suggest the second, unless get-key1 was actually something more complicated than your example. hmm ... I feel quite convinced now that having a standalone function is worth a bit of code duplication, and I start do discover that the cl package does have some nice functions (like flet). cheers -- Thorsten
[O] Incorrect html export link for %252F forward slash
Remember to cover the basics, that is, what you expected to happen and what in fact did happen. You don't know how to make a good report? See http://orgmode.org/manual/Feedback.html#Feedback Your bug report will be posted to the Org-mode mailing list. Problem: when exporting as html an org file that has links with URLs that contain %252F for a forward slash, the resulting html link description differs significantly from the link definition listed in the orgfile. For example, in the following example, the org file link description is Cannot reinstall an agent Whereas the resulting browser link is a href= http://publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V421.doc/fqz0_r_tbs_agent_cleanup.html //publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V421.doc/fqz0_r_tbs_agent_cleanup.html/a and this link is surrounded by additional text, including the original link description. The resulting href is correct and thus clicking on the links takes the browser user to the correct web page, but the extraneous and descriptive text is unexpected behavior. I am cutting links from firefox and pasting into org files. Of course an easy workaround is to replace %252F with /, but just in case this is a bug, I thought I would report it. I don't know if the source of the %252 in this case is the IBM web site or firefox. EXAMPLE Contents for org file (excluding the ==) == Then clean up common agent residue: [[ http://publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic%3D%252Fcom.ibm.tpc_V421.doc%252Ffqz0_r_tbs_agent_cleanup.html ][Cannot reinstall an agent]] in TPC 4.2.1 InfoCenter == Action performed by user on this file (or region of this file): C-c C-e h Resulting html looks like Then clean up common agent residue: [[http://publib.boulder.ibm.com/infocenter/tivihea href= http://publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V421.doc/fqz0_r_tbs_agent_cleanup.html //publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V421.doc/fqz0_r_tbs_agent_cleanup.html/av4r1/index.jsp?topic%3D%252Fcom.ibm.tpc_V421.doc%252Ffqz0_r_tbs_agent_cleanup.html][Cannot reinstall an agent]] in TPC 4.2.1 InfoCenter Which looks a bit like this in the browser: Then clean up common agent residue: [[ http://publib.boulder.ibm.com/infocenter/tivihe//publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V421.doc/fqz0_r_tbs_agent_cleanup.htmlv4r1/index.jsp?topic%3D%252Fcom.ibm.tpc_V421.doc%252Ffqz0_r_tbs_agent_cleanup.html ][Cannot reinstall an agent]] in TPC 4.2.1 InfoCenter If, in the org file, I replace the %252F character with the actual forward slash /, then the export works as expected. I am not sure that %252F is the problem, but it might be. Emacs : GNU Emacs 23.1.50.1 (i386-mingw-nt6.1.7601) of 2009-11-03 on LENNART-69DE564 (patched) Package: Org-mode version 7.7 current state: == (setq org-log-done 'note org-file-apps '((\\.pptx\\' . system) (\\.ppt\\' . system) (\\.xlsx\\' . system) (\\.xls\\' . system) (\\.docx\\' . system) (\\.doc\\' . system) (\\.odc\\' . system) (\\.odf\\' . system) (\\.odi\\' . system) (\\.otp\\' . system) (\\.odp\\' . system) (\\.otg\\' . system) (\\.odg\\' . system) (\\.ots\\' . system) (\\.ods\\' . system) (\\.odm\\' . system) (\\.ott\\' . system) (\\.odt\\' . system) (auto-mode . emacs) (\\.mm\\' . default) (\\.x?html?\\' . default) (\\.pdf\\' . default)) org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars) org-show-siblings nil org-speed-command-hook '(org-speed-command-default-hook org-babel-speed-command-hook) org-agenda-custom-commands '((pa Automation Project Summary ((tags-todo +Auto+TODO=\NEXT\) (tags-todo +Auto+TODO=\NEAR\) (tags-todo +Auto+TODO=\SOMEDAY\) (agenda )) ) (pp Project Project Summary ((tags-todo +Project+TODO=\NEXT\) (tags-todo +Project+TODO=\NEAR\) (tags-todo +Project+TODO=\SOMEDAY\) (agenda )) ) (pt Test Coverage Project Summary ((tags-todo +Test+TODO=\NEXT\) (tags-todo +Test+TODO=\NEAR\) (tags-todo +Test+TODO=\SOMEDAY\) (agenda )) ) (pi TivInt Project Summary ((tags-todo +TivInt+TODO=\NEXT\) (tags-todo +TivInt+TODO=\NEAR\) (tags-todo +TivInt+TODO=\SOMEDAY\) (agenda )) ) (pm task Management Project
Re: [O] The org paper manual - tools used
Hi Marcelo, Marcelo de Moraes Serpa celose...@gmail.com writes: How was the process, from org file to tex to paper? Brian Gough might be the one to answer this. Brian worked on improving org.texi by submitting a lot of patches -- improving the syntax, etc. See Org's git history around november-december 2010 to see these patches. Then I guess Brian exported this to PDF (texi2pdf?) before printing it. But I don't know the details. -- Bastien
Re: [O] [ANN] Org Mode parser v0.0.1 for NodeJs
Hi Eric, Eric Schulte schulte.e...@gmail.com writes: We should start a page on Worg with links to external tools for manipulating Org-mode files. Such a page could point to this implementation as well as the python, ruby org libraries and maybe even the Vim clone of Org-mode. There is such a page already: http://orgmode.org/worg/org-tools/index.html I've just updated it -- please check in 30 minutes. Also, VimOrganizer deserves a page for itself... don't know if this is still actively developed though. Best, -- Bastien
Re: [O] pycallgraph to org-mode
Hi Andrea, Andrea Crotti andrea.crott...@gmail.com writes: I think it might come very handy, is there anything already to convert a graphviz directed graph into an org-mode file (it might speed up the process)? Or any code I should take a look at? Not that i'm aware of. Let us know how it goes... -- Bastien
Re: [O] bad link on website
Hi Brian, Brian van den Broek brian.van.den.br...@gmail.com writes: The page http://orgmode.org/index.html#sec-4-1 contains the text Links below point to the development version of the manual. If you want to read the latest released manuals (currently for Org 7.7), please browse this directory. where this directory is a hyperlink to http://orgmode.org/manual/release_7.7/. For the record -- this has been fixed. -- Bastien
Re: [O] emacs 24.1 and org compatibility
Tassilo Horn tass...@member.fsf.org writes: Hi Tassilo! Usually, if you've adapted your `load-path' to include the org lisp direcory before requiring/loading anything from org, then all the bundled org files from emacs should be shadowed. Yeah, I thought so as well. I manage org-mode (git) and my other 3rd party packages with el-get [1]. In this case, somehow it does not play along with the way emacs handles this shadowing of built-in packages. The el-get init is pretty much the first thing I load from my emacs init file. So it should set the load-path accordingly. I am too busy right now to fix this, so for now I require the correct org-compat with an explicit path. cheers Footnotes: [1] https://github.com/dimitri/el-get
Re: [O] [odt] Support for annotations/comments
Hi Jambunathan, Jambunathan K kjambunat...@gmail.com writes: I needed an excuse for adding support for annotations. Exporting the below org will produce the attached odt/pdf files. Note that the pdf file is produced by LibreOffice pdf export. This is very nice, thanks! Annotations is a ODT only feature right now and will not work with other backends. We can also try to implement support for annotations for LaTeX: http://pdfcomment.berlios.de/doc/pdfcomment.pdf Mayber there are other libraries -- can anyone tell which one is the most usable/frequently-used/simple? Btw, I would favor #+begin_note as the keyword for annotations. -- Bastien
[O] #+LaTeX_CLASS regex too restrictive?
Hi there, I updated my org-mode repository last night and found today that my LaTeX export wasn't working anymore because it couldn't find the LaTeX class: No definition for class `%s' in `org-export-latex-classes'. The class name I'm using includes / characters. However, the regex for matching #+LaTeX_CLASS allows only alphabetic characters or -. The following change fixed this for me, but perhaps it's now a little too inclusive? diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 649e4a7..e9502ae 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1346,7 +1346,7 @@ LEVEL indicates the default depth for export. (save-restriction (widen) (goto-char (point-min)) - (and (re-search-forward ^#\\+LaTeX_CLASS:[ \t]*\\([-a-zA-Z]+\\) nil t) + (and (re-search-forward ^#\\+LaTeX_CLASS:[ \t]*\\(.+\\)$ nil t) (match-string 1 (plist-get org-export-latex-options-plist :latex-class) org-export-latex-default-class) Best, Richard -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Richard Lewis ISMS, Computing Goldsmiths, University of London Tel: +44 (0)20 7078 5134 Skype: richardjlewis JID: ironchic...@jabber.earth.li http://www.richardlewis.me.uk/ -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Re: [O] Makefile restructuring
Hi Achim On Fri, Oct 28, 2011 at 12:00, Achim Gratz strom...@nexgo.de wrote: As discussed in another thread, the version from git-describe is now also recorded into the info documentation. see here for the thread: http://lists.gnu.org/archive/html/emacs-orgmode/2011-06/msg00054.html I have looked into your branch only now. I think it is uncommon for Makefiles how clean they look now and I appreciate how the Makefile has been split up plus one is in doc/ and one in lisp/, that there are no explicit xy.el any more and so on. Thank you for this work. Some comments: There is no @value{DATE}, missing already on master. Would it be ok to remove setting the DATE or to include it in org.texi like the commit message subject anticipates? In the latter case it could be labeled build date and optionally when available be enriched with release date, looked up from the git tag when make is running in a git repo not dirty and if git is installed. Maybe release date could also become visible in org-version when running from .el in a git repo not dirty and if git is installed or when running from .elc built with the same git requirement. Both would help users to be aware of how outdated their version is and more. These are only suggestions, else I'm fine with removing DATE. I would prefer the file/target name variables.texi instead of git-describe.texi as git describe is not necessarily involved and must not be a requirement. Did you check this?: - make info when not in a git repo - make info when in a git repo but git is not installed In case the errors are confirmed: My guess is that again you have a better solution than me and I don't propose a patch yet. (org-version) uses (file-exists-p (expand-file-name .git dir)) and (executable-find git) for this. The default make target has been changed from all to targets help. Is this standard? I assume that you considered that this can break the target org-mode of some upper level Makefile from users (and Emacs?). Michael
Re: [O] Trying to use a custom face for highlighting tags used in agenda filtering
Hi Sébastien, Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Please find a (very useful ;-)) patch for highlighting (in the mode-line) the tags which are used to filter the agenda. Applied thanks. I've updated the patch using org-propertize instead of propertize and using a better default for the face :) I'd like even to be able to put in one color the positive tags and in another the negative ones, but that's above my current knowledge of text-properties... Maybe you can start by replacing the 'identity function in the (mapconcat ...) by some (lambda (f) (if ...)) to check whether each tag filter starts with a + or a -. Just an idea. Anyway, here is a usable first version -- where all tags are in the same color, much more easily to spot (before you wonder why you have so few lines in your agenda!). Yes, it might be useful to some people -- thanks for this! -- Bastien
Re: [O] [patch] Don't output preamble DIV if its contents is empty
Hi Sébastien, Sebastien Vauban wxhgmqzgw...@spammotel.com writes: are there adverse effects when an empty div is in the file? Yes, there are, reason for such patch. I understand the reasons and I have applied the patch -- please provide a ChangeLog next time. You can provide it like you just did (with the tag filter patch), but even better is to include the ChangeLog in the commit log, after the first line. Check available commits on http://orgmode.org/w/org-mode.git to get the idea. Thanks! -- Bastien
Re: [O] git describe in version of info file with make info_git_describe
Hi Achim On Fri, Oct 28, 2011 at 11:26, Achim Gratz strom...@nexgo.de wrote: Again I don't know if or when this gets merged. I've already used up my TINYCHANGEs and hit an impasse with the FSF papers that I don't know how to resolve... :-( Then again, the build system doesn't really become part of Emacs, but it's up to the maintainers to decide. I hope that this can be solved and that your Makefile restructuring will be merged into master. I'd much prefer to inject the version in a different way, not making an altered copy that the build works from. The result is the same, but it doesn't feel OK... so probably the solution should be to get the version injected via some @set in an @include file (that's the recommended way from the Texinfo perspective, anyway) that is produced by make whenever the source file changes. I prefer this cleaner solution you have just implemented too of course. And I _added_ the target info-vg because implementing the same functionality in the target info itself, by either adding an auto-detect whether git describe is available (like org-version does) or using org-version itself, is not an option. One still needs to have the unchanged target info to build a release with the info version not possibly influenced by git describe. I posit that if it's worth to have that (I'd say yes), ``make info´´ should do that, in a way that is compatible with version control. Is it possible with your current make info to get an info file without git describe for a release like ELPA when made from within a git repo and also for Emacs when building Emacs from a bzr-mirroring git repo? Anyway, I've implemented the requested functionality into my Makefile fork, please test. Thank you for this implementation. Since my patch discussed here is now superseded by your branch I thought it would be cleaner to put my comments to the sub-thread Makefile restructuring starting here: http://lists.gnu.org/archive/html/emacs-orgmode/2011-07/msg00680.html Michael
Re: [O] Variable publishing-directory? (resent with patch as attachment)
Hi Kay, Kai Tetzlaff kai.tetzl...@web.de writes: Here is an example: At home, i publish to a local directory (:publishing-directory ~/tmp/publish-test) but at work i would like to publish directly to a webserver (:publishing-directory /plinkx:doxydoc:~/public_html/publish-test - this is on w32, using tramps PuTTY/plink). To avoid having to change the definition of the publishing project when i change locations i would like to construct the actual value of :publishing-directory by calling a function: (publishing-dir-test :base-directory ~/Documents/Work/RS :recursive t :base-extension org :exclude-tags (intern) :publishing-directory '(expand-file-name publish-test kt:org-default-publishing-dir) :publishing-function org-publish-org-to-html) Depending on the location i'm in, 'kt:org-default-publishing-dir' would be set to either ~/tmp or /plinkx:doxydoc:~/public_html. Without the patch, the example above does not work as the value of :publishing-directory does not get evaluated. Also, please try to send git patch using these conventions: http://orgmode.org/worg/org-contribute.html#sec-5 Thanks a lot! Thanks for the hint. I've attached a revised version of the patch which includes a changelog/commit msg - i hope that works for you. Thanks for the detailed explanations -- for the record, this patch has been applied a while ago. Thanks, -- Bastien
Re: [O] org-capture template property completion
Hi, dlc d...@coateconnection.com writes: I am an emacs novice attempting to use an org-capture template. The manual indicates completion is available while expanding %^{prompt}. Can one get completion on %^{prop}p for a property? I tried the same syntax for prompt and that did not work. If you want to prompt the user for property MyProperty you need to use %^{MyProperty}p in the capture template. HTH, -- Bastien
Re: [O] [PATCH] org-capture, removing whitespace from new captures
Hi Paul, Paul emacs-orgm...@lookmumnohands.net writes: In fact adding whitespace-cleanup to org-capture-before-finalize-hook was what I tried first, but it didn't do what I wanted. This hook is called _after_ the buffer is widened - making whitespace-cleanup operate on the _entire_ buffer, not just the newly added capture. I believe the patch is still required - I should have explained org-capture-before-finalize-hook's behaviour more explicitly in my original submission. I'm willing to apply this patch -- could you provide it with a well-formatted ChangeLog entry? Thanks! Further to this, can anybody suggest a better documentation string for org-capture-before-finalize-hook? (Preferably in tandem with my proposed patch.) Currently it is: Hook that is run right before a capture process is finalized. The capture buffer is still current when this hook runs. I feel the finalized part is somewhat ambiguous. What it means is after the capture buffer is widened, and before it is saved. I expected it to mean BEFORE the capture buffer is widened. Maybe: Hook that is run after the capture buffer is widened and prior to being finalized. The capture buffer is still current when this hook runs. Thanks for the suggestion -- I've updated the docstring like this: Hook that is run right before a capture process is finalized. The capture buffer is still current when this hook runs and it is widened to the entire buffer. The convention is that the first sentence should be readable on one single line. Best, -- Bastien
Re: [O] Bug in HTML export
Hi Pavel, Pavel Panchekha m...@pavpanchekha.com writes: Ampersands in #+AUTHOR: declarations are not correctly escaped by Org-mode. To reproduce, export: #+AUTHOR: a b You'll find the line meta name=author content=a b/ in the output, but it should be meta name=author content=a amp; b/ The same problem occurs with other special characters in author declarations, and also in #+DATE: declarations. This is breaking the XHTML 1.0 Strict claim. This is now fixed, thanks. -- Bastien
Re: [O] #+LaTeX_CLASS regex too restrictive?
Hi Richard, Richard Lewis richardle...@fastmail.co.uk writes: I updated my org-mode repository last night and found today that my LaTeX export wasn't working anymore because it couldn't find the LaTeX class: No definition for class `%s' in `org-export-latex-classes'. The class name I'm using includes / characters. However, the regex for matching #+LaTeX_CLASS allows only alphabetic characters or -. The following change fixed this for me, but perhaps it's now a little too inclusive? diff --git a/lisp/org-latex.el b/lisp/org-latex.el index 649e4a7..e9502ae 100644 --- a/lisp/org-latex.el +++ b/lisp/org-latex.el @@ -1346,7 +1346,7 @@ LEVEL indicates the default depth for export. (save-restriction (widen) (goto-char (point-min)) - (and (re-search-forward ^#\\+LaTeX_CLASS:[ \t]*\\([-a-zA-Z]+\\) nil t) + (and (re-search-forward ^#\\+LaTeX_CLASS:[ \t]*\\(.+\\)$ nil t) (match-string 1 (plist-get org-export-latex-options-plist :latex-class) org-export-latex-default-class) Yes, this is a bit too inclusive, as the (match-string 1) would also contain spaces, for example. I've pushed a commit allowing / chars for LaTeX classes -- please test it and let me know. Thanks, -- Bastien
Re: [O] Tags included in subtree export title despite tags:nil in header
Hi Suvayu, Suvayu Ali fatkasuvayu+li...@gmail.com writes: org-exp.el:2155:(defun org-export-get-title-from-subtree () Can you instrument this function with edbug-defun and see what might be wrong with it? I tried this file: , | * file | | ** beamer :noexport: |:PROPERTIES: |:EXPORT_TITLE: beamertitle |:EXPORT_FILE_NAME: test.html |:EXPORT_OPTIONS: H:3 num:nil toc:nil \n:t @:t ::t |:t ^:t f:nil *:t tags:nil TeX:t LaTeX:nil skip:nil p:nil author:nil email:nil creator:nil timestamp:nil |:END: | | beamer 2 | | *** beamer 3 :bla: ` and exporting the subtree named beamer :noexport uses the correct title here, i.e. beamertitle. So I can't reproduce this... -- Bastien
Re: [O] Outline and org-mode don't insert text into folded sections logically
Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: A few comments. I have also attached a small test file. thanks for the comments. Can you try the updated patch? It will take care of unfold the invisible part of the buffer when trying to edit _in_ it and _right after it_. As for `org-reveal', please report a bug if it doesn't work as expected in specific parts of the buffer. Thanks for your useful comments! From 442f30b74f3f4eb888b63cb5d2cd04542952f84a Mon Sep 17 00:00:00 2001 From: Bastien Guerry b...@altern.org Date: Sat, 22 Oct 2011 15:50:52 +0200 Subject: [PATCH] Prevent `self-insert-command' in invisible regions. * org.el (org-self-insert-command): Throw an error when the user is trying to use self-insert-command in invisible regions. --- lisp/org.el |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d82ae0c..627faa3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17328,6 +17328,9 @@ If the cursor is in a table looking at whitespace, the whitespace is overwritten, and the table is not marked as requiring realignment. (interactive p) (cond + ((eq (car (get-char-property-and-overlay + (point) 'invisible)) 'outline) +(error Attempt to edit an invisible part of the buffer)) ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success -- 1.7.6.1 -- Bastien
Re: [O] Links to C/C++ source code lines
Bastien bzg at altern.org writes: Looks nice, thanks. Just wondering: are you aware of the A.3 Adding hyperlink types section in the manual? You core uses advice instead of the `org-add-link-type' function -- is that on purpose? No, I missed that paragraph. That would be a cleaner solution- I'll take a look at it. Thank for the hint! I updated the code to get rid of the advice. I didn't introduce any new link type so didn't use the `org-add-link-type'. Instead I used the `org-store-link-functions' hook in place of the `org-create-file-search-functions' and that seems to work fine. Also I changed the name of the tool to org-cc-link.el to reflect the usage of the cc-engine library. The new version is here http://rafflo.w.interia.pl/org-cc-link.el regards, Rafal
Re: [O] Tags included in subtree export title despite tags:nil in header
Hi Bastien, On Sat, 29 Oct 2011 15:08:44 +0200 Bastien b...@altern.org wrote: Hi Suvayu, Suvayu Ali fatkasuvayu+li...@gmail.com writes: org-exp.el:2155:(defun org-export-get-title-from-subtree () Can you instrument this function with edbug-defun and see what might be wrong with it? Lines: 2170:(looking-at org-todo-line-regexp) 2171:(setq title (match-string 3)) I tried using edebug-defun on the above function. I see that it reads the title _with the tags_ no matter what are in the export options. With the attached minimal test file, and starting Emacs as: $ emacs -Q -l ~/.emacs.d/minimal-org.el subtree-test.org I could export the entire file to html correctly (meaning the subtree with the noexport tag is exported correctly). But When exporting the subtree to pdf the noexport tag is included in the presentation title. I tried this file: ... and exporting the subtree named beamer :noexport uses the correct title here, i.e. beamertitle. Sorry I should have provided an example file in the first place. I am not setting the EXPORT_TITLE property. The bug is the tags:nil option is not respected whether it is present in the file header or it is set by the EXPORT_OPTIONS property for the exported subtree. This is puzzling since other export options (e.g. ^:{}) is respected irrespective of whether it is present in the file header or the EXPORT_OPTIONS property. So I can't reproduce this... I hope this clearly describes the bug. -- Suvayu Open source is the future. It sets us free. #+TITLE: Subtree export bug #+AUTHOR:Suvayu Ali #+EMAIL: #+DATE: 2011-10-29 Fri #+DESCRIPTION: #+KEYWORDS: #+LANGUAGE: en #+OPTIONS: H:3 num:nil toc:t \n:nil @:t ::t |:t ^:{} -:t f:t *:t :t #+OPTIONS: TeX:t LaTeX:t skip:nil d:nil todo:t pri:nil tags:nil #+EXPORT_SELECT_TAGS: export #+EXPORT_EXCLUDE_TAGS: noexport * Top level header Irrespective of whether I have =^:{}= in the subtree =EXPORT_OPTIONS=, the subscript/superscript settings are respected. I was expecting the same for =tags:nil=. Not only does that not happen, even setting the option hs no effect on the exported title. This text is not going to be exported to beamer. ** Subtree export tags in title bug:noexport: :PROPERTIES: :EXPORT_FILE_NAME: subtree-test.pdf :EXPORT_DATE: 29 Oct 2011 :LaTeX_CLASS: beamer :LaTeX_CLASS_OPTIONS: [smaller] :BEAMER_FRAME_LEVEL: 1 :EXPORT_AUTHOR: Suvayu Ali :EXPORT_OPTIONS: tags:nil :END: *** Subscript/Superscript + Subscript/Superscript within braces: B^{0}_{s} + Subscript/Superscript without braces: B^0_s *** Acknowledgements + Thanks to XYZ, Foo and Bar % Created 2011-10-29 Sat 16:38 \documentclass[smaller]{beamer} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{fixltx2e} \usepackage{graphicx} \usepackage{longtable} \usepackage{float} \usepackage{wrapfig} \usepackage{soul} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} \usepackage{latexsym} \usepackage{amssymb} \usepackage{hyperref} \tolerance=1000 \providecommand{\alert}[1]{\textbf{#1}} \title{Subtree export tags in title bug \textbf{:noexport:}} \author{Suvayu Ali} \date{29 Oct 2011} \hypersetup{ pdfkeywords={}, pdfsubject={}, pdfcreator={Emacs Org-mode version 7.7}} \begin{document} \maketitle \begin{frame} \frametitle{Subscript/Superscript} \label{sec-1} \begin{itemize} \item Subscript/Superscript within braces: B$^{0}$$_{s}$ \item Subscript/Superscript without braces: B\^{}0\_{}s \end{itemize} \end{frame} \begin{frame} \frametitle{Acknowledgements} \label{sec-2} \begin{itemize} \item Thanks to XYZ, Foo and Bar \end{itemize} \end{frame} \end{document}
Re: [O] [odt] Support for annotations/comments
Hi, Jambunathan On Oct 29, 2011 7:32 AM, Jambunathan K I needed an excuse for adding support for annotations. Exporting the below org will produce the attached odt/pdf files. Note that the pdf file is produced by LibreOffice pdf export. Annotations is a ODT only feature right now and will not work with other backends. Does this include annotations in form of text changes too? Marking removed or added text? Would be great to have such a feature. It would require rather less coding to wrap annotation marks around the result of a diff output between the original org file and the modified version. Hence, we would be able to generate automatically annotaded odt versions of modified org files. Totti
Re: [O] Outline and org-mode don't insert text into folded sections logically
Hi Bastien, On Sat, Oct 29, 2011 at 16:10, Bastien b...@altern.org wrote: Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: A few comments. I have also attached a small test file. thanks for the comments. Can you try the updated patch? It will take care of unfold the invisible part of the buffer when trying to edit _in_ it and _right after it_. Did you by any chance attach the old patch again? ;) As for `org-reveal', please report a bug if it doesn't work as expected in specific parts of the buffer. I will try to make a more complete analysis and report it. -- Suvayu Open source is the future. It sets us free.
Re: [O] Outline and org-mode don't insert text into folded sections logically
Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: Did you by any chance attach the old patch again? ;) Er, yes :) Here is the fresh one -- thanks for testing it. As for `org-reveal', please report a bug if it doesn't work as expected in specific parts of the buffer. I will try to make a more complete analysis and report it. Thanks! From 23ef0209d53b0acdf2158da9dd8d4532b437f97e Mon Sep 17 00:00:00 2001 From: Bastien Guerry b...@altern.org Date: Sat, 29 Oct 2011 16:08:27 +0200 Subject: [PATCH] org.el: Unfold invisible region at point or right before point when editing. * org.el (org-self-insert-command): Unfold invisible region at point or right before point when editing. Thanks to Suvayu Ali for discussing this. --- lisp/org.el | 17 + 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index fe45cf7..6c809be 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17393,6 +17393,23 @@ hook. The default setting is `org-speed-command-default-hook'. If the cursor is in a table looking at whitespace, the whitespace is overwritten, and the table is not marked as requiring realignment. (interactive p) + (let ((invisible-at-point + (car (get-char-property-and-overlay (point) 'invisible))) + (invisible-before-point + (car (get-char-property-and-overlay (1- (point)) 'invisible +(when (or (eq invisible-at-point 'outline) + (eq invisible-at-point 'org-hide-block) + (eq invisible-before-point 'outline) + (eq invisible-before-point 'org-hide-block)) + (if (or (eq invisible-before-point 'outline) + (eq invisible-before-point 'org-hide-block)) + (goto-char (previous-overlay-change (point + (org-cycle) + (if (or (eq invisible-before-point 'outline) + (eq invisible-before-point 'org-hide-block)) + (forward-char 1)) + (message Unfolding invisible region around point before editing) + (sit-for 1))) (cond ((and org-use-speed-commands (setq org-speed-command -- 1.7.7.1 -- Bastien
Re: [O] Outline and org-mode don't insert text into folded sections logically
Hi Bastien, This works beautifully! I noticed that there is a tiny lag (maybe about half a second) between the revealing and inserting the character. However there is no such issue if there is no need to reveal the surrounding text. Thanks a lot for implementing this feature. :) On Sat, Oct 29, 2011 at 17:40, Bastien b...@altern.org wrote: Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: Did you by any chance attach the old patch again? ;) Er, yes :) Here is the fresh one -- thanks for testing it. As for `org-reveal', please report a bug if it doesn't work as expected in specific parts of the buffer. I will try to make a more complete analysis and report it. Thanks! -- Bastien -- Suvayu Open source is the future. It sets us free.
Re: [O] Tags included in subtree export title despite tags:nil in header
Hi Suvayu, Suvayu Ali fatkasuvayu+li...@gmail.com writes: Sorry I should have provided an example file in the first place. I am not setting the EXPORT_TITLE property. The bug is the tags:nil option is not respected whether it is present in the file header or it is set by the EXPORT_OPTIONS property for the exported subtree. This is puzzling since other export options (e.g. ^:{}) is respected irrespective of whether it is present in the file header or the EXPORT_OPTIONS property. So I can't reproduce this... I hope this clearly describes the bug. Yes it does, thanks a lot. Note that EXPORT_OPTIONS is well respected for the children of the subtree: tags:nil will prevent tags to be displayed (tested in both HTML and LaTeX.) Setting EXPORT_TITLE works as a workaround. If you have time to fix `org-export-get-title-from-subtree' so that it is aware of the options and removes the tags when needed, that'd be nice. I put it on my todo list otherwise, but that's not very urgent. Thanks! -- Bastien
Re: [O] Outline and org-mode don't insert text into folded sections logically
Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: This works beautifully! I noticed that there is a tiny lag (maybe about half a second) between the revealing and inserting the character. However there is no such issue if there is no need to reveal the surrounding text. The lag is intentional -- just to make sure people read the message and know what they do... If you and others find this is useless, I'll remove it. Thanks for testing! -- Bastien
Re: [O] Outline and org-mode don't insert text into folded sections logically
On Sat, Oct 29, 2011 at 18:15, Bastien b...@altern.org wrote: Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: This works beautifully! I noticed that there is a tiny lag (maybe about half a second) between the revealing and inserting the character. However there is no such issue if there is no need to reveal the surrounding text. The lag is intentional -- just to make sure people read the message and know what they do... If you and others find this is useless, I'll remove it. Thanks for testing! Ah! Okay that seems reasonable, lets see what others think. :) -- Suvayu Open source is the future. It sets us free.
Re: [O] #+LaTeX_CLASS regex too restrictive?
Richard Lewis richardle...@fastmail.co.uk wrote: The class name I'm using includes / characters. It seems to me that that's a bad idea: class names correspond to file names (without the .cls extension), so / characters will probably cause confusion (at least on Unix-based filesystems). So instead of extending org to recognize these names, I would recommend not using slashes in class names in the first place - or backslashes, or even punctuation characters: restricting oneself to alphanumerics seems like the safest bet. Nick
Re: [O] #+LaTeX_CLASS regex too restrictive?
At Sat, 29 Oct 2011 12:34:25 -0400, Nick Dokos wrote: Richard Lewis richardle...@fastmail.co.uk wrote: The class name I'm using includes / characters. It seems to me that that's a bad idea: class names correspond to file names (without the .cls extension), so / characters will probably cause confusion (at least on Unix-based filesystems). But what's the relationship between org-export-latex-classes and LaTeX class files? Best, Richard
Re: [O] #+LaTeX_CLASS regex too restrictive?
Richard Lewis richardle...@fastmail.co.uk wrote: At Sat, 29 Oct 2011 12:34:25 -0400, Nick Dokos wrote: Richard Lewis richardle...@fastmail.co.uk wrote: The class name I'm using includes / characters. It seems to me that that's a bad idea: class names correspond to file names (without the .cls extension), so / characters will probably cause confusion (at least on Unix-based filesystems). But what's the relationship between org-export-latex-classes and LaTeX class files? C-h v org-export-latex-classes RET It's an alist where the LaTeX class name is used as a key: alist-key == latex class name - latex class file. Nick
[O] Bug: Publishing with auto-sitemap is broken [7.7 (release_7.7.497.gae02e)]
Hi Nicolas. Publishing with an automatically generated index file is broken for me. With org-publish-projects set with :auto-sitemap t :sitemap-filename index.html :sitemap-title Test Publishing Area :sitemap-style tree I get the following backtrace: , | Debugger entered--Lisp error: (wrong-type-argument stringp nil) | format(nil FOOBAR) | (let* ((opt-plist ...) (body-only ...) (style ...) (html-extension ...) valid thetoc have-headings first-heading-pos (odd org-odd-levels-only) (region-p ...) (rbeg ...) (rend ...) (subtree-p ...) (level-offset ...) (opt-plist ...) (org-current-export-dir ...) (org-current-export-file buffer-file-name) (level 0) (line ) (origline ) txt todo (umax nil) (umax-toc nil) (filename ...) (current-dir ...) (auto-insert nil) (buffer ...) (org-levels-open ...) (date ...) (author ...) (html-validation-link ...) (title ...) (link-up ...) (link-home ...) (dummy ...) (html-table-tag ...) (quote-re0 ...) (quote-re ...) (inquote nil) (infixed nil) (inverse nil) (email ...) (language ...) (keywords ...) (description ...) (num ...) (lang-words nil) (head-count 0) cnt ...) (let (...) (org-unmodified ...)) (message Exporting...) (setq org-min-level (org-get-min-level lines level-offset)) (setq org-last-level org-min-level) (org-init-section-numbers) (cond (... ...) (date) (t ...)) (setq lang-words (or ... ...)) (set-buffer buffer) (let (...) (erase-buffer)) (fundamental-mode) (org-install-letbind) (and (fboundp ...) (set-buffer-file-coding-system coding-system-for-write)) (let (... ...) (mapc ... org-export-plist-vars) (setq umax ...) (setq umax-toc ...) (unless body-only ... ... ...) (if ... ...) (setq head-count 0) (org-init-section-numbers) (org-open-par) (while ... ...) (when inquote ... ...) (org-html-level-start 1 nil umax ... head-count opt-plist) (when ... ...) (save-excursion ... ...) (when footnotes ...) (let ... ...) (unless body-only ... ...) (if org-export-html-with-timestamp ...) (unless body-only ...) (unless ... ... ...) (goto-char ...) (when thetoc ... ... ...) (goto-char ...) (while ... ...) (goto-char ...) (goto-char ...) (let ... ...) (goto-char ...) (when ... ...) (remove-text-properties ... ... ...) (run-hooks ...) (or to-buffer ...) (goto-char ...) (or ... ...) (if ... ... ...))) | org-export-as-html(nil nil (:buffer-will-be-killed t :base-directory /tmp/publish/ :publishing-directory /ssh:www-data@www:~/www.norang.ca/htdocs/tmp :recursive t :section-numbers nil :table-of-contents nil :base-extension org :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style link rel=\stylesheet\ href=\http://doc.norang.ca/org.css\; type=\text/css\ / :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename index.html :sitemap-title Test Publishing Area :sitemap-style tree :author-info t :creator-info t) nil nil /ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/) | funcall(org-export-as-html nil nil (:buffer-will-be-killed t :base-directory /tmp/publish/ :publishing-directory /ssh:www-data@www:~/www.norang.ca/htdocs/tmp :recursive t :section-numbers nil :table-of-contents nil :base-extension org :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style link rel=\stylesheet\ href=\http://doc.norang.ca/org.css\; type=\text/css\ / :plain-source t :htmlized-source t :style-include-default nil :auto-sitemap t :sitemap-filename index.html :sitemap-title Test Publishing Area :sitemap-style tree :author-info t :creator-info t) nil nil /ssh:www-data@www:/var/www/www.norang.ca/htdocs/tmp/) | (setq export-buf-or-file (funcall (intern ...) (plist-get plist :headline-levels) nil plist nil (plist-get plist :body-only) pub-dir)) | (let* ((plist ...) (init-buf ...) (init-point ...) (init-buf-string ...) export-buf-or-file) (run-hooks (quote org-publish-before-export-hook)) (setq export-buf-or-file (funcall ... ... nil plist nil ... pub-dir)) (when (and ... ...) (set-buffer export-buf-or-file) (progn ... ...) (kill-buffer export-buf-or-file)) (set-buffer init-buf) (when (buffer-modified-p init-buf) (erase-buffer) (insert init-buf-string) (save-buffer) (goto-char init-point)) (unless visiting (kill-buffer init-buf))) | (save-excursion (org-pop-to-buffer-same-window (or visiting ...)) (let* (... ... ... ... export-buf-or-file) (run-hooks ...) (setq export-buf-or-file ...) (when ... ... ... ...) (set-buffer init-buf) (when ... ... ... ... ...) (unless visiting ...))) | (let ((visiting ...)) (save-excursion (org-pop-to-buffer-same-window ...) (let* ... ... ... ... ... ... ...))) | org-publish-org-to(html (:base-directory /tmp/publish/ :publishing-directory /ssh:www-data@www:~/www.norang.ca/htdocs/tmp :recursive t :section-numbers nil :table-of-contents nil :base-extension org :publishing-function (org-publish-org-to-html org-publish-org-to-org) :style link rel=\stylesheet\
Re: [O] [patch] Don't output preamble DIV if its contents is empty
Hi Bastien, Bastien wrote: Sebastien Vauban wxhgmqzgw...@spammotel.com writes: are there adverse effects when an empty div is in the file? Yes, there are, reason for such patch. I understand the reasons and I have applied the patch -- please provide a ChangeLog next time. I can assure you that I'll do, as I just began doing... You can provide it like you just did (with the tag filter patch), but even better is to include the ChangeLog in the commit log, after the first line. Check available commits on http://orgmode.org/w/org-mode.git to get the idea. OK. Understood. Question: why do we do like that (inserting the ChangeLog contents after the first line of the commit log)? Is it automatically used somewhere to generate a proper ChangeLog file? Why isn't there a real shared ChangeLog file in the repository? I want to know, because I want to learn more about all the aspects of this project in particular, but as well collaborative work in general... Best regards, Seb -- Sebastien Vauban
Re: [O] Trying to use a custom face for highlighting tags used in agenda filtering
Hi Bastien, Bastien wrote: Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Please find a (very useful ;-)) patch for highlighting (in the mode-line) the tags which are used to filter the agenda. Applied thanks. Thanks. I've updated the patch using org-propertize instead of propertize OK, for better XEmacs support, if I understand well. and using a better default for the face :) Well, I wouldn't call org-default a better default, but that's fine with me. I mean: if org-default is black for the majority of the people, they won't even see that you can customize that aspect of the modeline (in a light scheme). So, I prefer some color (I chose orange) that everybody can customize, and that makes everybody be aware of the tags used for filtering (in this case). But, as said, I don't mind the default: I'll customize it anyway for my own usage. I'd like even to be able to put in one color the positive tags and in another the negative ones, but that's above my current knowledge of text-properties... Maybe you can start by replacing the 'identity function in the (mapconcat ...) by some (lambda (f) (if ...)) to check whether each tag filter starts with a + or a -. Just an idea. Just that I'm still to ignorant of the inner working of property list. But it's nice to give me a hint. That could help me to quicklier come with a working solution. Anyway, here is a usable first version -- where all tags are in the same color, much more easily to spot (before you wonder why you have so few lines in your agenda!). Yes, it might be useful to some people -- thanks for this! Glad if it's of use. Best regards, Seb -- Sebastien Vauban
Re: [O] Tags included in subtree export title despite tags:nil in header
Hi Bastien and others, On Sat, 29 Oct 2011 18:13:49 +0200 Bastien b...@altern.org wrote: Hi Suvayu, Suvayu Ali fatkasuvayu+li...@gmail.com writes: Sorry I should have provided an example file in the first place. I am not setting the EXPORT_TITLE property. The bug is the tags:nil option is not respected whether it is present in the file header or it is set by the EXPORT_OPTIONS property for the exported subtree. This is puzzling since other export options (e.g. ^:{}) is respected irrespective of whether it is present in the file header or the EXPORT_OPTIONS property. So I can't reproduce this... I hope this clearly describes the bug. Yes it does, thanks a lot. Note that EXPORT_OPTIONS is well respected for the children of the subtree: tags:nil will prevent tags to be displayed (tested in both HTML and LaTeX.) Setting EXPORT_TITLE works as a workaround. If you have time to fix `org-export-get-title-from-subtree' so that it is aware of the options and removes the tags when needed, that'd be nice. I put it on my todo list otherwise, but that's not very urgent. I worked up a (somewhat working) patch, but I am stuck at one little point. I was wondering if someone could help me. In the attached patch, I use the variable org-export-with-tags to check whether tags should be included or skipped in the export title. However irrespective of the export options I get the value not-in-toc. As a result, the tags are not included even if tags:t is set. Is my use of org-export-with-tags incorrect? Is there something else I need to do before I can use it? Thanks for any pointers. -- Suvayu Open source is the future. It sets us free. From efae8fc1eaa8bdfbc8cf36aa2ae8ab0a3ec91c40 Mon Sep 17 00:00:00 2001 From: Suvayu Ali fatkasuvayu+li...@gmail.com Date: Sun, 30 Oct 2011 00:54:25 +0200 Subject: [PATCH] Respect export options for subtree export title * org-exp.el (org-solidify-link-text): Respect org-export-with-tags when forming the export title during subtree export. TINY CHANGE --- lisp/org-exp.el |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/org-exp.el b/lisp/org-exp.el index fa54242..4a69be8 100644 --- a/lisp/org-exp.el +++ b/lisp/org-exp.el @@ -2167,8 +2167,10 @@ (defun org-export-get-title-from-subtree () (= (org-end-of-subtree t t) rend)) ;; This is a subtree, we take the title from the first heading (goto-char rbeg) - (looking-at org-todo-line-regexp) - (setq title (match-string 3)) + (looking-at org-todo-line-tags-regexp) + (setq title (if (eq org-export-with-tags t) + (format %s\t%s (match-string 3) (match-string 4)) + (match-string 3))) (org-unmodified (add-text-properties (point) (1+ (point-at-eol)) (list :org-license-to-kill t))) -- 1.7.7
Re: [O] Trying to use a custom face for highlighting tags used in agenda filtering
Hi Sébastien, Sebastien Vauban wxhgmqzgw...@spammotel.com writes: I've updated the patch using org-propertize instead of propertize OK, for better XEmacs support, if I understand well. Yes. and using a better default for the face :) Well, I wouldn't call org-default a better default, but that's fine with me. I mean: if org-default is black for the majority of the people, they won't even see that you can customize that aspect of the modeline (in a light scheme). Well, org-default is *not* a good default, 'modeline is. I've pushed a fix for this. So, I prefer some color (I chose orange) that everybody can customize, and that makes everybody be aware of the tags used for filtering (in this case). But, as said, I don't mind the default: I'll customize it anyway for my own usage. One advantage of making the use of a face visible is to let people know they can change it. In this case, changing the weight or using a different color may be an option -- let's see if people come up with good ideas. I'd like even to be able to put in one color the positive tags and in another the negative ones, but that's above my current knowledge of text-properties... Maybe you can start by replacing the 'identity function in the (mapconcat ...) by some (lambda (f) (if ...)) to check whether each tag filter starts with a + or a -. Just an idea. Just that I'm still to ignorant of the inner working of property list. But it's nice to give me a hint. That could help me to quicklier come with a working solution. Thanks for your time in digging into this! Best, -- Bastien
Re: [O] [patch] Don't output preamble DIV if its contents is empty
Hi Sébastien, Sebastien Vauban wxhgmqzgw...@spammotel.com writes: Question: why do we do like that (inserting the ChangeLog contents after the first line of the commit log)? Is it automatically used somewhere to generate a proper ChangeLog file? Yes -- see UTILITIES/make_emacs_changelog which collects logs from git commits and format them into proper Emacs ChangeLog. Why isn't there a real shared ChangeLog file in the repository? There are already two ChangeLogs, the one that you get from a simple git log in Org's repo, and the ChangeLog in Emacs. It's nice to have both: grep'ing through git logs is quick and useful, you get a lot of detailed information here; on the other hand, looking for a function/variable's name in Emacs ChangeLog (or calling M-x occur RET in this ChangeLog buffer) is also a nice way to get information wrt a particular function/variable. I'm fine with a semi-auto-generated ChangeLog that I review and manually fix before merging new releases of Org into Emacs. But I would not be able to maintain a separate ChangeLog for Org only. Of course, this is a matter of personal preference and laziness and future maintainers might want to have an Org ChangeLog between the git log and the Emacs Org ChangeLog. I want to know, because I want to learn more about all the aspects of this project in particular, but as well collaborative work in general... Not sure this can be generalized as I'm not familiar enough with other projects. While seeking information about this issue, I stumbled upon this fresh and not-so-unrelated post by ESR¹ and discover this tool: reposurgeon. ¹ http://esr.ibiblio.org/?p=3859 ² http://catb.org/~esr/reposurgeon/ I promise I won't use it but I was curious if anyone tested it on this list :) -- Bastien
Re: [O] Outline and org-mode don't insert text into folded sections logically
Hi Suvayu, suvayu ali fatkasuvayu+li...@gmail.com writes: Ah! Okay that seems reasonable, lets see what others think. :) I've now pushed this commit so that more people can test it. -- Bastien
Re: [O] Tags included in subtree export title despite tags:nil in header
Suvayu Ali fatkasuvayu+li...@gmail.com wrote: In the attached patch, I use the variable org-export-with-tags to check whether tags should be included or skipped in the export title. However irrespective of the export options I get the value not-in-toc. As a result, the tags are not included even if tags:t is set. Is my use of org-export-with-tags incorrect? Is there something else I need to do before I can use it? Try changing the test to just + (setq title (if org-export-with-tags + (format %s\t%s (match-string 3) (match-string 4)) + (match-string 3))) This checks whether org-export-with-tags is non-nil, rather than checking that it is exactly t. In general, checking for nil or non-nil is probably a better way to go, unless there are specific reasons to be more specific. Nick