[O] bug#17651: 24.3.91; Emacs hangs in Org
Eli Zaretskiiwrites: >> From: Sebastien Vauban >> Cc: 17...@debbugs.gnu.org >> Date: Sat, 31 May 2014 11:52:19 +0200 >> >> > Also, typing "finish" repeatedly should reveal in which function is >> > Emacs looping. >> >> --8<---cut here---start->8--- >> (gdb) xbacktrace > > No, please type "finish" _before_ invoking "bt" or "xbacktrace", > because these invoke functions inside Emacs, which hit some assertion > violation in this situation. More information was requested, but no response was given within a few months, so I'm closing this bug report. If the problem still exists, please reopen this bug report. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no
Re: [O] non-standard link errors
Nicolas Goaziouwrote: > Not that I'm against the idea, but wouldn't it be a poor way to properly > fix the issue, i.e., add new link types? I have come up with a better solution than globally passing "broken" links. I defined a new "raw" link type. So now if I want to put a non-standard link in my export, I can do something like: Here is a [[raw:foo:/\bar, baz][bad link]]. which is exported in html as: Here is a bad link. Now I can have non-standard links included in the output without disabling link checking for all standard link types. This is how it is defined in my .emacs: (org-add-link-type "raw" 'org-raw-follow 'org-raw-export) (defun org-raw-follow (path)) (defun org-raw-export (path desc format) "Export a raw link. See `org-add-link-type' for details about PATH, DESC and FORMAT." (cond ((eq format 'html) (format "%s" path desc)) ((eq format 'latex) (format "\\href{%s}{%s}" path desc)) ((eq format 'ascii) (format "%s (%s)" desc path)) (t path))) Perhaps this could be included in the standard Org distribution as a fallback option for exporting non-standard link types. Emacs/Org does nothing with the link. The user is responsible for ensuring the output is correct.
[O] How to add left superscripts
How to add left superscripts without using additional packages in org-mode?
Re: [O] How do I format numbers to an exported table to latex, produced by a code block?
>> I have the following org file: >> >> #+BEGIN_SRC python :exports both >> import numpy as np >> >> return np.matrix([[.123456789, 2], [3, 4]]) >> #+END_SRC >> >> #+RESULTS: >> | 0.12345679 | 2 | >> | 3 | 4 | >> >> I want to export it to latex to produce a pdf but I want to format the >> numbers of the table so I get, say >> >> | 123.456e-3 | 2.000 | >> | 3.000 | 4.000 | >> >> on the exported pdf. >> >> How can I do it? > > > tblfm allows a printf descriptions. E.g. > > | 0.120 | 2.000 | > | 3.000 | 4.000 | > #+tblfm: $1=$1;%.3f :: $2=$2;%.3f > > You can attach it via :post. How do I use `:post'? In the (info "(org) A LaTeX example") node there is the description of `:fmt' and `:efmt' which seem to do what I want but I can't figure out how to use them.
Re: [O] How to obtain a list of items completed this week.
Nicolas Goaziouwrites: > Hello, > > writes: > >> Perhaps this hasn't been done yet? Would this type of thing be >> relatively easy to add? > > You may have a look at (info "(org) Matching tags and properties"), with > CLOSED property (e.g., CLOSED>>="<-1w>" or some such). That worked! The exact procedure was: M-x org-tags-view CLOSED>="<-1w>" Thanks, Chris. > > Regards, signature.asc Description: PGP signature
Re: [O] Is it possible to keep /all/ the heading properties in one place?
On Sunday, 28 Feb 2016 at 17:46, Rasmus wrote: > Did you try prettify-symbol-mode? That's exactly what I am using and tried: #+begin_src emacs-lisp (defun esf/setup-org-prettify-symbols () (setq prettify-symbols-alist '(("\\to" . →) ("SCHEDULED:". ) ("DEADLINE:" . ) ))) (add-hook 'org-mode-hook 'esf/setup-org-prettify-symbols) #+end_src The \to is there for testing and this bit seems to work without problems. It's the two new lines that cause difficulties. > Though org will do some fortification already, which might cause the > error you are seeing. There's some clash somewhere because enabling the above causes fontification to fail partway through my org file. > Fallback might be too strong, but you could use the prepend argument to > set-fontset-font. Here’s what I used to use. In Emacs-25 it seems I > don’t really mess with this anymore, though. Thanks for this. But it does seem like it's not necessary in emacs 25. I only use pre-25 emacs on my Nokia but I don't need this kind of font support there so I'll leave things be. Thanks again, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55
Re: [O] Is it possible to keep /all/ the heading properties in one place?
Eric S Fragawrites: > On Sunday, 28 Feb 2016 at 12:32, Rasmus wrote: >> Emacs should pick the right font. Most likely, you need to install >> Symbola, > > Indeed! Thanks for the pointer. Installing symbola did the job in > terms of being able to see those symbols. > > Unfortunately, I cannot get org to prettify scheduled and deadline > entries without causing org to have problems fontifying the rest of the > file. But I'm not sure why that is happening so will post later when/if > I narrow this down. Did you try prettify-symbol-mode? In at least the master version of Emacs you should be able to use prettify-symbols-alist. Though org will do some fortification already, which might cause the error you are seeing. >> The only fonts I’ve got configured are Fira as the main font, DejaVu as >> fallback and XITS for math. > > I know this is OT for this list but can you show me how you configure > fallback fonts? Fallback might be too strong, but you could use the prepend argument to set-fontset-font. Here’s what I used to use. In Emacs-25 it seems I don’t really mess with this anymore, though. (mapc (lambda (x) (set-fontset-font x 'mathematical (font-spec :family "XITS Math") nil 'append) (set-fontset-font x 'symbol (font-spec :family "DejaVu Sans Mono") nil 'prepend) (set-fontset-font x 'greek (font-spec :family "Fira Mono") nil 'prepend) (set-fontset-font x '(#x1f601 . #x1f567) "Symbola")) '("fontset-startup" "fontset-default")) Rasmus -- Got mashed potatoes. Ain't got no T-Bone. No T-Bone
Re: [O] Is it possible to keep /all/ the heading properties in one place?
Aloha Oleh, Oleh Krehel writes: > >> Org can export to Texinfo. It can be helpful for those not understanding >> well enough the latter. > > Org can export to Texinfo. But not well enough to be able to write Org > manual in Org. I worked on a project to port the Org manual to Org about three years ago. At the time, I thought the Texinfo exporter supported the project quite well. The project had a mixed reception and ultimately wasn't adopted, but I don't remember Texinfo exporter deficiencies figuring into the decision. My impression at the time was that the programmers who looked at the project thought the Texinfo exporter was doing its job well. hth, Tom -- Thomas S. Dye http://www.tsdye.com
Re: [O] Bug: HTML export fails to set source IDs correctly [8.3.4 (8.3.4-elpa @ /Users/aaron/.emacs.d/elpa/org-20160222/)]
Hello, Aaron Millerwrites: > Can you comment on the likelihood of a patch being accepted that gives > HTML export a parallel option, with all the associated caveats? It > seems like the use case is pretty clear, and I don't mind taking the > time to write up the change. Patch welcome! There one noticeable difference between HTML and LaTeX export back-ends. In the former, CUSTOM-ID property is always exported as-is, so I assume the variable should be a no-op for this. Regards, -- Nicolas Goaziou
Re: [O] Bug: HTML export fails to set source IDs correctly [8.3.4 (8.3.4-elpa @ /Users/aaron/.emacs.d/elpa/org-20160222/)]
Can you comment on the likelihood of a patch being accepted that gives HTML export a parallel option, with all the associated caveats? It seems like the use case is pretty clear, and I don't mind taking the time to write up the change. On 2/27/16 3:38, Nicolas Goaziou wrote: Hello, Aaron Millerwrites: Can you provide some insight on why the behavior was changed? You needed to conform your labels to the target language, i.e, make sure the label didn't contain any forbidden characters, which you were expected to know. `org-latex-prefer-user-labels' explains it very well. It is for `latex' back-end only, however. Regards,
Re: [O] How to obtain a list of items completed this week.
Hello,writes: > Perhaps this hasn't been done yet? Would this type of thing be > relatively easy to add? You may have a look at (info "(org) Matching tags and properties"), with CLOSED property (e.g., CLOSED>>="<-1w>" or some such). Regards, -- Nicolas Goaziou
Re: [O] [bug] inserting footnotes via org-footnote-action command
Hello, Martin Carléwrites: > Never mind, I shall explain and release all the hack, if there is more > time. OK. > Because, tags are a general and convenient way of collecting sections > and I'like to avoid special where ever possible. Well, `org-footnote-section' is special, but it's really easy to know if you're at a footnote section. Besides, you may as well set it to nil, so as to not bother at all. Regards, -- Nicolas Goaziou
Re: [O] How to add a test?
Hello, George M Joneswrites: > What's the process for adding a test (specifically to babel)? > > The only part that looks non-obvious is how to generate the test ID, > e.g. in ob-shell-test.org: > > * Associative array tests (simple map) > :PROPERTIES: > :ID: bec1a5b0-4619-4450-a8c0-2a746b44bf8d > :END: > > From there it looks like you just add to the correct file in > org-mode/testing/examples/*.org and the corresponding > /org-mode/testing/lisp/test-*.el file. Am I missing anything? > > I'll add to the README or docs unless it's already there. I suggest to stay away from examples/ and `org-test-at-id' altogether. I find these tests horrible to debug when something goes wrong. I suggest to stay with `org-test-with-temp-text', or, if needed, `org-test-with-temp-text-in-file' and make the test self-contained. Also, I think it is better to have only one `should' or related, outside of this macro, so the whole test is easier to evaluate partially. See, e.g., "test-org-footnote.el". Obviously YMMV and the more important thing is to have more tests. How tests are written is a lesser matter. Feel free to ignore my suggestions. Thank you for your work. Regards, -- Nicolas Goaziou
Re: [O] How to obtain a list of items completed this week.
Perhaps this hasn't been done yet? Would this type of thing be relatively easy to add? Thanks, Chris. cho...@chopps.org writes: > I've been trying on and off to figure out how to obtain a list of all > the TODOs that I've marked completed (DONE) during the last week (or > whatever time period, but typically I want the last 7 days). There's > undoubtedly some very simple way to obtain this that I just can't locate > for whatever reason. > > I'm giving up and asking for help, can someone let me know how this is > done? :) > > FWIW, I've got things setup so that when I mark a TODO as DONE, CLOSED: > gets added to the entry. > > Thanks, > Chris. signature.asc Description: PGP signature
[O] Dired does not correctly process file names with ornamented and special Characters in Emacs for Windows
Hello Filenames with ornamented or special characters are often not shown correctly in "dired", and cannot be opened. The strange thing is: sometimes it works properly, but I cant figure out under what circumstances - it seems to be completely arbitrary. Would anybody know how to make it always work ? Im on Windows 7-64bit, running a Emacs Version 25.0.50.1 (x86_64-w64-mingw32) of 2015-11-10, which I downloaded from http://sourceforge.net/projects/emacsbinw64/?source=typ_redirect I additionally installed msys2-64bit with mingw64, which is included in my Windows environment variable PATH (...;C:\Programme\msys2-64\mingw64\bin) Based on information I found on the web, I further added the following to my init.el file: ;; configure grep acc to http://jpstup.blogspot.ch/2011/02/getting-emacss-rgrep-working-in-windows.html ;; and http://www.gnu.org/software/emacs/manual/html_mono/efaq-w32.html#Dired-ls (when (or (eq system-type 'windows-nt) (eq system-type 'msdos)) (setenv "PATH" (concat "C:\\Programme\\msys2-64\\usr\\bin;C:\\Programme\\msys2-64\\mingw64\\bin;" (getenv "PATH"))) (setq ;;find-program "C:\\Programme\\msys2-64\\usr\\bin\\find.exe" ;;grep-program "C:\\Programme\\msys2-64\\usr\\bin\\grep.exe" ls-lisp-use-insert-directory-program t ;; use external ls insert-directory-program "c:\\Programme\\msys2-64\\usr\\bin\\ls.exe" ;; ls program name diff-command "C:\\Programme\\msys2-64\\mingw64\\bin\\diff.exe" ) ) ;; Prevent issues with the Windows null device (NUL) ;; when using cygwin find with rgrep. (defadvice grep-compute-defaults (around grep-compute-defaults-advice-null-device) "Use cygwin's /dev/null as the null-device." (let ((null-device "/dev/null")) ad-do-it)) (ad-activate 'grep-compute-defaults)
Re: [O] Is it possible to keep /all/ the heading properties in one place?
On Sunday, 28 Feb 2016 at 12:32, Rasmus wrote: > Emacs should pick the right font. Most likely, you need to install > Symbola, Indeed! Thanks for the pointer. Installing symbola did the job in terms of being able to see those symbols. Unfortunately, I cannot get org to prettify scheduled and deadline entries without causing org to have problems fontifying the rest of the file. But I'm not sure why that is happening so will post later when/if I narrow this down. > The only fonts I’ve got configured are Fira as the main font, DejaVu as > fallback and XITS for math. I know this is OT for this list but can you show me how you configure fallback fonts? Thanks, eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.4-626-gb62d55
Re: [O] Is it possible to keep /all/ the heading properties in one place?
Nicolas Goaziouwrites: > Some users complained, and told me that "Org is not a programming > language". Fair enough. Org has, indeed, to strike a balance between > structure, required for efficiency and maintainability, and sloppiness, > needed when you want to quickly jot down notes in a document, or simply > let your ideas flow as you type, without hindrance. Simply the headline structure is enough for all of this. The rest, like properties, tags and logging can be made more rigorous. For instance, the current tags implementation implies the illusion that they can be manipulated by hand. However, in practice it's frustrating to align them. >> Suggestion, and I've said it before, Org needs a standard simple inline >> kbd markup. Just like Markdown's and Texinfo's @kbd{}. >> Since Org is tied into Emacs having an easy (and unambiguous) way to >> denote keyboard shortcuts would be very convenient. > > This is export back-end specific. Org has no use for a "kbd" markup. I really disagree here. The very first thing I did used Org for was jotting down the Emacs key bindings that I wanted to remember. Not being able to distinguish the key bindings from symbols removes from the markup's expressiveness. For example, some people write like this: ~M-x forward-char~ or ~C-f~ while I write like this: ~M-x~ =forward-char= or ~C-f~ As long as only I read my own documents, my notation isn't a problem. But if I share it with someone else, they will have to get used to my non-standard notation. >> Adding that would also progress the direction of having Org be the >> language for Emacs manuals. Right now, Org's own manual is in Texinfo, >> which is a shame since no one likes Texinfo and few people understand >> enough of it to get by. > Org can export to Texinfo. It can be helpful for those not understanding > well enough the latter. Org can export to Texinfo. But not well enough to be able to write Org manual in Org. That was my point. To be able to write a manual as rich as any existing one, with only Org's built-in markup, i.e. without a tonne of export specific #+TEXINFO or #+HTML includes. I made some progress towards this goal with some custom code for ivy.org -> ivy.html + ivy.texi export: https://github.com/abo-abo/swiper/blob/master/doc/ivy-ox.el. I made use of my own kbd markup that I wrote once in Org, but exported the same both to Texinfo and HTML (see e.g. http://oremacs.com/swiper/#key-bindings). regards, Oleh
Re: [O] How do I format numbers to an exported table to latex, produced by a code block?
Hi, Diogo Ramoswrites: > I have the following org file: > > #+BEGIN_SRC python :exports both > import numpy as np > > return np.matrix([[.123456789, 2], [3, 4]]) > #+END_SRC > > #+RESULTS: > | 0.12345679 | 2 | > | 3 | 4 | > > I want to export it to latex to produce a pdf but I want to format the > numbers of the table so I get, say > > | 123.456e-3 | 2.000 | > | 3.000 | 4.000 | > > on the exported pdf. > > How can I do it? tblfm allows a printf descriptions. E.g. | 0.120 | 2.000 | | 3.000 | 4.000 | #+tblfm: $1=$1;%.3f :: $2=$2;%.3f You can attach it via :post. There are probably also other ways. Rasmus -- To err is human. To screw up 10⁶ times per second, you need a computer
Re: [O] Is it possible to keep /all/ the heading properties in one place?
Eric S Fragawrites: > Rasmus, > > thanks for the suggestions. However, your email has highlighted the > fact that the font(s) I use do not have proper coverage of unicode > characters! :-( I wonder which font you use? I typically use DejaVu > and Terminus but also Lucida. None of these can display most of the > characters you suggested unfortunately. Emacs should pick the right font. Most likely, you need to install Symbola, Nombre: ttf-symbola Descripción : Font for unicode symbols (part of Unicode Fonts for Ancient Scripts). URL : http://users.teilar.gr/~g1951d/ The only fonts I’ve got configured are Fira as the main font, DejaVu as fallback and XITS for math. Hope it helps, Rasmus -- And I faced endless streams of vendor-approved Ikea furniture. . .
[O] How to add a test?
What's the process for adding a test (specifically to babel)? The only part that looks non-obvious is how to generate the test ID, e.g. in ob-shell-test.org: * Associative array tests (simple map) :PROPERTIES: :ID: bec1a5b0-4619-4450-a8c0-2a746b44bf8d :END: >From there it looks like you just add to the correct file in org-mode/testing/examples/*.org and the corresponding /org-mode/testing/lisp/test-*.el file. Am I missing anything? I'll add to the README or docs unless it's already there. Thanks, ---George Jones
Re: [O] [bug] inserting footnotes via org-footnote-action command
On 2016-02-28 Sun 02:23, Nicolas Goaziou wrote: > Hello, > > Martin Carléwrites: > >> Well, I wrapped the exporter mechanism into some advice functions that >> allow for many different exports from a single file in such a manner that >> multiple exports are not restricted to subtrees. > > Not sure to understand this. Never mind, I shall explain and release all the hack, if there is more time. > >> This extended export mechanism collects sections as marked by tags. >> This is why, I need to tag the org-footnote-section as well. > > Why don't you also collect systematically the footnote section? Because, tags are a general and convenient way of collecting sections and I'like to avoid special where ever possible. All in all, below are the tiny changes I was looking for, marked in comments as 'hack'. All best, mc > , > | > | (defun org-footnote--clear-footnote-section () > | "Remove all footnote sections in buffer and create a new one. > | New section is created at the end of the buffer, before any file > | local variable definition. Leave point within the new section." > | (when org-footnote-section > | (goto-char (point-min)) > | (let ((regexp > |(format org-complex-heading-regexp-format ;; "^\\*+ +%s[ \t]*$" > |(regexp-quote org-footnote-section))) > | tags) ;;; hack > | (while (re-search-forward regexp nil t) > | > | ;; ;;; hack > | (save-match-data > | (save-excursion > | (beginning-of-line 1) > | (looking-at org-todo-line-tags-regexp) > | (when (match-beginning 4) > | (setq tags (concat " " (buffer-substring (match-beginning 4) (match-end 4))) > | > | (delete-region > | (match-beginning 0) > | (progn (org-end-of-subtree t t) > | (if (not (eobp)) (point) > | (org-footnote--goto-local-insertion-point) > | (skip-chars-forward " \t\n") > | (if (eobp) (point) (line-beginning-position)) > | (goto-char (point-max)) > | (org-footnote--goto-local-insertion-point) > | (when (and (cdr (assq 'heading org-blank-before-new-entry)) > | (zerop (save-excursion (org-back-over-empty-lines > | (insert "\n")) > | ;; (insert "* " org-footnote-section "\n") > | (insert "* " org-footnote-section (or tags "") "\n") ;;; hack — the simple way > | (when tags > | (save-excursion > | (org-back-to-heading t) > | (org-set-tags nil 'align))) ;;; hack — the aligned way > | > | )))
Re: [O] Is it possible to keep /all/ the heading properties in one place?
Rasmus, thanks for the suggestions. However, your email has highlighted the fact that the font(s) I use do not have proper coverage of unicode characters! :-( I wonder which font you use? I typically use DejaVu and Terminus but also Lucida. None of these can display most of the characters you suggested unfortunately. eric -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.91.1, Org release_8.3.3-619-gca1fb8
Re: [O] Is it possible to keep /all/ the heading properties in one place?
Hello, Oleh Krehelwrites: > Already have been using it for years. I actually prefer outline.el to > org-babel for most things now. But not for GTD - for that I need Org. > >> Alas, the Devil is in the detail: >> >> (example >>... >>(properties ...)) > > Not really. You see, the `beginning-of-defun' trick is: a defun is a > thing that starts in the first column (that's why we escape all parens > in the first column in Elisp). This trick has been working successfully > for decades. It's both fast and simple. It reminds me one mistake I made a couple years ago, when I changed "key=value" to ":key value" in export attributes, for consistency with Babel parameters. When looking at #+ATTR_LATEX: :key1 value1 :key2 value2 I thought it would be easy to parse it using `read', and get a ready-to-use plist. Unfortunately, users were required to tell the difference between a symbol and a string (e.g., :key #value is invalid, so you need to write :key "#value"), and to know the characters to quote in the strings they would like to use. Some users complained, and told me that "Org is not a programming language". Fair enough. Org has, indeed, to strike a balance between structure, required for efficiency and maintainability, and sloppiness, needed when you want to quickly jot down notes in a document, or simply let your ideas flow as you type, without hindrance. In my experience, I think your suggestion would just repeat the very same mistake. Yet, again, I may be wrong, so I guess you will have to try and take the requirements for Org into consideration. > Suggestion, and I've said it before, Org needs a standard simple inline > kbd markup. Just like Markdown's and Texinfo's @kbd{}. > Since Org is tied into Emacs having an easy (and unambiguous) way to > denote keyboard shortcuts would be very convenient. This is export back-end specific. Org has no use for a "kbd" markup. > Adding that would also progress the direction of having Org be the > language for Emacs manuals. Right now, Org's own manual is in Texinfo, > which is a shame since no one likes Texinfo and few people understand > enough of it to get by. Org can export to Texinfo. It can be helpful for those not understanding well enough the latter. > Do we have a way in Org to archive a heading form anywhere into a memoir > format like this: > > * 2014 > ** 2014-01 January > *** 2014-01-03 Thursday > CANCELLED Foobar > CLOSED: [2014-01-03 Fri 09:42] SCHEDULED: <2013-12-25 Wed> > Added: [2013-08-08 Thu 17:38] > DONE Baz > CLOSED: [2014-01-03 Fri 17:12] > > Each heading is archived into level 4, on the day it was closed. I had > it working a few years ago, relying on org-archive.el. But when I tried > this week, it stopped working, so I had to rewrite it. I suggest to start a bug report, if possible with an ECM demonstrating the issue, in another thread. > Thanks, I didn't know about it. It looks very similar to Racket's > Scribble, and my own ElTeX. Indeed, and they are all focused towards exporting. Export is but one part of Org. Regards, -- Nicolas Goaziou
Re: [O] non-standard link errors
Hello, Skip Collinswrites: > I added this line to the top of my org file: > #+OPTIONS: broken-links:t > > But that eliminates both the link and its description from the export. > Changing it from 't' to 'mark' puts a BROKEN LINK message in the > output. I suggest adding a new option 'pass' that would simply pass > "broken" links verbatim into the output. Not that I'm against the idea, but wouldn't it be a poor way to properly fix the issue, i.e., add new link types? Regards, -- Nicolas Goaziou