[O] Better inline image scrolling
Scrolling of inline images in org-mode is cumbersome, especially when you have several of it in sequence, on a small screen. For example when you are in a buffer after a image, not visible at the moment, and you scroll up with either the C-p or your mouse wheel, it get displayed entirely instead of bit by bit, from it's bottom to it's top. Could it be possible to display images as several lines, instead of a unique one, with insert-sliced-image (http://www.gnu.org/software/emacs/manual/html_node/elisp/Showing-Images.html) like emacs-ipython-notebook (https://github.com/tkf/emacs-ipython-notebook) do when (setq ein:slice-image t) is set?
Re: [O] Inline LaTeX formulae
On 2015-05-05, at 23:32, Titus von der Malsburg malsb...@posteo.de wrote: Thanks, Rasmus (and Marcin), replacing the $ by \( and \) works. I didn’t know about the parentheses notation. To my experience most Also, this: http://tex.stackexchange.com/questions/510 Best, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University
Re: [O] Better inline image scrolling
- Original Message - From: Brice Waegenire brice@gmail.com To: emacs-orgmode@gnu.org Sent: Tuesday, May 5, 2015 9:06:09 AM Subject: [O] Better inline image scrolling Scrolling of inline images in org-mode is cumbersome, especially when you have several of it in sequence, on a small screen. For example when you are in a buffer after a image, not visible at the moment, and you scroll up with either the C-p or your mouse wheel, it get displayed entirely instead of bit by bit, from it's bottom to it's top. Could it be possible to display images as several lines, instead of a unique one, with insert-sliced-image (http://www.gnu.org/software/emacs/manual/html_node/elisp/Showing-Images.html) like emacs-ipython-notebook (https://github.com/tkf/emacs-ipython-notebook) do when (setq ein:slice-image t) is set? I asked about this on emacs.stackexchange http://emacs.stackexchange.com/questions/10354/smooth-mouse-scroll-for-inline-images It seems there is no native support for this in emacs :-/ I've tried a a lot of scroll options with no success. Eventually I turned off inline images and set them to open in eye of gnome (as it's good with refreshing images upon changes on disk). '(org-file-apps (quote ((auto-mode . emacs) ... (\\.png\\' . eog \%s\ Making (displayed) inline images use multiple lines sounds like a great idea. -- Leo Ufimtsev | Intern Software Engineer @ Eclipse Team
Re: [O] [PATCH] org-timer.el: Use hh:mm:ss format instead of minutes
Thanks for help on this! Here is the last version of the patch taking into account all of your comments. 2015-05-01 10:47 GMT+02:00 Nicolas Goaziou m...@nicolasgoaziou.fr: Hello, Brice Waegenire brice@gmail.com writes: I have took in consideration all of your points, is it better now? The current patch doesn't overwrite the present behavior of org-set-timer it only add the possibility to use hh:mm:ss format. Thank you. Some comments follow in addition to Kyle's. From: Brice Waegeneire brice@gmail.com Date: Fri, 24 Apr 2015 14:18:45 +0200 Subject: [PATCH] org-timer.el: hh:mm:ss format for setting a timer * lisp/org-timer.el (org-timer-set-timer): Add support for hh:mm:ss format. * testing/lisp/test-org-timer.el (test-org-timer/set-timer): Add hh:mm:ss format in the test. Commit message is incomplete, i.e., you changed default value for `org-timer-default-timer'. --- lisp/org-timer.el | 23 --- testing/lisp/test-org-timer.el | 8 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 0593573..022125f 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -65,12 +65,12 @@ the value of the timer. :group 'org-time :type 'string) -(defcustom org-timer-default-timer 0 - The default timer when a timer is set. +(defcustom org-timer-default-timer 0 + The default timer when a timer is set, in minutes or hh:mm:ss format. When 0, the user is prompted for a value. :group 'org-time :version 24.1 - :type 'number) + :type 'string) Since you change default value, you need to update keywords: :version 25.1 :package-version '(Org . 8.3) + (and (listp opt) (not (null opt)) org-timer-default-timer) (and (consp opt) org-timer-default-timer) (read-from-minibuffer - How many minutes left? + How much time left? (minutes or h:mm:ss) (if (not (eq org-timer-default-timer 0)) - (number-to-string org-timer-default-timer)) + (eval org-timer-default-timer)) +(if (string-match ^[0-9]+$ minutes) + (setq minutes (concat minutes :00))) Nitpick: \\`[0-9]+\\' (if (not (string-match [0-9]+ minutes)) (org-timer-show-remaining-time) - (let* ((mins (string-to-number (match-string 0 minutes))) - (secs (* mins 60)) + (let* ((secs (org-timer-hms-to-secs (org-timer-fix-incomplete minutes))) let* - let Regards, -- Nicolas Goaziou From 07d871f2b82ab23e184305dd3e088eaf18e6a4f3 Mon Sep 17 00:00:00 2001 From: Brice Waegeneire brice@gmail.com Date: Fri, 24 Apr 2015 14:18:45 +0200 Subject: [PATCH] org-timer.el: hh:mm:ss format for setting a timer * lisp/org-timer.el (org-timer-set-timer): Add support for hh:mm:ss format. (org-timer-default-timer): Type changed from number to string. * testing/lisp/test-org-timer.el (test-org-timer/set-timer): Add hh:mm:ss format in the test. --- lisp/org-timer.el | 28 +++- testing/lisp/test-org-timer.el | 8 2 files changed, 23 insertions(+), 13 deletions(-) diff --git a/lisp/org-timer.el b/lisp/org-timer.el index 0593573..d92f7b9 100644 --- a/lisp/org-timer.el +++ b/lisp/org-timer.el @@ -65,12 +65,13 @@ the value of the timer. :group 'org-time :type 'string) -(defcustom org-timer-default-timer 0 - The default timer when a timer is set. +(defcustom org-timer-default-timer 0 + The default timer when a timer is set, in minutes or hh:mm:ss format. When 0, the user is prompted for a value. :group 'org-time - :version 24.1 - :type 'number) + :version 25.1 + :package-version '(Org . 8.3) + :type 'string) (defcustom org-timer-display 'mode-line When a timer is running, org-mode can display it in the mode @@ -402,14 +403,14 @@ VALUE can be `on', `off', or `pause'. ;;;###autoload (defun org-timer-set-timer (optional opt) - Prompt for a duration and set a timer. + Prompt for a duration in minutes or hh:mm:ss and set a timer. If `org-timer-default-timer' is not zero, suggest this value as the default duration for the timer. If a timer is already set, prompt the user if she wants to replace it. Called with a numeric prefix argument, use this numeric value as -the duration of the timer. +the duration of the timer in minutes. Called with a `C-u' prefix arguments, use `org-timer-default-timer' without prompting the user for a duration. @@ -430,16 +431,17 @@ using three `C-u' prefix arguments. effort-minutes (number-to-string effort-minutes)) (and (numberp opt) (number-to-string opt)) - (and (listp opt) (not (null opt)) - (number-to-string org-timer-default-timer)) + (and (consp opt) org-timer-default-timer) + (and (stringp opt) opt) (read-from-minibuffer - How many minutes left? -
Re: [O] [Orgmode] Unable to capture the file name generated using matplotlib
Obviously, I have the directory in place, and the file is actually saved properly in it. The version is use is: Org-mode version 8.2.10 (8.2.10-40-gc763fa-elpaplus @ /Users/drorata/.emacs.d/elpa/org-plus-contrib-20150504/) Finally, here is the output that I have in the python interactive session: ---8---8---8---8---8---8---8---8---8---8---8---8--- import matplotlib import matplotlib matplotlib.use('Agg') matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.pyplot as plt fig=plt.figure(figsize=(3,2)) fig=plt.figure(figsize=(3,2)) plt.plot([1,3,2]) plt.plot([1,3,2]) fig.tight_layout() fig.tight_layout() plt.savefig('images/myfig.png') plt.savefig('images/myfig.png') 'images/myfig.png' # return this to org-mode 'images/myfig.png' # return this to org-mode open('/var/folders/kz/1c2cxn1x60n_t5p2j1p02b18gn/T/babel-22151hFS/python-22151B4O', 'w').write(str(_)) open('/var/folders/kz/1c2cxn1x60n_t5p2j1p02b18gn/T/babel-22151hFS/python-22151B4O', 'w').write(str(_)) 'org_babel_python_eoe' 'org_babel_python_eoe' [matplotlib.lines.Line2D object at 0x10ebb6eb8] 'images/myfig.png' 16 'org_babel_python_eoe' ---8---8---8---8---8---8---8---8---8---8---8---8--- From this it seems like the right thing happens, but still org doesn't manage to capture it. I'm still in the dark. At work I manage to get the images inserted properly and it is simply fabulous! I want it also on my mac!!! :) Thanks in advance, Dror On Sat, May 2, 2015 at 7:11 PM, Nick Dokos ndo...@gmail.com wrote: Dror Atariah dror...@gmail.com writes: How can I solve this problem? I should have added: ... after I create the images directory. I don't think the savefig() can do that.
[O] Inline LaTeX formulae
Hi all, I just updated to the development version of org and encountered a problem with inline LaTeX formulae. I have the following test document: #+OPTIONS: toc:nil tex:t Test: ($p\ll.001$) Before the update the output used to be (export to PDF via pdflatex): Test: p⋘.001 (The symbold after the p is “much less than“, hope that comes out.) Now I get: Test: ($p⋘.001$) In the .tex file, it looks like this: Test: (\$p\(\ll\).001\$) Playing with the tex variable in the options doesn’t help: for tex:nil and tex:verbatim, I get the same output. Interestingly, when I remove the parentheses, it works again. Seems like a bug where inline LaTeX is not recognized when it occurs in parentheses. Is there a quick fix for that? Titus signature.asc Description: PGP signature
Re: [O] Inline LaTeX formulae
Titus von der Malsburg malsb...@posteo.de writes: Hi all, I just updated to the development version of org and encountered a problem with inline LaTeX formulae. I have the following test document: #+OPTIONS: toc:nil tex:t Test: ($p\ll.001$) Try: Test: (\(p\ll.001\)) ($x$) doesn't work. You could use $(x)$. Strangely org-highlight-latex-and-related still highlights it. —Rasmus -- Slowly unravels in a ball of yarn and the devil collects it
Re: [O] Inline LaTeX formulae
On 2015-05-05, at 22:14, Titus von der Malsburg malsb...@posteo.de wrote: Hi all, I just updated to the development version of org and encountered a problem with inline LaTeX formulae. I have the following test document: #+OPTIONS: toc:nil tex:t Test: ($p\ll.001$) Is there a quick fix for that? Does it help if you replace $...$ with \(...\)? Titus Hth, -- Marcin Borkowski http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski Faculty of Mathematics and Computer Science Adam Mickiewicz University
Re: [O] Converting a Dissertation Template from docx to .org to use for LaTeX
Thanks for those replies. I basically followed Ken's suggestion. I started with the Kings College London dissertation template and used writer2latex to create a .tex file. Then I gradually built the the Org-File. I have ended up with something I can use to write using org-mode with a nice Solarized-Dark theme instead of frying my eyeballs in LibreOffice. The key things are the Table of Contents are in the correct place and I have bibtex working the way I want. The other thing is in the end I have to convert from the .tex file to a .docx file using pandoc. So I'll have to do some minor edits in LibreOffice anyway because it is not saving certain formating features like double spacing. But that will be a two minute final editing job. So now I just have to write 500 words a day for the next 30 days and I'll have a first draft! ;) Regards, Paul On 4 May 2015 at 23:20, Ken Mankoff mank...@gmail.com wrote: Hi Paul, For this type of one-off project (a thesis), I'd suggest you a) remove all Org-generated LaTeX header, b) create your own LaTeX preamble that you \include{preamble} in your Org file, and then all of your questions become LaTeX questions, not Org questions. Those LaTeX questions are likely easily googlable (or bingable) and found on TeX.SE. At the top of your Org document you can embed all the LaTeX code you want to generate the custom title and signature pages required by your institution. Just my 2c. On 2015-05-04 at 11:58, Paul Harper harper.pau...@gmail.com wrote: I need some items to appear on a page of their own. (ie. Ethical Approval, Abstract, Declaration, Table of Contents.) How do I do that? \clearpage command in LaTeX. -k. -- Regards, Paul about.me/pauljamesharper GnuPG ID:0x058884CC Women and cats will do as they please, and men and dogs should relax and get used to the idea. Robert Heinlein
Re: [O] Inline LaTeX formulae
Rasums wrote: Titus von der Malsburg malsburg at posteo.de writes: Hi all, I just updated to the development version of org and encountered a problem with inline LaTeX formulae. I have the following test document: #+OPTIONS: toc:nil tex:t Test: ($p\ll.001$) Try: Test: (\(p\ll.001\)) ($x$) doesn't work. You could use $(x)$. Strangely org-highlight-latex-and-related still highlights it. –Rasmus Thanks, Rasmus (and Marcin), replacing the $ by \( and \) works. I didn’t know about the parentheses notation. To my experience most people use the $ notation for inline math, and therefore it would make sense to properly support that notation, too. Especially since it used to work in earlier versions of org (if I’m not mistaken) and there is nothing in the manual suggesting that it shouldn’t work. The contrary is the case. Quote from the manual: To avoid conflicts with currency specifications, single ‘$’ characters are only recognized as math delimiters if the enclosed text contains at most two line breaks, is directly attached to the ‘$’ characters with no whitespace in between, and if the closing ‘$’ is followed by whitespace, punctuation or a dash. Parentheses are punctuation, so the $ in my example should be interpreted as math delimiters. I think whoever wrote the code, simply overlooked parentheses when implementing the punctuation part. This should be fixed. Titus signature.asc Description: PGP signature