[O] bug#18785: 24.4.1; Emacs hangs with Org mode when point is in LOGBOOK

2015-12-26 Thread Lars Ingebrigtsen
Eli Zaretskii  writes:

>> From: Glenn Morris 
>> Cc: Sebastien Vauban ,  18...@debbugs.gnu.org
>> Date: Wed, 26 Nov 2014 11:53:03 -0500
>> 
>> Eli Zaretskii wrote:
>> 
>> >> "sp-show--pair-function" (0x88f14c)
>> [...]
>> > Maybe.  This backtrace looks very different from the last one.
>> 
>> It indeed appears to be from smartparens, which is not part of Emacs.
>
> Perhaps that package is the one that infloops, and the fact that it
> happens on a closing bracket character seems to point that way.

Assuming this is a problem in smartparens, I'm closing this bug report
in the Emacs bug tracker.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





[O] Changing org-block background with org-src-fontify-natively

2015-12-26 Thread Karl Voit
Hi!

,[ my current settings for org-block ]
| (defface org-block
|   ;; defface org-block-background was removed from org:
|   ;;
http://emacs.stackexchange.com/questions/14824/org-block-background-font-not-having-effect
|   '((t (:background "#00")))
|   "Face used for the source block background.")
|
| (setq org-src-fontify-natively t)
`

With this, I get the #00 background for blocks like example,
quote, and src. If I do specify a src type like "sh", I guess that
org-src-fontify-natively overrides my setting. At least I get the
effect that with a given src type, the background is not #00 but
the pre-defined background of my theme (wombat).

So, is there a way to modify (only) the background colour also for
source blocks with a given type and active org-src-fontify-natively?

Thanks!

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] [PATCH] ob-sql: Don't print out the command

2015-12-26 Thread Nicolas Goaziou
Hello,

Sacha Chua  writes:

> * lisp/ob-sql.el (org-babel-execute:sql): Don't print out the command
>   in the echo area, since it could be very long.

Applied. Thank you.


Regards,

-- 
Nicolas Goaziou



[O] bug#17651: 24.3.91; Emacs hangs in Org

2015-12-26 Thread Lars Ingebrigtsen
Glenn Morris  writes:

> Sebastien Vauban wrote:
>
>> Emacs 24.3.91.1 (of 2014-05-12) regularly hangs with Org-mode version
>> 8.2.6 (release_8.2.6-1010-g1ca86f).
>
> Well I guess this is an Org bug, which will get more attention on the
> Org list.
>
> (See eg http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17484)

Ok; closing this in the Emacs bug tracker.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Re: [O] [PATCH] Implement RSS_FEED_URL option keyword

2015-12-26 Thread Arun Isaac

> Although it is not strictly necessary for applying patches to contrib
> libraries, did you sign FSF papers already? It can matter if we consider
> moving this library into core some day.

I have initiated the process. I will get back to you once it is
complete.



signature.asc
Description: PGP signature


Re: [O] blog refurbised: how is it in 2015 ?

2015-12-26 Thread joakim
Xavier Maillard  writes:

> Hey,
>
> in the same vein I am refurbishing my Gnus (and love it), I'd like, as a 2k16
> resolution (right word in english ?), to restart my long abandoned blog. As
> usual, this is something I can't imagine doing outside GNU emacs and thus
> orgmode.
>
> My question is simply: what are the tools/technics in 2015 to blog ? Can you
> share some good recipes with me ?
>
> Thank you

I use "oblog"  which can render an org file to a blog.
My "oblog" is here, http://www.verona.se, if you are interested in how
it looks in practice.

>
> -- Xavier.
>

-- 
Joakim Verona




Re: [O] bug#17749: 24.3.91; Crash on mwheel-scroll of org file

2015-12-26 Thread Lars Ingebrigtsen
Eli Zaretskii  writes:

> No, sorry.  I really need to reproduce this on my machine and run
> Emacs under a debugger to see what happens and why.
>
> Please try to come up with a recipe starting from "emacs -Q".  It is
> OK to include customizations and loading of optional packages, but
> please try to find the minimal set of those, as too many of them
> complicate debugging.

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] [PATCH] Implement RSS_FEED_URL option keyword

2015-12-26 Thread Nicolas Goaziou
Hello,

Arun Isaac  writes:

> I have implemented a new option keyword, RSS_FEED_URL, for the RSS
> exporter backend.
>
> The RSS_FEED_URL goes into the atom:link element that identifies the
> feed's own URL.
>
> http://www.rssboard.org/rss-profile#namespace-elements-atom-link
>
> Currently, the feed URL is assumed to be html-link-home or
> publishing-directory concatenated with the output filename of the
> feed. This need not necessarily be so. So, the RSS_FEED_URL option
> keyword is introduced to let the user customize the feed URL.
>
> Please review the patch and consider for inclusion.

Thank you for the patch.

Although it is not strictly necessary for applying patches to contrib
libraries, did you sign FSF papers already? It can matter if we consider
moving this library into core some day.


Regards,

-- 
Nicolas Goaziou



[O] [RFC] Change \[..\] and $$...$$ into elements

2015-12-26 Thread Nicolas Goaziou
Hello,

The following patch changes status for \[..\] and $$...$$ from objects
to elements.

There are two consequences to this :

  1. \[...\] and $$...$$ are not filled anymore with M-q.

  2. \[...\] and $$...$$ cannot be inlined, i.e, they must start at the
 beginning of a line.

In particular, the second point may introduce incompatibilities with
previous Org revisions since, e.g.,

  Text \[...\] and so on...

is not recognized anymore as a LaTeX object.

Also, I'm not keen on allowing both inline and block state for the same
syntax, as it would create create a precedent.

This patch is missing documentation updates and an ORG-NEWS entry.


Feedback is welcome.


Regards,

-- 
Nicolas Goaziou0x80A93738
>From 946eb109ac581fc25a67af4c57afb35a09d25c18 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Sat, 9 May 2015 11:29:48 +0200
Subject: [PATCH] Make \[...\] and $$...$$ elements instead of objects

* lisp/org-element.el (org-element--set-regexps): Update regexp.
(org-element--latex-begin-environment):
(org-element--latex-end-environment): Remove variable.  Change it into
a function.
(org-element-latex-environment-parser):
(org-element-paragraph-parser): Use function.
(org-element-latex-fragment-parser): Remove \[...\] and $$...$$
constructs.

* lisp/org.el (org-latex-regexps):
* lisp/ox-latex.el (org-latex--wrap-latex-math-block): Propagate
  changes.

* testing/lisp/test-org-element.el (test-org-element/latex-environment-parser):
  Add a test.
(test-org-element/latex-fragment-parser): Update test.

With this change \[...\] and $$...$$ are considered elements and cannot
be inlined anymore.  As a consequence, they will not be filled anymore
but will stop paragraphs.
---
 lisp/org-element.el  | 58 +++-
 lisp/org.el  |  4 +--
 lisp/ox-latex.el |  2 +-
 testing/lisp/test-org-element.el | 27 ++-
 4 files changed, 50 insertions(+), 41 deletions(-)

diff --git a/lisp/org-element.el b/lisp/org-element.el
index d6695c8..24ca339 100644
--- a/lisp/org-element.el
+++ b/lisp/org-element.el
@@ -173,7 +173,7 @@ specially in `org-element--object-lex'.")
 		;; Horizontal rules.
 		"-\\{5,\\}[ \t]*$" "\\|"
 		;; LaTeX environments.
