Re: [O] org-vcard -- possible to convert .vcf files to .org ?
Saša Janiška writes: > Eric Abrahamsen writes: [...] > org-caldav is nice, but not useful any longer for me due to > https://github.com/dengste/org-caldav/issues/51 issue. :-( Also, it looks like there are many forks of this repository, some of which presumably address that issue -- has anyone tried any of the forks recently? E
[O] Babel doesn't like some Racket comments
C-c C-c-ing this code #+begin_src scheme (define (foo x) ;just add one (+ 1 x)) ; comment #+end_src causes Racket (geiser) to freeze up. Sometimes I see a Code block evaluation complete. geiser-repl--maybe-send: Args out of range: 61, 62 -like message. The culprit is the *; comment *next to the `(+ 1 x))` line. If I take it out the *; just add one* doesn't cause a problem. This behavior doesn't happen in naked racket or regular geiser on racket. LB
[O] [PATCH] ox-confluence.el: Handle checkboxes and inactive timestamps correctly
Hello, attached please find a patch for contrib/ox-confluence.el (authored by Sébastien Delafond); the patch simply translates and fixes some selected enhancements from ox-confluence-en.el (authored by Correl Roush). As a result ox-confluence.el encodes square brackets in checkboxes or inactive timestamps, so that they no longer collide with the native link-syntax of atlassian confluence. It would be great, if someone could review and apply this patch if appropriate. Best regards, Marc Ihm --- a/contrib/lisp/ox-confluence.el 2017-02-28 19:52:25.707036600 +0100 +++ b/contrib/lisp/ox-confluence.el 2017-02-28 19:52:42.225721900 +0100 @@ -38,6 +38,7 @@ ;; Define the backend itself (org-export-define-derived-backend 'confluence 'ascii + :filters-alist '((:filter-final-output . org-confluence-fix-timestamps)) :translate-alist '((bold . org-confluence-bold) (code . org-confluence-code) (example-block . org-confluence-example-block) @@ -84,14 +85,23 @@ (defun org-confluence-item (item contents info) (let* ((plain-list (org-export-get-parent item)) (type (org-element-property :type plain-list)) - (bullet (if (eq type 'ordered) ?\# ?\-))) -(concat (make-string (1+ (org-confluence--li-depth item)) bullet) -" " -(if (eq type 'descriptive) - (concat "*" - (org-export-data (org-element-property :tag item) info) - "* - ")) -(org-trim contents + (depth (1+ (org-confluence--li-depth item))) + (checkbox-possibly (cl-case (org-element-property :checkbox item) + (on "*{{(X)}}* ") + (off "*{{( )}}* ") + (trans "*{{(-)}}* " +(cl-case plain-list + (descriptive + (concat (make-string depth ?-) " " checkbox-possibly + (org-export-data (org-element-property :tag item) info) ": " + (org-trim contents))) + (ordered + (concat (make-string depth ?#) " " checkbox-possibly + (org-trim contents))) + (t + (concat (make-string depth ?-) + " " checkbox-possibly + (org-trim contents)) (defun org-confluence-fixed-width (fixed-width contents info) (org-confluence--block @@ -106,12 +116,18 @@ (format "\{\{%s\}\}" (org-element-property :value code))) (defun org-confluence-headline (headline contents info) - (let ((low-level-rank (org-export-low-level-p headline info)) -(text (org-export-data (org-element-property :title headline) - info)) -(level (org-export-get-relative-level headline info))) -;; Else: Standard headline. -(format "h%s. %s\n%s" level text + (let* ((low-level-rank (org-export-low-level-p headline info)) + (text (org-export-data (org-element-property :title headline) +info)) + (todo (org-export-data (org-element-property :todo-keyword headline) +info)) + (level (org-export-get-relative-level headline info)) + (todo-text (if (or (not org-export-with-todo-keywords) + (string= todo "")) + "" + (format "*{{%s}}* " todo + +(format "h%s. %s%s\n%s" level todo-text text (if (org-string-nw-p contents) contents "" @@ -167,7 +183,7 @@ (concat (when (org-export-table-row-starts-header-p table-row info) "|") - contents "|"))) + " " contents " |"))) (defun org-confluence-template (contents info) (let ((depth (plist-get info :with-toc))) @@ -199,6 +215,23 @@ (setq item (org-export-get-parent item))) depth)) +;; Define output filter +(defun org-confluence-fix-timestamps (text back-end info) + "Mask brackets of timestamps in final output, so that + confluence does not misinterpret them as links." + (with-temp-buffer +(insert text) +(goto-char (point-min)) +(while (search-forward-regexp org-ts-regexp-both nil t)) +(goto-char (match-beginning 0)) +(when (string= (char-to-string (following-char)) "[") + (delete-char 1) + (insert "(") + (goto-char (match-end 0)) + (delete-char -1) + (insert ")")) +(buffer-substring (point-min) (point-max + ;; main interactive entrypoint (defun org-confluence-export-as-confluence (&optional async subtreep visible-only body-only ext-plist)
Re: [O] Two formerly internal libraries that are still being required but no longer exist
Hello, Jonas Bernoulli writes: > I've run into these two feature inconsistencies: > > - The command ~org-protocol-create-for-org~ does ~(require 'org-publish)~, > but that should now be ~ox-publish~. Fixed. Thank you. > > - The command ~org-capture-import-remember-templates~ does ~(require > 'org-remember)~, which makes sense because its purpose is to convert from > the ~org-remember~ format into the ~org-capture-templates~ format. However > ~org-remember~ has been removed, so this won't work. I don't think this is an issue. This function only makes sense if user has an old `org-remember' library lying around. Otherwise, it raises an error. This is the actual behaviour. The other option is to remove the function altogether. WDYT? Regards, -- Nicolas Goaziou
Re: [O] org-vcard -- possible to convert .vcf files to .org ?
Rasmus writes: > Eric Abrahamsen writes: > >> Saša Janiška writes: >> >>> Eric Abrahamsen writes: >>> Glad to know you're enthusiastic, and patches are always welcome! >>> >>> What can you recommend for learning Elisp which might be also useful for >>> špssobče contributibution to EBDB? >> >> What would be great is having more country-specific parsing and display >> functions. EBDB can display phone numbers, etc, differently depending on >> the country code. You can look at ebdb-i18n, and also ebdb-chn, which is >> the only country-specific library I've written, which is why I'm hoping >> people will pitch in here :) Basically look at your contacts and see if >> any them have field data that should be read or displayed in >> country-specific ways, and see if you can tackle that. > > Perhaps the data from libphonenumber can be used. > > https://github.com/googlei18n/libphonenumber That's handy, thanks! And turns out I already had it installed.
Re: [O] resize org-table when exporting to latex
This requires some LaTeX plumbing work. A few tricks: First, use tabularx as suggested to stretch the columns automatically as the size of the table changes. - Use a smaller font size, such as :font \scriptsize - Enlarge the table horizontally (for example: :width 0.8\paperheight) - Put the page in landscape with the "pdflscape" package: wrap the table with "#+BEGIN_landscape ... #+END_landscape" and change :width to \paperheight - Use package "graphicx" and wrap the table in "#+LATEX: \resizebox{0.8\paperheight}{!}{ ... #+LATEX: }" to make the whole table smaller An example of the above in Org syntax (remember to call the necessary packages): #+BEGIN_landscape #+ATTR_LATEX: :options [htbp] #+BEGIN_table #+BEGIN_center #+LATEX: \resizebox{0.8\paperheight}{!}{ #+CAPTION: A big table made small #+BEGIN_threeparttable #+ATTR_LATEX: :center nil :environment tabularx :width \paperheight :align :font \scriptsize :booktabs t ... #+ATTR_LATEX: :options [flushleft] #+BEGIN_tablenotes \item[] Source: Someone on the Internet. #+END_tablenotes #+END_threeparttable #+LATEX: } #+END_center #+END_table #+END_landscape 2017-02-28 0:21 GMT+00:00 Jeremie Juste : > > Hello, > > Is there a way to resize latex table when exporting to latex? > For now my only recourse is to export the latex table copy the latex > code back to org-mode apply \scalebox. > > Do you have a more convenient way in mind? > > Best wishes, > > Jeremie > > > > > > >
[O] publishing files with images to latex
Hi, when I publish a project to PDF org-mode does not include the images in the exported PDF (i.e. LaTeX doesn't find them), when I start the publishing process from a buffer which is /not/ in the directory to be published. E.e. when I have the org files in ~/Documents/mpipdocs/linux and publish to the same directory, but I'm in a buffer ~/.emacs, the images show not up in the PDF export and in the *Messages* I get messages "PDF file exported with errors" or so. However, when I'm visiting, e.g. ~/Documents/mpipdocs/linux/index.org and start the publishing process, everything goes Ok. This is probably caused by commit 120f8c09f460c55131eb8d99685732ee88f538ae (and at least one follow-up commit after the 9.0.1 release (with 9.0.1 publishing doesn't work at all -- at least when the visited buffer directory isn't the publishing directory, perhaps 2e35a59763efc5324874ec1a894691fe2123495c ?). Any help is very much appreciated. Thanks and best regards Robert
Re: [O] avoiding "First item of list cannot move without its subtree"
On 23 Feb 2017, at 14:07, Nicolas Goaziou wrote: > Hello, > > "Max Rydahl Andersen" writes: > >> Here is a screencast of me trying before and after evaluating buffer >> with the function in it. >> >> https://v.usetapes.com/COVDzfByN0 > > Odd. I definitely see TRT in my case. > > What is the value of `org-shiftmetaleft-hook' ? Could you try in > a minimal environment to check if nothing interferes with the function > (e.g., `org-autolist')? > > If that fails, could you debug `my-shiftmetaleft' and see if it is > called at all? Gah - my brain was wired wrong. I tried to use meta-left, not shift-meta-left. Now it is working - thanks :) /max http://about.me/maxandersen
[O] Two formerly internal libraries that are still being required but no longer exist
I've run into these two feature inconsistencies: - The command ~org-protocol-create-for-org~ does ~(require 'org-publish)~, but that should now be ~ox-publish~. - The command ~org-capture-import-remember-templates~ does ~(require 'org-remember)~, which makes sense because its purpose is to convert from the ~org-remember~ format into the ~org-capture-templates~ format. However ~org-remember~ has been removed, so this won't work. These issues exist in both the ~master~ and ~maint~ branches. Warm regards, Jonas
Re: [O] org-vcard -- possible to convert .vcf files to .org ?
Eric Abrahamsen writes: > Saša Janiška writes: > >> Eric Abrahamsen writes: >> >>> Glad to know you're enthusiastic, and patches are always welcome! >> >> What can you recommend for learning Elisp which might be also useful for >> špssobče contributibution to EBDB? > > What would be great is having more country-specific parsing and display > functions. EBDB can display phone numbers, etc, differently depending on > the country code. You can look at ebdb-i18n, and also ebdb-chn, which is > the only country-specific library I've written, which is why I'm hoping > people will pitch in here :) Basically look at your contacts and see if > any them have field data that should be read or displayed in > country-specific ways, and see if you can tackle that. Perhaps the data from libphonenumber can be used. https://github.com/googlei18n/libphonenumber Rasmus -- Together we'll stand, divided we'll fall