Re: [O] Org not preserving Python indent levels on LaTex export due to tabs
i can't seem to find the -i flag in the manual. perhaps i used the wrong search term? i looked in literal examples and in working with source code. i am using maint. also: - is there another flag to set org-src-preserve-indentation to nil? - will -i still work if org-src.preserve-indentation is t? thanks. i'd be happy with a fixed 2-space indentation, but that is not possible in current org. i find org-src-preserve-indentation to cause more issues than it improves, so i am going to transition to it being t, which feels safer even though it is not the default and does not have the 2 spaces. samuel On 2/2/14, Nicolas Goaziou wrote: > Hello, > > James Ryland Miller writes: > >> I'm having trouble with getting python source=code blocks to export to >> LaTeX properly. I've figured out what's going wrong: the exporter is >> inserting tab characters on lines with 2 or more indentation levels in >> python. If I use org to export to .tex first, and then untabify the >> .tex files, the indent levels are preserved (assuming the tabs >> correctly lined up with the corresponding python in the first place, >> which many times they don't). > > Try to set `org-src-preserve-indentation' to a non-nil value (on a very > recent Org) or add a "-i" flag to you source block: > > #+BEGIN_SRC python -n -i > ... > #+END_SRC > > This should prevent Org from touching indentation within the block. > > > Regards, > > -- > Nicolas Goaziou > > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] Behavior of Org mode Babel code snippets with respect to M-q (fill-paragraph) and C-/ (undo)
"[bug] [babel] babel corrupts undo history" On 2/13/14, Samuel Wales wrote: > Undo not working is a bug. I think we identified the bug on the > mailing list, but the fix was never implemented, although I think an > attempted fix was. > > I think it has to do with editing a source code block trying to do > things with undo or undo-boundary. The fix is probably to rip out all > undo-related code there. > > > On 2/5/14, Omid wrote: >> Hello Nick, >> >> Thanks for your quick reply. The variable >> org-edit-src-content-indentation does indeed have to do with the >> indentation I was referring to. But it is relative. According to the >> documentation, it sets the "Indentation for the content of a source >> code block. This should be the number of spaces added to the >> indentation of the #+begin line in order to compute the indentation of >> the block content after editing it with M-x org-edit-src-code. Has no >> effect if `org-src-preserve-indentation' is non-nil." I wonder if one >> can set it to be zero as an absolute value, meaning that if the a line >> of code in the source block starts at column n of the buffer, it is >> left at column n after M-q. >> >> Regarding the behavior you observe, as I said I get that too from time >> to time. In fact, doing M-q on my own example in a fresh Org mode >> buffer, I now get what you get: >> >> #+BEGIN_SRC f90 :results verbatim :exports both >> program main ! This is a very very very very very very very very very >> very very very very very very very long comment line. print *, "Hello, >> World!" end program main >> #+END_SRC >> >> I don't have any special settings for the f90 mode in my .emacs. In >> fact, I have observed the same behavior for other languages too when >> edited in an Org source block. The "destructive" nature of this >> behavior is very special (C-/ (undo) doesn't work). Many a times, I >> have tried refilling a line of comments and ended up with a huge mix >> of code and comment that was impossible to undo (at least to the best >> of my knowledge) and I had to either revert the change if I had the >> file under version control, go to an auto backup file, or painfully and >> manually separate the code and comments to get back the original code >> block. >> >> Omid >> >> >> On 02/05/2014 04:34 PM, Nick Dokos wrote: >>> Omid writes: >>> Hello, I am using Org-mode version 8.2.5g (8.2.5g-elpa) in GNU Emacs 24.3.1. I have two questions about the behavior of the fantastic Org mode+Babel with respect to code and comments: Here is a minimal example: #+BEGIN_SRC f90 :results verbatim :exports both program main ! This is a very very very very very very very very very very very very very very very very long comment line. print *, "Hello, World!" end program main #+END_SRC Below is the code snippet after M-q (fill-paragraph) on the comment line. The comment line has been refilled (intended behavior) but all lines have been indented. This may also be an intended behavior; but FIRST QUESTION: Is there a way to disable this indentation upon M-Q in Org Babel code snippets? >>> >>> Try setting org-edit-src-content-indentation to 0. I'm not sure that >>> it is going to work, but (based on rather flimsy numerological evidence, >>> namely that its default value is 2 as is the indent below) it might. >>> #+BEGIN_SRC f90 :results verbatim :exports both program main ! This is a very very very very very very very very very very very very ! very very very very long comment line. print *, "Hello, World!" end program main #+END_SRC >>> >>> BTW, I don't get this behavior but I don't use f90 mode, so I'm not sure >>> whether there is some setup I'm missing. I get (with >>> org-edit-src-content-indentation set to 0): >>> >>> #+BEGIN_SRC f90 :results verbatim :exports both >>> program main ! This is a very very very very very very very very very >>> very very very very very very very long comment line. print *, >>> "Hello, World!" end program main >>> #+END_SRC >>> >>> Nick >>> >>> >>> >> >> > > > -- > The Kafka Pandemic: http://thekafkapandemic.blogspot.com > > The disease DOES progress. MANY people have died from it. ANYBODY can get > it. > > Denmark: free Karina Hansen NOW. > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] [Babel] Bug reading example blocks?
hi thomas, is this still a bug? samuel On 11/22/13, Thomas S. Dye wrote: > Aloha all, > > Responding to a query by Gary Oberbrunner, I tried to point out the use > of example blocks to name arbitrary pieces of text. What I found is that > the example block isn't passed whole to a babel source block--whitespace > is removed from the first line. > > * Whitespace on first line of example block removed > > #+name: example > #+begin_example > 1. this is the first line > 2. this is the second line with %VARIANT% as the value > 3. this is the third line > #+end_example > > #+name: repeated-text > #+header: :var x="" > #+header: :var eg="" > #+begin_src emacs-lisp > (let ((result)) > (setf result (replace-regexp-in-string "%VARIANT%" x eg t)) > result) > #+end_src > > #+call: repeated-text(x="foo",eg=example) :results raw > > #+results: > 1. this is the first line > 2. this is the second line with foo as the value > 3. this is the third line > > This happens, AFAICT, regardless of the value of > org-src-preserve-indentation. > > Is there a reason for this? Or, is it a bug? Or, am I going about this > task in the wrong way? > > All the best, > Tom > -- > Thomas S. Dye > http://www.tsdye.com > > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
Re: [O] Behavior of Org mode Babel code snippets with respect to M-q (fill-paragraph) and C-/ (undo)
Undo not working is a bug. I think we identified the bug on the mailing list, but the fix was never implemented, although I think an attempted fix was. I think it has to do with editing a source code block trying to do things with undo or undo-boundary. The fix is probably to rip out all undo-related code there. On 2/5/14, Omid wrote: > Hello Nick, > > Thanks for your quick reply. The variable > org-edit-src-content-indentation does indeed have to do with the > indentation I was referring to. But it is relative. According to the > documentation, it sets the "Indentation for the content of a source > code block. This should be the number of spaces added to the > indentation of the #+begin line in order to compute the indentation of > the block content after editing it with M-x org-edit-src-code. Has no > effect if `org-src-preserve-indentation' is non-nil." I wonder if one > can set it to be zero as an absolute value, meaning that if the a line > of code in the source block starts at column n of the buffer, it is > left at column n after M-q. > > Regarding the behavior you observe, as I said I get that too from time > to time. In fact, doing M-q on my own example in a fresh Org mode > buffer, I now get what you get: > > #+BEGIN_SRC f90 :results verbatim :exports both > program main ! This is a very very very very very very very very very > very very very very very very very long comment line. print *, "Hello, > World!" end program main > #+END_SRC > > I don't have any special settings for the f90 mode in my .emacs. In > fact, I have observed the same behavior for other languages too when > edited in an Org source block. The "destructive" nature of this > behavior is very special (C-/ (undo) doesn't work). Many a times, I > have tried refilling a line of comments and ended up with a huge mix > of code and comment that was impossible to undo (at least to the best > of my knowledge) and I had to either revert the change if I had the > file under version control, go to an auto backup file, or painfully and > manually separate the code and comments to get back the original code > block. > > Omid > > > On 02/05/2014 04:34 PM, Nick Dokos wrote: >> Omid writes: >> >>> Hello, >>> >>> I am using Org-mode version 8.2.5g (8.2.5g-elpa) in GNU Emacs 24.3.1. >>> I have two questions about the behavior of the fantastic Org >>> mode+Babel with respect to code and comments: >>> >>> Here is a minimal example: >>> >>> #+BEGIN_SRC f90 :results verbatim :exports both >>> program main >>> ! This is a very very very very very very very very very very very very >>> very very very very long comment line. >>> print *, "Hello, World!" >>> end program main >>> #+END_SRC >>> >>> Below is the code snippet after M-q (fill-paragraph) on the comment >>> line. The comment line has been refilled (intended behavior) but all >>> lines have been indented. This may also be an intended behavior; but >>> >>> FIRST QUESTION: Is there a way to disable this indentation upon M-Q in >>> Org Babel code snippets? >>> >> >> Try setting org-edit-src-content-indentation to 0. I'm not sure that >> it is going to work, but (based on rather flimsy numerological evidence, >> namely that its default value is 2 as is the indent below) it might. >> >>> #+BEGIN_SRC f90 :results verbatim :exports both >>> program main >>> ! This is a very very very very very very very very very very very >>> very >>> ! very very very very long comment line. >>> print *, "Hello, World!" >>> end program main >>> #+END_SRC >>> >> >> BTW, I don't get this behavior but I don't use f90 mode, so I'm not sure >> whether there is some setup I'm missing. I get (with >> org-edit-src-content-indentation set to 0): >> >> #+BEGIN_SRC f90 :results verbatim :exports both >> program main ! This is a very very very very very very very very very >> very very very very very very very long comment line. print *, >> "Hello, World!" end program main >> #+END_SRC >> >> Nick >> >> >> > > -- The Kafka Pandemic: http://thekafkapandemic.blogspot.com The disease DOES progress. MANY people have died from it. ANYBODY can get it. Denmark: free Karina Hansen NOW.
[O] conditionally color/format heading
Hi all, is it possible to dynamically change the color / typeface of headings? I would be interested to have all my headings with :noexport: tag to be darker, for instance. Regards, Andreas
[O] bug#4249: CUA + shift-select-mode; org-mode and CUA
Version: 24.4 David Reitter wrote: > CUA mode and shift-select-mode don't seem to be aware of each other. > > If I turn on CUA first, and then shift-select-mode, shifted selection > fails (e.g. shift-right marks only one character as region). > > Emacs -Q > (cua-mode 1) > (setq shift-select-mode t) This is fixed in current trunk.
Re: [O] Emacs Mac Port
Alan Schmitt writes: >> If you are on a Mac, you *should* start using this: >> >> https://github.com/railwaycat/emacs-mac-port >> >> I've been having some serious issues with the vanilla Cocoa Emacs lately >> on Mavericks, including a nasty memory leak that would somehow trigger >> distnoted and put the CPU usage at 100% every hour or so. Interesting, because with the Emacs (from emacsforosx.com), I have been hitting 100% cpu problem again and again lately. I had tried out this port, but I hit 2 issues and put it aside: - with the same theme (solarized-dark), the background with the railwaycat port is darker! minor issue, of course. - gnus (when trying to access nntps servers with gnutls) gets stuck. I'll need to debug that, unless someone has a trick up their sleeve. I may just give it a try for my regular work, I run gnus in a different Emacs, so that can continue to run on the other port. Regards, -- Haider
Re: [O] Emacs Mac Port
@Bastien Yeah, this is one of my favorite features. Check it out: http://screencast.com/t/RVd0wfTJzVt On Thu, Feb 13, 2014 at 3:25 AM, Bastien wrote: > Hi Alan, > > Alan Schmitt writes: > > > - smooth scrolling; > > I'm curious about this one -- any screencast demonstrating > this? Any hint on what part of the Emacs display engine has > been improved to get this? > > Thanks, > > -- > Bastien >
Re: [O] copy title text string from #+TITLE field?
Hello, Nick Dokos writes: > Peter Salazar writes: > >> Thanks. I do need it only on export, but even so, it doesn't seem to be >> working: >> >> http://i.imgur.com/1tMGaHz.png >> >> Again, it's inside an HTML code block. Not sure if there's a way to make it >> work inside that block? >> > > I don't think so. The doc says "...which can be referenced in > paragraphs, verse blocks, table cells and some keywords". I'm not sure > why macro expansion is restricted like that. Maybe Nicolas will chime > in. Because macros are parsed objects. Org only parse objects in these environments. Regards, -- Nicolas Goaziou
Re: [O] Training on how to program Emacs
Ivan, You rock. I'm so glad to see someone offering paid training on Emacs! I hope you do well and are able to repeat the course. On Thu, Feb 13, 2014 at 06:17:53PM +0100, Ivan Kanis wrote: > Hello, > > I will give a 3 days training in Nantes on how to extend Emacs with > elisp. If there is interest I can talk also about org meta programming > with org babel. The training date is from June, 30 to July, 2. I will > speak in french (or English if everyone is comfortable with it). > > The maximum number of attendees will be six in order to have a convivial > atmosphere and that no-one feels left out. > > I feel that talking about coding is more fun while showing how to solve > concrete example. You are encouraged to bring material that you are > trying to solve. My goal is to show you how to make Emacs do what you > want it to do, while learning elisp programming. > > The training cost is 1,800 euros (tax included). If you are an employee > in a french company you can use your OPCA to pay for it. > > The following is the link to the web page outlining the training in > french : > > http://www.2i2l.fr/spip.php?article278 > > I have translated it in English : > > Presentation of the program: > > - open and use Emacs > - understand Emacs Lisp > - know where to find the documentation > > First steps: > > - master text editor basics (copy, paste, etc...) > - understand the structure of Lisp: code and data are the same > - understand variables: explanation of the difference between global an >lexical > - Understand the bases of Lisp: cdr, car and cons > > Program with Emacs Lisp: > > - master operation on number, strings and list > - master associative list > - master logical operator if and cond > - master looping such as while and dolist > - master functions > - know how debug: backtrace and edebug > > If you are interested in attending, please contact 2i2l at > +33 02 40 3702 06 or format...@2i2l.fr > > Take care, > > Ivan > > > > -- > To live is so startling it leaves little time for anything else. > -- Emily Dickinson > -- Russell Adamsrlad...@adamsinfoserv.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint:1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3
Re: [O] Documentation error/bug regarding checkboxes
Hello, Josiah Schwab writes: >> Actually I did it like this: >> >> + |foo >> + bar >> + baz >> >> If I do this instead, it works as you've said: >> >> |+ foo >> + bar >> + baz > > Ah, yes. I see now. I do not know if that's what is intended. Someone > who knows more about org internals will have to chime in. Yes, it is intended. The very first character in a list targets the whole list. This allows, for example, to move the whole list instead of an item. See `org-element-at-point' docstring for more information. Regards, -- Nicolas Goaziou
Re: [O] Using checkboxes: nested lists
On Thu, 13 Feb 2014 11:31:56 -0500, Charles Millar wrote : > This may be a solution for your purposes > > - [2/3] maintest >- [X] test2 >- [X] test3 >- [ ] test4 [1/2] > - [X] test4a > - [ ] test4b This works nicely - thanks.
[O] Training on how to program Emacs
Hello, I will give a 3 days training in Nantes on how to extend Emacs with elisp. If there is interest I can talk also about org meta programming with org babel. The training date is from June, 30 to July, 2. I will speak in french (or English if everyone is comfortable with it). The maximum number of attendees will be six in order to have a convivial atmosphere and that no-one feels left out. I feel that talking about coding is more fun while showing how to solve concrete example. You are encouraged to bring material that you are trying to solve. My goal is to show you how to make Emacs do what you want it to do, while learning elisp programming. The training cost is 1,800 euros (tax included). If you are an employee in a french company you can use your OPCA to pay for it. The following is the link to the web page outlining the training in french : http://www.2i2l.fr/spip.php?article278 I have translated it in English : Presentation of the program: - open and use Emacs - understand Emacs Lisp - know where to find the documentation First steps: - master text editor basics (copy, paste, etc...) - understand the structure of Lisp: code and data are the same - understand variables: explanation of the difference between global an lexical - Understand the bases of Lisp: cdr, car and cons Program with Emacs Lisp: - master operation on number, strings and list - master associative list - master logical operator if and cond - master looping such as while and dolist - master functions - know how debug: backtrace and edebug If you are interested in attending, please contact 2i2l at +33 02 40 3702 06 or format...@2i2l.fr Take care, Ivan -- To live is so startling it leaves little time for anything else. -- Emily Dickinson
Re: [O] Documentation error/bug regarding checkboxes
> Actually I did it like this: > > + |foo > + bar > + baz > > If I do this instead, it works as you've said: > > |+ foo > + bar > + baz Ah, yes. I see now. I do not know if that's what is intended. Someone who knows more about org internals will have to chime in. Josiah
Re: [O] value of cell/spreadsheet as property value?
El jue, 13 feb 2014, Michael Brand decía: > Hi OSiUX > > On Thu, Feb 13, 2014 at 3:29 PM, OSiUX wrote: > > {+; %5.2f} > > Try %7.2f yes, now it works fine, thank you! -- :: Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C http://www.osiux.com.ar http://www.altermundi.net signature.asc Description: Digital signature
Re: [O] Using checkboxes: nested lists
jone...@teksavvy.com wrote: - [2/2] maintest - [X] test2 - [X] test3 - [1/2] test4 - [X] test4a - [ ] test4b This may be a solution for your purposes - [2/3] maintest - [X] test2 - [X] test3 - [ ] test4 [1/2] - [X] test4a - [ ] test4b Charlie Millar --- This email is free from viruses and malware because avast! Antivirus protection is active. http://www.avast.com
Re: [O] Emacs Mac Port
> Marcelo de Moraes Serpa writes: > Hey guys, > If you are on a Mac, you *should* start using this: > https://github.com/railwaycat/emacs-mac-port +1 I swear by this port. A few other cool things it has: High resolution versions of tool bar icons and the splash screen image for Retina. - DictionaryService support You can look up a word under the mouse pointer in the selected window by typing Command-Control-D (or double/single-tapping a trackpad with three fingers on Mac OS X 10.7/10.8, resp.). * Pixel-based mouse wheel smooth scroll for newer mice/trackpads. * Gesture event handling for newer trackpads. By default, pinch out/in are bound to text size scaling. With the shift key, they turn on/off fullscreen status of the frame. + tons more The port is developed by YAMAMOTO Mitsuharu and his last announcement is at: https://lists.gnu.org/archive/html/emacs-devel/2013-12/msg00952.html Damon
Re: [O] Behavior of M-q on comments in code blocks
Hi Bastien, Bastien wrote: > Sebastien Vauban writes: > >> Though, I can't say whether the fact it does not work anymore is due to >> changes in Org or in my Emacs configuration. Any hint? > > Works fine here, surely something in your configuration. Fond the culprit: --8<---cut here---start->8--- ;; automatically fill comments (but not code) in programming modes (add-hook 'prog-mode-hook (lambda () (auto-fill-mode 1) (set (make-local-variable 'fill-nobreak-predicate) (lambda () (not (eq (get-text-property (point) 'face) 'font-lock-comment-face)) --8<---cut here---end--->8--- Weird. Best regards, Seb -- Sebastien Vauban
Re: [O] Emacs Mac Port
On Wed, Feb 12, 2014 at 09:26:42PM -0600, Marcelo de Moraes Serpa wrote: > Hey guys, > > If you are on a Mac, you *should* start using this: > > https://github.com/railwaycat/emacs-mac-port > > I've been having some serious issues with the vanilla Cocoa Emacs lately on > Mavericks, including a nasty memory leak that would somehow trigger distnoted > and put the CPU usage > at 100% every hour or so. > > Besides being quite stable, it has some nice usability improvements made > specifically to make Emacs integrate better with OSX. My orgmode experience > has been much better since > I started using it! > > Thought I'd share :) Wow! Thanks, Marcelo. If this is indeed the cause of the performance problems I've been seeing, this will save me many agonizing hours. I never suspected emacs in these problems, but I've certainly seen distnoted turn into a complete CPU hog. I have emacs running all the time, so if that's the cause, this will be a huge relief. Thanks! -pd -- Peter Davis The Tech Curmudgeon www.techcurmudgeon.com
Re: [O] value of cell/spreadsheet as property value?
Hi OSiUX On Thu, Feb 13, 2014 at 3:29 PM, OSiUX wrote: > {+; %5.2f} Try %7.2f Michael
Re: [O] value of cell/spreadsheet as property value?
El mar, 11 feb 2014, Bastien decía: > Hi Michael, > > Michael Brand writes: > > > Cool, thank you. I added a sentence in org.texi to point out the > > dependency on the format specifier. > > Thanks for this, thanks for the patch, but I do not work for me :-( - Org-mode version 8.2.5h (release_8.2.5h-631-g076b8e @ /home/osiris/data/dev/emacs-lisp/org-mode/lisp/) - GNU Emacs 23.4.1 (i486-pc-linux-gnu, GTK+ Version 2.24.10) of 2012-09-09 on murphy, modified by Debian Integers, ok: #+COLUMNS: %STATUS(Estado) %46ITEM(Descripción) %10COST(Estimado) %10CASH(Real){+; %5d} E | Descripción | Estimado | Real | | ** 2014-02 ||447 | | *** income || 1000 | ... | *** expenses|| -553 | | dinner || -110 | ... | party :-) || -400 | ... | lunch ||-43 | ... Decimals, bad align: #+COLUMNS: %STATUS(Estado) %46ITEM(Descripción) %10COST(Estimado) %10CASH(Real){+; %5.2f} E | Descripción | Estimado | Real | | ** 2014-02 || 447.00| | *** income || 1000.00 | ... | *** expenses|| -553.00 | | dinner || -110.00 | ... | party :-) || -400.00 | ... | lunch || -43.00| ... is there any way to debug this? thanks again! -- :: Osiris Alejandro Gomez (OSiUX) os...@osiux.com.ar DC44 95D2 0D5D D544 FC1A F00F B308 A671 9237 D36C http://www.osiux.com.ar http://www.altermundi.net signature.asc Description: Digital signature
Re: [O] Emacs Mac Port
Hi Alan, On 13 February 2014 13:07, Alan Schmitt wrote: > I don't know how to make a screencast ... Somewhat off-topic, but just use Quicktime Player: File > New Screen Recording. I like to recode the resulting file afterwards using Handbrake, reducing resolution (and stripping the sound track or even color where possible) allows quite tiny files with a good frame rate. Cheers, Bernd -- Senior Software Engineer Xaidat GmbH Wickenburggasse 5 8010 Graz Austria / Europe web: http://www.xaidat.com/ phone: +43-676-845023-706 email: bernd.h...@xaidat.com FN 384295s, LG ZRS Graz UID-Nr. ATU67414611
Re: [O] verbatim and apostrophes
Nick Dokos writes: > Alan Schmitt writes: > >> Hello Samuel, >> >> Samuel Wales writes: >> >>> org-emphasis-regexp-components >> >> Thank you for the suggestion. I'm trying to make sense of it: >> >> org-emphasis-regexp-components is a variable defined in `org.el'. >> Its value is (" ('\"{" "- .,:!?;'\")}\\" " >> ,\"'" "." 1) >> >> Documentation: >> Components used to build the regular expression for emphasis. >> This is a list with five entries. Terminology: In an emphasis string >> like " *strong word* ", we call the initial space PREMATCH, the final >> space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters >> and "trong wor" is the body. The different components in this variable >> specify what is allowed/forbidden in each part: >> >> pre Chars allowed as prematch. Beginning of line will be allowed >> too. >> post Chars allowed as postmatch. End of line will be allowed too. >> border The chars *forbidden* as border characters. >> body-regexp A regexp like "." to match a body character. Don't use >> non-shy groups here, and don't allow newline here. >> newline The maximum number of newlines allowed in an emphasis exp. >> >> You need to reload Org or to restart Emacs after customizing this. >> >> I see that "body-regexp" is "." so the problem is not from there. I also >> see that "'" is forbidden as a border character, which should be fine in >> my case as I'm using "~". So is the problem that "'" is both in prematch >> and postmatch? But in my case I use it as a body character. >> >> So I'm afraid I don't understand why the "'" in ~'a ref~ is not accepted >> as a body character, and what I should do to make sure it is. >> > > See if > > > http://article.gmane.org/gmane.emacs.orgmode/73036/match=org+emphasis+regexp+components > > can help make some sense out of the line noise (although it was > triggered by a different question). I believe the problem here is > the BORDER regexp (the one that goes > > " > ,\"'" > > above), not the BODY one: it forbids newlines, commas, double > and single quotes. Try deleting the single quote from it. Sorry - I need coffee. I read what you wrote and promptly forgot all of it. So ignore most of what I wrote. However, the part about the BORDER regexp is correct I believe: in ~'a ref~, the ~ are the MARKERS; ' and f are the BORDER and "a re" is the BODY. -- Nick
Re: [O] verbatim and apostrophes
Alan Schmitt writes: > Hello Samuel, > > Samuel Wales writes: > >> org-emphasis-regexp-components > > Thank you for the suggestion. I'm trying to make sense of it: > > org-emphasis-regexp-components is a variable defined in `org.el'. > Its value is (" ('\"{" "- .,:!?;'\")}\\" " > ,\"'" "." 1) > > Documentation: > Components used to build the regular expression for emphasis. > This is a list with five entries. Terminology: In an emphasis string > like " *strong word* ", we call the initial space PREMATCH, the final > space POSTMATCH, the stars MARKERS, "s" and "d" are BORDER characters > and "trong wor" is the body. The different components in this variable > specify what is allowed/forbidden in each part: > > pre Chars allowed as prematch. Beginning of line will be allowed > too. > post Chars allowed as postmatch. End of line will be allowed too. > border The chars *forbidden* as border characters. > body-regexp A regexp like "." to match a body character. Don't use > non-shy groups here, and don't allow newline here. > newline The maximum number of newlines allowed in an emphasis exp. > > You need to reload Org or to restart Emacs after customizing this. > > I see that "body-regexp" is "." so the problem is not from there. I also > see that "'" is forbidden as a border character, which should be fine in > my case as I'm using "~". So is the problem that "'" is both in prematch > and postmatch? But in my case I use it as a body character. > > So I'm afraid I don't understand why the "'" in ~'a ref~ is not accepted > as a body character, and what I should do to make sure it is. > See if http://article.gmane.org/gmane.emacs.orgmode/73036/match=org+emphasis+regexp+components can help make some sense out of the line noise (although it was triggered by a different question). I believe the problem here is the BORDER regexp (the one that goes " ,\"'" above), not the BODY one: it forbids newlines, commas, double and single quotes. Try deleting the single quote from it. -- Nick
Re: [O] copy title text string from #+TITLE field?
Peter Salazar writes: > Thanks. I do need it only on export, but even so, it doesn't seem to be > working: > > http://i.imgur.com/1tMGaHz.png > > Again, it's inside an HTML code block. Not sure if there's a way to make it > work inside that block? > I don't think so. The doc says "...which can be referenced in paragraphs, verse blocks, table cells and some keywords". I'm not sure why macro expansion is restricted like that. Maybe Nicolas will chime in. > #+BEGIN_HTML > ... > > {{{title}}} > > ... > #+END_HTML > >> {{{title}}} should do it. See >> >> (info "(org) Macro replacement") > > Actually, I'm not sure it will do: macro replacement takes place during > export, so it may or may not be enough, depending on what you really > want to do. > -- Nick
Re: [O] Emacs Mac Port
Hi Bastien, Bastien writes: > Alan Schmitt writes: > >> - smooth scrolling; > > I'm curious about this one -- any screencast demonstrating > this? Any hint on what part of the Emacs display engine has > been improved to get this? I don't know how to make a screencast ... but what I refer to is this in the feature list (https://github.com/railwaycat/emacs-mac-port/blob/master/README-mac): * Pixel-based mouse wheel smooth scroll for newer mice/trackpads. Searching for a bit, I think it's related to this code: https://github.com/railwaycat/emacs-mac-port/blob/4d82e17570bbae61bcea04d41a1148b3b4a57082/lisp/term/mac-win.el#L1863 Alan
Re: [O] taskjuggler - using gaplength or gapduration
Hi all frank writes: > One issue that I am having is regarding gaplength and gapduration for > tasks. Under the TJ3 syntax, the command would be > " depends !!PHII {gapduration 7w} ". > > I added gaplength and gapduration under ' Org Taskjuggler Valid Task > Attributes ' and added the following in my org-mode file: > > *** PSF > :PROPERTIES: > :Task_id: PSF > :depends: PHII > :gaplength: 7w > :duration: 10d > :END: > > The resulting export comes out: > depends !!PHII > duration 10d > gaplength 7w > > which is incorrect. What am I doing wrong. gaplength and gapduration need special treatment of the exporter. They need to be part of the depends statement. So it woll not work if you just add them as properties. The dependencies section in the comments of ox-taskjuggler.el has an example how this can be done: ;; * Training material ;; :PROPERTIES: ;; :task_id: training_material ;; :ORDERED: t ;; :END: ;; ** Markup Guidelines ;;:PROPERTIES: ;;:Effort: 2d ;;:END: ;; ** Workflow Guidelines ;;:PROPERTIES: ;;:Effort: 2d ;;:END: ;; * Presentation ;; :PROPERTIES: ;; :Effort: 2d ;; :BLOCKER: training_material { gapduration 1d } some_other_task ;; :END: Now, I haven't tested this in a long time and AFAIK this used to work. I don't know if it survived the port to the new exporter framework. I would recommend that you try the above mentioned method. From looking at the source code it seems that Nicolas implemented options on dependencies. Thanks Christian -- Christian Egli Swiss Library for the Blind, Visually Impaired and Print Disabled Grubenstrasse 12, CH-8045 Zürich, Switzerland
[O] Get a list of tasks completed today
Hello, To get a list of tasks which I've completed today, I guess we must have: --8<---cut here---start->8--- (setq org-log-done t) ; default --8<---cut here---end--->8--- I mean: I guess it's more dangerous to try and play with the "state changes" information stored in the LOGBOOK drawer as people can easily modify them (see `org-log-note-headings'). Under the above assumption, the request becomes: --8<---cut here---start->8--- (add-to-list 'org-agenda-custom-commands '("." "Completed today" ((todo "DONE|CANX" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notregexp "CLOSED: \\[2014-02-13")) (org-agenda-sorting-strategy '(priority-down)) t) --8<---cut here---end--->8--- ... for today. But how can I include today's date in a programmatic way (so that it continues to work tomorrow ;-))? Best regards, Seb -- Sebastien Vauban
Re: [O] [BUG] `org-agenda-sorting-strategy' does not work in `tags-todo'
Hi Bastien, Bastien wrote: > Sebastien Vauban writes: > >>> Calendar for today >>> 2013-09-12 Thu >>> 5 d ago TODO 1Buy dog food >>> 4 d ago TODO 2Check weekend hours at the gym >>> 3 d ago TODO 3Do jogging >>> Deadline TODO 4Mail package to Susan >> >> Anybody having a hint on this? > > That's because deadline-up/down is active in "agenda" agenda views, > not in tags view -- and "DEADLINE<=\"\"" ... is a tag search, > not an "agenda" agenda view. > > I know the answer cannot be 100% satisfying, but sorting by date > in this case would require to add a text property to each agenda > entry, and would be certainly too time consuming (not tested.) Though, not speaking of fundamental differences (such as: you have to write specific code to skip different types of entries), going the "agenda" agenda view approach is not (yet) satisfying. Let's consider the following ecm.org file: --8<---cut here---start->8--- * List of tasks ** TODO Pay electricity bill (before 18/02) DEADLINE: <2014-02-18 Tue -3d> ... but first wait for my pay of the first half of the month (15/02). ** TODO Renew newspaper subscription DEADLINE: <2014-02-19 Wed> ** TODO Subscribe to new gym club DEADLINE: <2014-03-01 Sat> My goal is to begin in March. ** TODO Make dentist appointment DEADLINE: <2014-04-01 Tue -60d> Call the dentist much time in advance, because she's got a very long waiting list. --8<---cut here---end--->8--- The 26-line "agenda" agenda view: --8<---cut here---start->8--- (add-to-list 'org-agenda-custom-commands `("x" "Future tasks (by due date) -- AGENDA VIEW" ((agenda "" ((org-agenda-overriding-header "This week") (org-agenda-skip-function '(my-skip-entry-unless-deadline-in-n-days-or-more 1)) (org-deadline-warning-days 7))) (agenda "" ((org-agenda-format-date "") (org-agenda-overriding-header "Following 3 weeks") (org-agenda-skip-function '(my-skip-entry-unless-deadline-in-n-days-or-more 7)) (org-deadline-warning-days 28 ((org-agenda-clockreport-mode nil) (org-agenda-format-date "") (org-agenda-span 'day) (org-agenda-sorting-strategy '(deadline-up)) (org-agenda-use-time-grid nil))) t) (defun my-skip-entry-unless-deadline-in-n-days-or-more (n) "Skip entries that have no deadline, or that have a deadline earlier than in N days." (let* ((dl (org-entry-get nil "DEADLINE"))) (if (or (not dl) (equal dl "") (org-time< dl (+ (org-time-today) (* n 86400 (progn (outline-next-heading) (point) --8<---cut here---end--->8--- displays: --8<---cut here---start->8--- This week: In 6 d TODO Renew newspaper subscription In 47 d TODO Make dentist appointment Following 3 weeks: In 16 d TODO Subscribe to new gym club In 47 d TODO Make dentist appointment --8<---cut here---end--->8--- This is wrong for 2 tasks: - "Make dentist appointment" (with a -60d "warning" specifier) appears in both "this week" and "following 3 weeks" lists, while it shouldn't appear at all, as its deadline doesn't fall within the search ranges. - "Pay electricity bill" (with a -3d "warning" specifier) doesn't appear in "this week" list, while it should. The 8-line "tags" agenda view: --8<---cut here---start->8--- (add-to-list 'org-agenda-custom-commands `("x" "Future tasks (by due date) -- TODO-TAGS VIEW" ((tags-todo "DEADLINE>\"<+0d>\"+DEADLINE<=\"<+7d>\"" ((org-agenda-overriding-header "This week"))) (tags-todo "DEADLINE>\"<+7d>\"+DEADLINE<=\"<+28d>\"" ((org-agenda-overriding-header "Following 3 weeks" ((org-agenda-skip-function '(org-agenda-skip-entry-if 'notdeadline)) (org-agenda-sorting-strategy '(deadline-up t) --8<---cut here---end--->8--- does output the right tasks: --8<---cut here---start->8--- This week: ecm: TODO Pay electricity bill (before 18/02) ecm: TODO Renew newspaper subscription Following 3 weeks: ecm: TODO Subscribe to new gym club --8<---cut here---end--->8--- Though the "d
Re: [O] Emacs Mac Port
Hi Alan, Alan Schmitt writes: > - smooth scrolling; I'm curious about this one -- any screencast demonstrating this? Any hint on what part of the Emacs display engine has been improved to get this? Thanks, -- Bastien
Re: [O] Emacs Mac Port
Marcelo de Moraes Serpa writes: > Hey guys, > > If you are on a Mac, you *should* start using this: > > https://github.com/railwaycat/emacs-mac-port > > I've been having some serious issues with the vanilla Cocoa Emacs lately > on Mavericks, including a nasty memory leak that would somehow trigger > distnoted and put the CPU usage at 100% every hour or so. > > Besides being quite stable, it has some nice usability improvements made > specifically to make Emacs integrate better with OSX. My orgmode > experience has been much better since I started using it! I second this. Things I really like are: - fast flyspell (I was having issues because of syntax highlighting in vanilla emacs); - several full screen modes (native OS X fullscreen, or just "take the whole screen with no menu bar" version, which I prefer); - smooth scrolling; - double tap with three fingers to get dictionary entries (OK, I admit it's a gimmick, but it's fun nonetheless). Alan