-		"begin{\\([A-Za-z0-9*]+\\)}" "\\|"
+		"\\(begin{\\([A-Za-z0-9*]+\\)}\\|\\[\\|\\$\\$\\)" "\\|"
 		;; Clock lines.
 		(regexp-quote org-clock-string) "\\|"
 		;; Lists.
@@ -216,7 +216,7 @@ specially in `org-element--object-lex'.")
 		  ;; Objects starting with "$": latex fragment.
 		  "\\$"
 		  ;; Objects starting with "\": line break,
-		  ;; entity, latex fragment.
+		  ;; entity.
 		  "\\(?:[a-zA-Z[(]\\|[ \t]*$\\|_ +\\)"
 		  ;; Objects starting with raw text: inline Babel
 		  ;; source block, inline Babel call.
@@ -2112,16 +2112,19 @@ containing `:key', `:value', `:begin', `:end', `:post-blank' and
  Latex Environment
 
 (defconst org-element--latex-begin-environment
-  "^[ \t]*begin{\\([A-Za-z0-9*]+\\)}"
+  "^[ \t]*\\(\\(?:begin{[A-Za-z0-9*]+}\\|\\[\\)\\|\\$\\$\\)"
   "Regexp matching the beginning of a LaTeX environment.
-The environment is captured by the first group.
-
-See also `org-element--latex-end-environment'.")
-
-(defconst org-element--latex-end-environment
-  "end{%s}[ \t]*$"
-  "Format string matching the ending of a LaTeX environment.
-See also `org-element--latex-begin-environment'.")
+The environment is captured by the first group.  See also
+`org-element--latex-end-environment'.")
+
+(defun org-element--latex-end-environment (environment)
+  "Build regexp matching the end of a LaTeX environment.
+See also `org-element--latex-begin-environment'."
+  (concat (pcase environment
+	("$$" "\\$\\$")
+	("\\[" "\\]")
+	(e (format "end{%s}" (regexp-quote (substring e 7 -1)
+	  "[ \t]*$"))
 
 (defun org-element-latex-environment-parser (limit affiliated)
   "Parse a LaTeX environment.
@@ -2140,9 +2143,8 @@ Assume point is at the beginning of the latex environment."
 (let ((case-fold-search t)
 	  (code-begin (point)))
   (looking-at org-element--latex-begin-environment)
-  (if (not (re-search-forward (format org-element--latex-end-environment
-	  (regexp-quote (match-string 1)))
-  limit t))
+  (if (not (re-search-forward
+		(org-element--latex-end-environment (match-string 1)) limit t))
 	  ;; Incomplete latex environment: parse it as a paragraph.
 	  (org-element-paragraph-parser limit affiliated)
 	(let* ((code-end (progn (forward-line) (point)))
@@ -2242,8 +2244,7 @@ Assume point is at the beginning of the paragraph."
 		   ((looking-at org-element--latex-begin-environment)
 			(save-excursion
 			  (re-search-forward
-			   (format org-element--latex-end-environment
-   (regexp-quote (match-string 1)))
+			   (org-element--latex-end-environment (match-string 1))
 			   limit t)))
 

[O] bug#17651: 24.3.91; Emacs hangs in Org

2015-12-26 Thread Lars Ingebrigtsen
Lars Ingebrigtsen  writes:

> Glenn Morris  writes:
>
>> Sebastien Vauban wrote:
>>
>>> Emacs 24.3.91.1 (of 2014-05-12) regularly hangs with Org-mode version
>>> 8.2.6 (release_8.2.6-1010-g1ca86f).
>>
>> Well I guess this is an Org bug, which will get more attention on the
>> Org list.
>>
>> (See eg http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17484)
>
> Ok; closing this in the Emacs bug tracker.

Er, or perhaps not, since the org bug tracker is the Emacs bug tracker...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





Re: [O] Publishing images to various sizes

2015-12-26 Thread John Kitchin
This isn't quite what you want but it is close. It is some code I hacked
a while ago to convert pdf files to png files for html export. You can
probably adapt this to get the sizes that you want by modifying the
shell command.

(defun my-link-format (link contents info)
  (let ((type (org-element-property :type link))
(path (org-element-property :path link)))
(cond
 ((and
   (string= type "file")
   (string-match "\.pdf" path))
  (shell-command
   (format
"convert %s %s"
path
(replace-regexp-in-string "\.pdf" ".png" path)))
  (format "" (replace-regexp-in-string "\.pdf" ".png" 
path)))
 ;; anything else, we just do the regular thing
 (t
  (org-html-link link contents info)

(org-export-define-derived-backend 'my-html 'html
  :translate-alist '((link . my-link-format)))


(browse-url (org-export-to-file 'my-html "custom-link.html"))


Arun Isaac writes:

> Hi,
>
> Is there some package that provides a publishing function I can use to
> automatically publish images to various sizes? Probably something that
> wraps around imagemagick's 'convert' command?
>
> When I publish images to my website, I want them to be available in
> various sizes, so that I can choose the appropriate image for the
> context in which it appears, and thus optimize bandwidth usage.
>
> Thanks,
> Arun Isaac.

--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu



Re: [O] Changing org-block background with org-src-fontify-natively

2015-12-26 Thread Karl Voit
* Karl Voit  wrote:
>
> So, is there a way to modify (only) the background colour also for
> source blocks with a given type and active org-src-fontify-natively?

Addendum:

https://stackoverflow.com/a/30139612 shows my situation whereas the
setup of John Kitchin https://www.youtube.com/watch?v=N7AaKHRd9uw
seems to have solved my issue: org-src-fontify-natively combined
with a different background colour.

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




[O] Working with in-line src and fill-mode/running into new line

2015-12-26 Thread John Hendy
Greetings,


I don't use in-line code too often, but did recently and often found
myself undoing line wrapping since the code would spill into a new
line, failing to be recognized by C-c C-c. Here's an example (I have
fill-mode set to 90 characters):

#+begin_example

* in-line src

#+begin_src R :session r :exports none :results silent

ave <- mean(5, 7.5, 8, 9)
x <- 20 * 2
y <- 40 * 2
vol <- x + y

#+end_src

Based on data from John Doe (Sourcing), average yearly consumption is
src_R[:session
r]{round(1e-6 * vol * (ave - 2), 2) } {{{results(=3.6=)}}} MM lbs.

#+end_example

I was writing up a summary of some material usage at work and it was a
handy opportunity to use inline code in case my source data changed.
As is, the inline code block won't update the results since it's split
into two lines ("C-c C-c can do nothing useful at this location"). I'd
have to go to the end of the first paragraph's line, insert a space,
delete until the second line joined, and then do C-c C-c.

I'm guessing folks are already aware of this, so this post is two-fold:

- what are ways to work around this? I only created the full block
since having the values and mean() function added even more code to
the line. Are others doing the same, applying some fill-mode setting,
just dealing with it?

- could the behavior be modified? I would think this could be similar
to \( \) LaTeX formatting. When I used to run into issues with
$formula$ over new lines, I adopted using \( \), which works great no
matter how long the contents are. Could Org know to interpret
everything that follows =src_lang{= as code, perhaps inserting spaces
for any newlines encountered?


Thanks,
John



Re: [O] Changing org-block background with org-src-fontify-natively

2015-12-26 Thread Xebar Saram
Hi all

so i have zero technical skills or knowledge, but i have been looking for a
way to have a different background in org-src blocks so that bash
backgrounds will have a black color, lisp a white color etc.
from what i understand (but i may be totally off here) Karl, thats what
your trying to achieve? did you succeed in that?
does any one have this working in his config and willing to share?

thx!

Z

On Sat, Dec 26, 2015 at 11:17 PM, Karl Voit  wrote:

> * Karl Voit  wrote:
> >
> > So, is there a way to modify (only) the background colour also for
> > source blocks with a given type and active org-src-fontify-natively?
>
> Addendum:
>
> https://stackoverflow.com/a/30139612 shows my situation whereas the
> setup of John Kitchin https://www.youtube.com/watch?v=N7AaKHRd9uw
> seems to have solved my issue: org-src-fontify-natively combined
> with a different background colour.
>
> --
> mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
>> get Memacs from https://github.com/novoid/Memacs <
>
> https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on
> github
>
>
>


Re: [O] Publishing images to various sizes

2015-12-26 Thread Arun Isaac

John Kitchin  writes:
> (defun my-link-format (link contents info)
>   (let ((type (org-element-property :type link))
> (path (org-element-property :path link)))
> (cond
>  ((and
>(string= type "file")
>(string-match "\.pdf" path))
>   (shell-command
>(format
> "convert %s %s"
> path
> (replace-regexp-in-string "\.pdf" ".png" path)))
>   (format "" (replace-regexp-in-string "\.pdf" ".png" 
> path)))
>  ;; anything else, we just do the regular thing
>  (t
>   (org-html-link link contents info)
>
> (org-export-define-derived-backend 'my-html 'html
>   :translate-alist '((link . my-link-format)))
>
> (browse-url (org-export-to-file 'my-html "custom-link.html"))

Thank you. I'll adapt this to my needs.

Regards,
Arun Isaac