Re: [O] orgmode.org is down?

2015-11-29 Thread Robert Klein
Hi,

Bastien apparently already restarted it.

Thanks a lot, Bastien!

Best regards
Robert


On 11/29/2015 01:40 AM, Ishikawa Takaaki wrote:
> Dear Bastien and all,
> 
> @rafiks  reported me the official website is
> down now.
> Port 22 is open, but 80 is filtered.
> Please restart httpd :-)
> 
> 
> Best,
> Takaaki
> 
> --
> tak...@ieee.org 



Re: [O] TOC local for specified heading and its subheadings (in HTML export)?

2015-11-29 Thread Nicolas Goaziou
Hello,

Rasmus  writes:

> Further, IMO it might be better to extend the ’#+toc: headlines local’
> declaration.  Of course you could argue that ’local’ becomes a special
> case of the above "id:whatever-is-the-name-of-the-local-headline".
>
> Personally, I would like a more explicit syntax, though I recognize that
> it doesn’t necessarily make a difference if it’s an extension, in the
> sense of suffixing.  E.g.:
>
> #+toc: headlines local 1 :headline "* my headline"
> #+toc: headlines local 1 :headline "#headline"
>
> Or closer to your suggestion,
>
>#+toc: headlines 1 :headline "#headline"
>#+toc: headlines 1 :headline local
>
> Which as a special case can be written as,
>
>   #+toc: headlines 1 local

I agree. However, I suggest to ignore quotes:

  #+toc: headlines 1 :headline #headline

or 

  #+toc: headlines 1 :target #headline

since TOC keywords always refer to headlines.

Using quotes may also be supported for destinations containing spaces.

