Re: [O] calfw, get rid of file names
Kyle Machulis (2012-06-12 03:47:40 +0200) wrote: > I used defadvice to fix this: > > (defadvice qdot/cfw:org-extract-summary (after cfw:org-extract-summary) > "Remove tags and filenames from item summary" > (message item)) > I placed that and `(ad-activate 'qdot/cfw:org-extract-summary)` in my `.emacs` but tags and file names are still shown by calfw after restarting Emacs. Did I miss something? Thanks, > On Sun, Jun 10, 2012 at 1:57 AM, Michael Welle wrote: >> >> I just discovered calfw. That's neat stuff ;). I wonder if I can >> customise away the org file names that are shown with the calendar >> entries? Mouse clicking on the entry brings me to the associated file, >> so IMHO showing the file's name does not provide additional information. -- Ivan Vilata i Balaguer -- https://elvil.net/
Re: [O] Checkboxes for description lists
> I removed this limitation in org-list.el and modified new exporters so > they handle checkboxes in description lists correctly (that is by adding > checkbox before the tag, not before the description). If it breaks > something beyond repair, I'll just revert the patch. This seems to work well for my use cases, thanks!
Re: [O] calfw, get rid of file names
Michael Welle (2012-06-12 10:40:00 +0200) wrote: > Ivan Vilata i Balaguer writes: > >> Kyle Machulis (2012-06-12 03:47:40 +0200) wrote: >> >>> (defadvice qdot/cfw:org-extract-summary (after cfw:org-extract-summary) >>> "Remove tags and filenames from item summary" >>> (message item)) >> >> I placed that and `(ad-activate 'qdot/cfw:org-extract-summary)` in my >> `.emacs` but tags and file names are still shown by calfw after >> restarting Emacs. Did I miss something? > I use a function similar to my-open-calendar from the documentation. The > above advice doesn't seem to be called then. It is called if I use > cfw:open-org-calendar instead. I have to look into how advices work I > guess ;). The thing Kyle wanted to point out is that you can customise > the item in the above advice. (message item) just prints the item to the > status line. That explains the strange use of the `message` call ;) . It didn't work for me either (buffer `*Messages*` doesn't get anything new), but thanks for the clarification anyway. Cheers, -- Ivan Vilata i Balaguer -- https://elvil.net/
Re: [O] [ANN] Org Elements in contrib
Hello, Michael Brand writes: > Not sure if the following should be supported by > org-element-interpret-data: > > #+BEGIN_SRC org > ,variable declaration in some programming languages: > ,- Perl :: the variable declaration can be implicit > ,- C :: > , #+BEGIN_SRC C > ,time_t variable_name; > , #+END_SRC > #+END_SRC This bug should be fixed now. Thank you for reporting it. Regards, -- Nicolas Goaziou
Re: [O] alignment of description list in Org and export old and new
Hello, Michael Brand writes: >> [...] >> >> - cmd --log-level=wrn -o :: >> long term + long descr bla bla bla bla >> bla bla bla bla bla bla bla bla bla bla >> bla bla bla bla bla bla bla bla bla >> >> [...] >> >> M-q on the item "long term + long descr" that is aligned manually as >> shown first will be stable only after a second M-q instead of already >> after the first M-q with release_7.8.10-633 on 23.3.1. > > The attached patch resolves also the above issue: > > Description list: improve regexp consistency > > * lisp/org-list.el (org-at-item-description-p, > org-list-item-body-column): Make the inline regexp more consistent > with `org-list-full-item-re', the inline regexp "Description list > items" from `org-set-font-lock-defaults and others'. > > This resolves some issues with M-q (org-fill-paragraph) on description > lists. I have applied your patch. Thank you. Regards, -- Nicolas Goaziou
Re: [O] New exporter: where are the back-end functions called?
Hello, Thorsten Jolitz writes: > when trying to enhance the HTML back-end of the new exporter with > interactive HTML elements, one possibility (probably the easiest and > best) is to write variants for the export functions for some Org > elements that insert different HTML in the output string (HTML form > fields instead of static HTML). > > By far the most interesting Org element for me is the 'headline' > element, that is transcoded by the following function from > 'org-e-html.el': > > ,-- > | (defun org-e-html-headline (headline contents info) > | "Transcode an HEADLINE element from Org to HTML. > | CONTENTS holds the contents of the headline. INFO is a plist > | holding contextual information." > `-- > > Now I don't want to mess around in the original exporter code, but > rather would like to rename this function and all the helper functions > it calls with the 'iorg'-prefix and then experiment with changing the > function bodies. You may have a look at `org-export-define-derived-backend' macro and "Defining a Back-End" in Org export documentation[1]. Regards, [1] http://orgmode.org/worg/dev/org-export-reference.html -- Nicolas Goaziou
Re: [O] Checkboxes for description lists
Hi Robert and Nicolas, Robert Yates wrote: >> I removed this limitation in org-list.el and modified new exporters so >> they handle checkboxes in description lists correctly (that is by adding >> checkbox before the tag, not before the description). If it breaks >> something beyond repair, I'll just revert the patch. > > This seems to work well for my use cases, thanks! To go on with that subject, it seems we can't put footnotes in the left part of the description. Is it intended? Could that restriction be removed? Best regards, Seb -- Sebastien Vauban
Re: [O] Smart Quotes Exporting
Hello, Mark Shoulson writes: >> ASCII exporter also handle UTF-8. So it's good to have there too. > > Really? I would have thought ASCII meant ASCII, as in 7-bit clean > text. org-e-ascii.el (as old org-ascii.el) handles ASCII, Latin1 and UTF-8 encodings. > It looked to me like your solution would essentially boil down to "do > string handling when there's a string, otherwise recur down and find > the strings," which essentially means apply it to all the > strings... and there were already functions out there applying things > to strings, so this can just ride along with them. Here, let's look > at your suggestion and see if we can find what I missed: > > ] Walk element/object/secondary-string's contents . > ] > ] 1. When a string is encountered: > ] > ] 1. If it has a quote as its first or last position, check for > ] objects before or after the string to guess its status. An > ] object never starts with a white space, but you may have to > ] check :post-blank property in order to know if previous object > ] had white spaces at its end. > ] > ] 2. For each quote everywhere else in the string, your regexp can > ] handle it fine. > ] > ] 2. When an object belonging to `org-element-recursive-objects' is > ] encountered, apply the function to this object. > ] > ] 3. Accumulate returned strings or objects. > > So, if it's a string, use the regexps (if they can be smart enough to look at > beginning and end of the string, which they can--though I haven't been using > the > :post-blank property so presumably something is amiss), and if it isn't a > string, recur down until you get to a string... Ah, but only if it's in > org-element-recursive-objects. You're missing an important part: the regexps cannot be smart enough for quotes at the beginning or the end of the string. There, you must look outside the string. Hence: > ] 1. If it has a quote as its first or last position, check for > ] objects before or after the string to guess its status. An > ] object never starts with a white space, but you may have to > ] check :post-blank property in order to know if previous object > ] had white spaces at its end. But you can only do that from the element containing the string, not from the string itself. > So the issue with the current state is that it > would wind up applying to too much? (it would hit code and verbatim elements, > for example, and that would be wrong.) No, you are not applying it too much (verbatim elements don't contain plain-text objects) but your function hasn't got access to enough information to be useful. > So it remains to find the right place in the processing to put > a function like the one you describe. I'm trying to get a proper > understanding of the code structure to see what you mean. Looks like > it should be something like a transcoder, only called on > everything... Transcoders are type specific, so that's not an option. > wait, called on the top-level parsed tree object, recursively doing > its thing before(?) the transcoders of the individual objects get to > it. That's called a parse tree filter. That should be a possibility indeed. The function would be applied on the parse tree and would replace strings within elements containing plain text (that is paragraph, verse-block and table-row types). parse tree filters are applied very early in the export process. Another option would be to integrate it into `org-element-normalize-contents', but I think the previous way is better. > The on-screen one would still use the plain-string computation, as you said, > since the full parse isn't available. Yes. > It would also need to be tweaked not to act on verbatim/comment text, > etc. Yes. You may want to use `org-element-at-point' and `org-element-type' to tell if you're somewhere smart quotes are allowed (in table, table-row, paragraph, verse-block elements). Regards, -- Nicolas Goaziou
Re: [O] [ANN] Org Elements in contrib
Hi Nicolas On Tue, Jun 12, 2012 at 2:32 PM, Nicolas Goaziou wrote: > This bug should be fixed now. I confirm that it is fixed. And as I see from your commit: Thanks to your modular and therefore stable design it is fixed also for other cases that I didn't test before with table or list as the only body element. And the regression tests in general I appreciate a lot too. Michael
[O] latex-export custom header?
Hi, I'm really enjoying the org-mode + cdlatex combo. One question though, how can I customize the latex header produced by org-export-as-latex ? I really need to add some \newcommand and \newtheorem statements. best wishes, renato
Re: [O] latex-export custom header?
Hi Renato, renato wrote: > Hi, I'm really enjoying the org-mode + cdlatex combo. One question > though, how can I customize the latex header produced by > org-export-as-latex ? I really need to add some \newcommand and > \newtheorem statements. A quick answer. Many, in fact. Common solutions are: - put your extra stuff in an external .org file, and insert it wherever you want via SETUPFILE - make a new LaTeX class file, and customize Org (`org-export-latex-classes') to use that one, instead of the default one. Best regards, Seb -- Sebastien Vauban
Re: [O] latex-export custom header?
On a per file basis, you can add extra lines to your LaTeX export header by using "#+LATEX_HEADER: ". (See: http://orgmode.org/org.html#Export-options) To get your custom commands also to work with the preview of LaTeX fragments, you may customise the "org-format-latex-header" variable. Actually I don't know if there is a way to add something to "org-format-latex-header" on a per-file basis... Is there? Cheers, Manuel 2012/6/12 renato : > Hi, I'm really enjoying the org-mode + cdlatex combo. One question > though, how can I customize the latex header produced by > org-export-as-latex ? I really need to add some \newcommand and > \newtheorem statements. > > best wishes, > renato >
Re: [O] calfw, get rid of file names
On Tue, Jun 12, 2012 at 1:40 AM, Michael Welle wrote: > The thing Kyle wanted to point out is that you can customise > the item in the above advice. (message item) just prints the item to the > status line. > > Since I'm a bit short on time at the moment I cheated a little bit and > manipulated the function cfw:org-summary-format (calfw-org.el). At the > end of this function I excluded the buffer name from the concatenation. Hah, wow, ok, I actually completely was not paying attention when I copy/pasted that, just thought "Oh I remember fixing that" and didn't realize I never actually /finished/ the function, and hadn't used calfw much since. Oops. :) But yeah, that is definitely a way to change the output, but on further inspection it doesn't look like the right one. If you check out calfw-org.el, there's a useful defvar, cfw:org-schedule-summary-transformer. This allows you to write your own summary line transformer without even needing to advise, so you could just copy cfw:org-summary-format, chop it up to your hearts content, then set the variable without modifying the package at all. I'll probably do this myself. Also
[O] [Solved] Re: Taskjuggler and installation
Hi, just wanted to say it was indeed emacs picking up an ages-old org-install.el. Thanks, Simon On 06/06/2012 01:46 AM, Nick Dokos wrote: Simon Thum wrote: Hi all, I am using org-mode's taskjuggler export on two machines (win7 standard emacs 23.3/linux emacs 23.4.2) with 99% identical configuartion. Except for one funny thing: What org-version? Do you byte-compile the code on both platforms? Taskjuggler export raises an undefined function on windows. Yes, I do require 'org-install, org-mode from identical sources (git-sync'ed). Linux is fine. What function? I am fixing this by adding a require 'org-taskjuggler, but that can't really be it. Any advice how to track this down? M-x toggle-debug-on-error RET and look at the backtrace to see what the call chain looks like. A missing autoload perhaps? Why exactly 23.3 on windows and 23.4.2 on linux behave differently is a mystery, at least for now. Nick
Re: [O] Checkboxes for description lists
Hello, "Sebastien Vauban" writes: > It seems we can't put footnotes in the left part of the > description. Is it intended? Could that restriction be removed? That's not really intended, and the fix is easy, but I have a question first: how would it be rendered in LaTeX? Apparently, "\item[tag text\footnote{contents}] item's contents" isn't valid. Regards, -- Nicolas Goaziou
Re: [O] calfw, get rid of file names
Hi, I'm sorry for my late response. At Tue, 12 Jun 2012 12:14:29 -0700, Kyle Machulis wrote: > : > But yeah, that is definitely a way to change the output, but on > further inspection it doesn't look like the right one. If you check > out calfw-org.el, there's a useful defvar, > cfw:org-schedule-summary-transformer. This allows you to write your > own summary line transformer without even needing to advise, so you > could just copy cfw:org-summary-format, chop it up to your hearts > content, then set the variable without modifying the package at all. > I'll probably do this myself. Yes. That is my intent for customization. However, I think calfw-org should be improved for better integration between org-mode and calfw. Because I'm not an user of the org-mode scheduling (I'm using howm mainly), I have little idea for better summarizing the items and calfw-org customization. If you give me some idea or patches, I would include them. (I may have to involve org-mode users for integration...) Thank you, -- SAKURAI, Masashi (family, given) m.saku...@kiwanami.net