>> +(org-html-toc depth info
>> +  (or
>> +   (and local-id
>> +(car (org-element-map (plist-get info 
>> :parse-tree)
>> + 'headline
>> +   (lambda (element)
>> + (and (string= (org-element-property 
>> :CUSTOM_ID element) local-id)
>> +  element)
>
> Wouldn’t it better to use org-link-search and get the element at
> point?

Or even work at the parse tree level and use
`org-export-resolve-id-link' and `org-export-resolve-fuzzy-link'.


Regards,

-- 
Nicolas Goaziou



Re: [O] :completion function isn't run anymore?

2015-11-29 Thread Nicolas Goaziou
Hello,

Julien Cubizolles  writes:

> Julien Cubizolles  writes:
>
>> I noticed that the :preparation-function defined in
>> org-publish-project-alist isn't run anymore when publishing a project.
>
> It seems the preparation-function isn't run either. Consider the
> following more simple examples
>
>
> #+TITLE: Hello
> #+begin_src emacs-lisp :tangle none :exports none
>   (setq org-export-in-background nil)
>   (defun jc-preparation ()
>   "Preparation functions to be run before actually pubishing"
>   (setq org-latex-title-command "")
>   )
>   (setq org-publish-project-alist
>   `(("pdf"
>:base-directory "./"
>:publishing-directory "./"
>:preparation-function jc-preparation
>:publishing-function org-beamer-publish-to-pdf
>:exclude ".*"
>:include ,(list (file-name-nondirectory buffer-file-name))
>)
>   ))
> #+end_src
>
> #+RESULTS:
> | pdf | :base-directory | ./ | :publishing-directory | ./ | 
> :preparation-function | jc-preparation | :publishing-function | 
> org-beamer-publish-to-pdf | :exclude | .* | :include | (test.org) |
>
> * 1st section
> ** 1st subsection
> ** 2nd subsection
>
> Save the to test.org and publish using the "pdf"
> project. org-beamer-publish-to-pdf creates test.pdf as it should but the
> preparation-function should remove the titlepage wich it doesn't.

I didn't investigate much the issue yet, but, out of curiosity, would
the following patch solve the issue:


Regards,

-- 
Nicolas Goaziou
>From 28dc2a08846992f0565897ae8e061da685cd776d Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Sun, 29 Nov 2015 14:16:37 +0100
Subject: [PATCH] ox-publish.el: Fix :preparation-function and
 :completion-function

* lisp/ox-publish.el (org-publish-projects): Do not use `run-hooks' in
  a lexical binding environment.

Reported-by: Julien Cubizolles 

---
 lisp/ox-publish.el | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 90f307c..6c65e52 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -667,9 +667,7 @@ If `:auto-sitemap' is set, publish the sitemap too.  If
 `:makeindex' is set, also produce a file \"theindex.org\"."
   (dolist (project (org-publish-expand-projects projects))
 (let ((project-plist (cdr project)))
-  (let ((preparation-function
-	 (plist-get project-plist :preparation-function)))
-	(when preparation-function (run-hooks 'preparation-function)))
+  (mapc #'funcall (plist-get project-plist :preparation-function))
   ;; Each project uses its own cache file.
   (org-publish-initialize-cache (car project))
   (when  (plist-get project-plist :auto-sitemap)
@@ -701,9 +699,7 @@ If `:auto-sitemap' is set, publish the sitemap too.  If
 	  (org-publish-index-generate-theindex
 	   project (plist-get project-plist :base-directory))
 	  (org-publish-file theindex project t)))
-  (let ((completion-function
-	 (plist-get project-plist :completion-function)))
-	(when completion-function (run-hooks 'completion-function)))
+  (mapc #'funcall (plist-get project-plist :completion-function))
   (org-publish-write-cache-file
 
 (defun org-publish-org-sitemap (project &optional sitemap-filename)
-- 
2.6.2



Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2

2015-11-29 Thread Steve Moreau
Hi,

First, I have been struggling with git since I have no methodology, and I
got lost several times.
But I converged anyway and, as far as I understand, the issue here should
have been introduced in the following commit:

Revision: f3955d5367bd44e98824e3a5bd4b36e06483f4c2
Author: Nicolas Goaziou 
Date: 2013-06-02 11:12:02 AM
Message:
org.el: Slight change to filling mechanism

* lisp/org.el (org-setup-filling): Set `paragraph-start' and
  `paragraph-separate'.
(org-fill-paragraph-separate-nobreak-p): Remove function.
(org-mode): Do not set `paragraph-start'.

Modified: lisp/org.el


Indeed, the org-setup-filling was concerned.

*Before:*

  (append fill-nobreak-predicate
  '(org-fill-paragraph-separate-nobreak-p
...

(defvar org-element-paragraph-separate) ; org-element.el
(defun org-fill-paragraph-separate-nobreak-p ()
  "Non-nil when a new line at point would end current paragraph."
  (looking-at (substring org-element-paragraph-separate 1)))

*After:*

'org-fill-paragraph-separate-nobreak-p' predicate removed and the previous
function has been deleted

The following code has been added:

  (let ((paragraph-ending (substring org-element-paragraph-separate 1)))
(org-set-local 'paragraph-start paragraph-ending)
(org-set-local 'paragraph-separate paragraph-ending))


Could someone explain to me why the function has been removed?
Thanks a lot for the great job on this wonderful org-mode.
Have a nice day,

Steve




2015-11-28 18:15 GMT+01:00 Steve Moreau :

> To anyone interested in tracking this behavior, here's what I can say for
> now.
>
> Filling list in the given example changes* from tag 'release_8.0.7' to
> tag 'release_8.1'*.
>
> I keep you updated. Have a nice day,
>
> 2015-11-27 19:15 GMT+01:00 John Hendy :
>
>> Whoops! I swore when I tested that it filled the lists, but you're
>> right! Hmm. Just sent a follow-up to the list clarifying that this did
>> *not* work, as well as including a link where it turns out I actually
>> asked the same thing some 2 years ago! Hope someone chimes in to help
>> you out. I definitely would like to use something like this, as when I
>> edit lists in my work reports/presentations, I mess up the nicely
>> filled original wrapping behavior and I'd like to tidy it back up.
>>
>>
>> John
>>
>> On Fri, Nov 27, 2015 at 11:54 AM, Steve Moreau 
>> wrote:
>> > Hi John,
>> >
>> > Thanks for your answer.
>> > You made me discover the auto-fill hook and it works fine both in
>> paragraphs
>> > and list whatever the number of nested level (list entries).
>> > But, if I select all the block and run fill-region (let say after a
>> > copy/paste), only the paragraphs are properly filled in my case.
>> > I guess it's worth getting a deeper look at the source code. Keep you
>> > updated.
>> >
>> >
>> >
>> > 2015-11-27 18:32 GMT+01:00 John Hendy :
>> >>
>> >> On Fri, Nov 27, 2015 at 10:56 AM, Steve Moreau 
>> >> wrote:
>> >> > Hi,
>> >> >
>> >> > Moving from old org-mode versions (6.33 or 7.9.3f-17-g7524ef) to the
>> >> > latest
>> >> > stable one currently (8.3.2), I noticed two changes which made me
>> out of
>> >> > my
>> >> > comfort zone.
>> >> >
>> >> > Demoting/promoting a header now changes the indentation of text
>> below.
>> >> > I reverted to the previous mode with '(setf org-adapt-indentation
>> nil)'
>> >> > in
>> >> > ~/.emacs, and that's fine but I mentioned it in case it has an
>> impact on
>> >> > point#2.
>> >> >
>> >> > 'M-x fill-region' does not fill custom lists as before. In the
>> previous
>> >> > version, I could select and fill several mixed paragraphs/lists
>> >> > directly.
>> >> > For example, filling the following block (without --- separator
>> added as
>> >> > a
>> >> > delimiter in this message)
>> >> > ---
>> >> > # a very long
>> >> > comment
>> >> >
>> >> > a long sentence
>> that
>> >> > should be filled over 2 lines
>> >> >
>> >> > - a looong item that should be filled
>> >> > over 2
>> >> > lines
>> >> >
>> >> >   - a looong item that should be
>> filled
>> >> > over
>> >> > 2 lines
>> >> >
>> >> > a long sentence
>> that
>> >> > should be filled over 2 lines
>> >>
>> >> [snip]
>> >>
>> >> > Lists are not filled anymore and I have to select each list entry and
>> >> > fill
>> >> > it individually to get the same output.
>> >> >
>> >> > So my questions are:
>> >> >
>> >> > Is there any simple way to revert to the previous mode with a
>> variable?
>> >> > Else, could you explain briefly where I should look if I want to
>> >> > understand
>> >> > why the filling is skipped in this case, and eventually change it if
>> I
>> >> > cannot change my mind and adapt to this different behavior? I had a
>> look
>> >> > at
>> >> > function (org.el:23249 org-setup-filling) but I am not sure this is

Re: [O] Org campture recursively expands %-escapes

2015-11-29 Thread Nicolas Goaziou
>> i think i understand.  maybe we need another way to pass %i.
>
> I guess we could restict "%()" evaluation to the Sexp defined in the
> initial template.

I committed a patch along those lines in master. Please let me know if
anything goes wrong with capture templates.



Re: [O] [PATCH] Re: Problems with org publish cache checking

2015-11-29 Thread Nicolas Goaziou
Matt Lundin  writes:

> Yes, that's a great idea. I've added it to the patch.

Thank you. LGTM.

> One caveat: this patch does not implement recursive checking of included
> files (i.e., included files that include other files), but this could be
> added in the future.

Well, if you're not out of steam (or time) yet, it would be nice to add
this bugfix in the same patch instead.

Of course, the current patch is already a great step forward.

WDYT?

Regards,



Re: [O] org-info.js not displaying document?

2015-11-29 Thread Greg Minshall
Matthew,

> Why not diff-ing the 2 html files, the one produced with your settings
> and the other one produced with -Q ? This may give you a pointer.

thanks, that helps a lot.  this *does* seem to be an org-mode bug
(modulo my brain functioning).

the actual thing that seems to break things is running the current git
version of org-mode.  if i revert to 8.2.10 (that came with emacs
24.5.2), and *really* move my local org out of the way, things work
well.  (this is effectively what -Q was doing for me.)

a diff of the two html files shows a number of differences.  but, if i
add one line from the good file to the bad html file:

bash greg-minshalls-mbp: {1373} diff -wu bad-foo.html try-foo.html 
--- bad-foo.html2015-11-29 17:14:17.0 +0200
+++ try-foo.html2015-11-29 17:47:57.0 +0200
@@ -215,6 +215,7 @@
 
 
 
+foo
 
 Table of Contents
 

(the name of the file i was exporting was "foo.org"), the browser
displays the contents of my file.

and, in fact, if i add

#+TITLE: foo

my browser again displays the contents of my file.

however, even with that change, it doesn't start off showing the file in
the view:overview i was expecting.

given that i'm running off the git version, and maybe things are
changing under me, i'm not sure if i should try to track this down any
more.  but, if i should, i'm happy to debug further.  thoughts?

cheers, Greg Minshall



Re: [O] Asynchronous mobileorg push/pull

2015-11-29 Thread Bingo UV
On Mon, 23 Nov 2015 15:33:23 +0100
Sven Bretfeld  wrote:

> You can just use a cronjob like:
> 
> */10  *  *  *  *  emacs --batch --load ~/.emacs --eval
> "(org-mobile-pull)" --eval "(org-mobile-push)"
> 
> This executes the whole process in the background with another
> instance of emacs running in batch-mode.
> 
> Sven
> 

The problem with this is that the other instance of emacs writes
org files and the main instance of emacs then warns quite rightly about
files on the disk changing outside of that emacs. Isn't there the
danger of losing data with this mechanism? Or am I missing some simple
defense against such data loss?

org-mobile-push could have been a read-only operation on the org
files, but it creates the PROPERTIES drawer if missing. org-mobile-pull
obviously writes into org files. So my fear is that in the worst case
both of these can cause data loss. Does that make sense?

thanks



Re: [O] :completion function isn't run anymore?

2015-11-29 Thread Julien Cubizolles
Nicolas Goaziou  writes:


> I didn't investigate much the issue yet, but, out of curiosity, would
> the following patch solve the issue:

Thanks for looking into it. It seems the completion-function is now
being accessed but unfortunately something is still wrong. The error
message is

--8<---cut here---start->8---
org-publish-projects: Wrong type argument: sequencep, 
jc-org-publish-rename-beamer-pdf
--8<---cut here---end--->8---

On a related note, I finally figured why rebasing the gif tree didn't
fix this problem: I was forgetting to recompile and was still using the
former .elc files...

If I'm to bisect, is it possible to reload all org-mode files without
restarting emacs ? Would M-x org-mode be enough ?

Julien.



Re: [O] :completion function isn't run anymore?

2015-11-29 Thread Nicolas Goaziou
Julien Cubizolles  writes:

> Thanks for looking into it. It seems the completion-function is now
> being accessed but unfortunately something is still wrong. The error
> message is
>
> org-publish-projects: Wrong type argument: sequencep,
> jc-org-publish-rename-beamer-pdf

I forgot that :preparation-function could also be a single function.
Attached is the updated patch to test.

> If I'm to bisect, is it possible to reload all org-mode files without
> restarting emacs ? Would M-x org-mode be enough ?

See `org-reload'.

Regards,
>From 1180a87c002c8efc0687a051bec536ee6c34eec0 Mon Sep 17 00:00:00 2001
From: Nicolas Goaziou 
Date: Sun, 29 Nov 2015 14:23:50 +0100
Subject: [PATCH] ox-publish.el: Fix :preparation-function and
 :completion-function

* lisp/ox-publish.el (org-publish-projects): Do not use `run-hooks' in
  a lexical binding environment.

Reported-by: Julien Cubizolles 

---
 lisp/ox-publish.el | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/ox-publish.el b/lisp/ox-publish.el
index 90f307c..b49b9d3 100644
--- a/lisp/ox-publish.el
+++ b/lisp/ox-publish.el
@@ -667,9 +667,9 @@ If `:auto-sitemap' is set, publish the sitemap too.  If
 `:makeindex' is set, also produce a file \"theindex.org\"."
   (dolist (project (org-publish-expand-projects projects))
 (let ((project-plist (cdr project)))
-  (let ((preparation-function
-	 (plist-get project-plist :preparation-function)))
-	(when preparation-function (run-hooks 'preparation-function)))
+  (let ((f (plist-get project-plist :preparation-function)))
+	(cond ((consp f) (mapc #'funcall f))
+	  ((functionp f) (funcall f
   ;; Each project uses its own cache file.
   (org-publish-initialize-cache (car project))
   (when  (plist-get project-plist :auto-sitemap)
@@ -701,9 +701,9 @@ If `:auto-sitemap' is set, publish the sitemap too.  If
 	  (org-publish-index-generate-theindex
 	   project (plist-get project-plist :base-directory))
 	  (org-publish-file theindex project t)))
-  (let ((completion-function
-	 (plist-get project-plist :completion-function)))
-	(when completion-function (run-hooks 'completion-function)))
+  (let ((f (plist-get project-plist :completion-function)))
+	(cond ((consp f) (mapc #'funcall f))
+	  ((functionp f) (funcall f
   (org-publish-write-cache-file
 
 (defun org-publish-org-sitemap (project &optional sitemap-filename)
-- 
2.6.2



Re: [O] :completion function isn't run anymore?

2015-11-29 Thread Julien Cubizolles
Nicolas Goaziou  writes:


> I forgot that :preparation-function could also be a single function.
> Attached is the updated patch to test.

It's fixed, thanks. Once again, I'm amazed by the reactivity and
efficiency of everyone in the org-mode community.

> See `org-reload'.

Thanks for that too. That will come in handy.

Julien.



Re: [O] :completion function isn't run anymore?

2015-11-29 Thread Nicolas Goaziou
Julien Cubizolles  writes:

> It's fixed, thanks.

Applied. Thank you.

Regards,



Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2

2015-11-29 Thread Nicolas Goaziou
Hello,

Steve Moreau  writes:

> Indeed, the org-setup-filling was concerned.
>
> *Before:*
>
>   (append fill-nobreak-predicate
>   '(org-fill-paragraph-separate-nobreak-p
> ...
>
> (defvar org-element-paragraph-separate) ; org-element.el
> (defun org-fill-paragraph-separate-nobreak-p ()
>   "Non-nil when a new line at point would end current paragraph."
>   (looking-at (substring org-element-paragraph-separate 1)))
>
> *After:*
>
> 'org-fill-paragraph-separate-nobreak-p' predicate removed and the previous
> function has been deleted
>
> The following code has been added:
>
>   (let ((paragraph-ending (substring org-element-paragraph-separate 1)))
> (org-set-local 'paragraph-start paragraph-ending)
> (org-set-local 'paragraph-separate paragraph-ending))
>
>
> Could someone explain to me why the function has been removed?

It was removed because `org-element-paragraph-separate' is not enough to
find the boundaries of a paragraph, e.g.,

  - item1
  - item2
  This is a new paragraph

It is usually not a problem except for `fill-region', as you noticed.
However, I do not know how to plug our own functions into `fill-region'.

We could replace `fill-region' with `org-fill-region', tho.


Regards,

-- 
Nicolas Goaziou



Re: [O] TOC local for specified heading and its subheadings (in HTML export)?

2015-11-29 Thread Sacha Chua
Rasmus  writes:

Hello, Rasmus, all!

> "id:headline" is a special type of links (see org-id.el).  A reference to
> a custom-ids is typically prefixed by "#" in Org, e.g. ’[[#heading]]’ or

Excellent point. I picked id: as a quick and dirty regexp match, but
:headline makes more sense. :headline "#headline" will later permit the
use of :headline "file.org::#headline" if someone is inclined. =)

>> + (and (string= (org-element-property 
>> :CUSTOM_ID element) local-id)
>> +  element)
> Wouldn’t it better to use org-link-search and get the element at
> point?

That would definitely be better. I wasn't sure if I could reuse that
function at that point, but I'll look into it if I find myself
revisiting this hack.

> We’d need support across all backends where it makes sense, so I guess at
> least, latex, beamer, odt, html, ascii, texinfo (if possible).

I might not get to all of those (I'll tell the list if I do), so
consider this open season for anyone who wants to implement it! =) I'll
see if I have some time to explore all those backends over the next
while. I've just shifted back to dual-booting Linux (was formerly just
on Windows), so it'll be a little easier for me to try things out.

Sacha



[O] [PATCH] ox-html.el: Remove superflous whitespace

2015-11-29 Thread Ruben Maher
* lisp/ox-html.el: Remove superfluous whitespace from meta tags, put
  there by `org-html--buld-meta-info' and `org-html--build-head'.
  `org-html-close-tag' already inserts a space, so it is not necessary
  to add another.  Previously these affected tags would look like
  .
---
 lisp/ox-html.el | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index effd387..8f9fe99 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1711,9 +1711,9 @@ INFO is a plist used as a communication channel."
" -->\n")))
  (format
   (if (org-html-html5-p info)
- (org-html-close-tag "meta" " charset=\"%s\"" info)
+ (org-html-close-tag "meta" "charset=\"%s\"" info)
(org-html-close-tag
-"meta" " http-equiv=\"Content-Type\" content=\"text/html;charset=%s\""
+"meta" "http-equiv=\"Content-Type\" content=\"text/html;charset=%s\""
 info))
   charset) "\n"
  (let ((viewport-options
@@ -1723,33 +1723,33 @@ INFO is a plist used as a communication channel."
(concat
 (org-html-close-tag
  "meta"
- (format " name=\"viewport\" content=\"%s\""
+ (format "name=\"viewport\" content=\"%s\""
  (mapconcat
   (lambda (elm) (format "%s=%s" (car elm) (cadr elm)))
   viewport-options ", "))
  info)
 "\n")))
  (format "%s\n" title)
- (org-html-close-tag "meta" " name=\"generator\" content=\"Org-mode\"" 
info)
+ (org-html-close-tag "meta" "name=\"generator\" content=\"Org-mode\"" info)
  "\n"
  (and (org-string-nw-p author)
  (concat
   (org-html-close-tag "meta"
-  (format " name=\"author\" content=\"%s\""
+  (format "name=\"author\" content=\"%s\""
   (funcall protect-string author))
   info)
   "\n"))
  (and (org-string-nw-p description)
  (concat
   (org-html-close-tag "meta"
-  (format " name=\"description\" content=\"%s\"\n"
+  (format "name=\"description\" content=\"%s\"\n"
   (funcall protect-string description))
   info)
   "\n"))
  (and (org-string-nw-p keywords)
  (concat
   (org-html-close-tag "meta"
-  (format " name=\"keywords\" content=\"%s\""
+  (format "name=\"keywords\" content=\"%s\""
   (funcall protect-string keywords))
   info)
   "\n")
@@ -1766,7 +1766,7 @@ INFO is a plist used as a communication channel."
 (when (and (plist-get info :html-htmlized-css-url)
   (eq org-html-htmlize-output-type 'css))
   (org-html-close-tag "link"
- (format " rel=\"stylesheet\" href=\"%s\" 
type=\"text/css\""
+ (format "rel=\"stylesheet\" href=\"%s\" 
type=\"text/css\""
  (plist-get info :html-htmlized-css-url))
  info))
 (when (plist-get info :html-head-include-scripts) org-html-scripts
-- 
2.6.2




[O] [PATCH] ox-html.el: Add lang attribute to html tag

2015-11-29 Thread Ruben Maher
* lisp/ox-html.el (org-html-template): Add lang attribute to exported
  html tag.  Some features of the CSS Text Module (Level 3) require this
  attribute to be present (for example, so that the browser knows how to
  hyphenate the text). For more info, please take a look here:
  https://drafts.csswg.org/css-text-3/#languages
---
 lisp/ox-html.el | 10 ++
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/lisp/ox-html.el b/lisp/ox-html.el
index effd387..074cced 100644
--- a/lisp/ox-html.el
+++ b/lisp/ox-html.el
@@ -1911,10 +1911,12 @@ holding export options."
(org-html-doctype info)
"\n"
(concat "http://www.w3.org/1999/xhtml\"; lang=\"%s\" 
xml:lang=\"%s\""
- (plist-get info :language) (plist-get info :language)))
+  (cond ((org-html-xhtml-p info)
+ (format
+  " xmlns=\"http://www.w3.org/1999/xhtml\"; lang=\"%s\" 
xml:lang=\"%s\""
+  (plist-get info :language) (plist-get info :language)))
+((org-html-html5-p info)
+ (format " lang=\"%s\"" (plist-get info :language
   ">\n")
"\n"
(org-html--build-meta-info info)
-- 
2.6.2




Re: [O] Moving from org-mode 6.33/7.9.3 to 8.3.2

2015-11-29 Thread Steve Moreau
Hi Nicolas,

Thanks for you answer.
OK, I understand. That explains why I needed to add blank lines between
list items before to fill region, such as:

  - item1

  - item2

  This is a new paragraph

I have 2 more questions for you please.
Let say I would like to give a hand and try to improve the org-fill-region
to deal with this case.
- Would it be local to fill-region only, as I would suspect, or would it
put a mess around because it is used in some other contexts I am not aware
of, and would it be something interesting for the org-mode according to you?
- If you wanted to develop it, would you surround it with a when condition
so that user can disable it?

Thanks,

Steve

2015-11-29 22:43 GMT+01:00 Nicolas Goaziou :

> Hello,
>
> Steve Moreau  writes:
>
> > Indeed, the org-setup-filling was concerned.
> >
> > *Before:*
> >
> >   (append fill-nobreak-predicate
> >   '(org-fill-paragraph-separate-nobreak-p
> > ...
> >
> > (defvar org-element-paragraph-separate) ; org-element.el
> > (defun org-fill-paragraph-separate-nobreak-p ()
> >   "Non-nil when a new line at point would end current paragraph."
> >   (looking-at (substring org-element-paragraph-separate 1)))
> >
> > *After:*
> >
> > 'org-fill-paragraph-separate-nobreak-p' predicate removed and the
> previous
> > function has been deleted
> >
> > The following code has been added:
> >
> >   (let ((paragraph-ending (substring org-element-paragraph-separate 1)))
> > (org-set-local 'paragraph-start paragraph-ending)
> > (org-set-local 'paragraph-separate paragraph-ending))
> >
> >
> > Could someone explain to me why the function has been removed?
>
> It was removed because `org-element-paragraph-separate' is not enough to
> find the boundaries of a paragraph, e.g.,
>
>   - item1
>   - item2
>   This is a new paragraph
>
> It is usually not a problem except for `fill-region', as you noticed.
> However, I do not know how to plug our own functions into `fill-region'.
>
> We could replace `fill-region' with `org-fill-region', tho.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
>