Re: [O] Use headings in sitemap

2016-10-30 Thread Thibault Marin
Nicolas Goaziou writes:

> I pushed an implementation of that idea in wip-sitemap branch, if anyone
> wants to test it.

Thanks!

> For example, setting :sitemap-function property to
>
>(lambda (title list)
>  (concat "#+TITLE: " title "\n\n"
>  (org-list-to-subtree list)))
>
> mostly achieves what the OP wants.

I don't have the `directory-name-p' function (I am still on emacs 24),
so I made a simplistic one: (string= file (file-name-sans-extension
file)), it seems to be sufficient for my test-case.  I don't know if not
being on 25 will cause other issues.

I also had to add a call to `expand-file-name' around the definition of
the `root' variable (in `org-publish-sitemap') to account for the fact
that my :base-directory is defined with "~/" instead of "/home/...".

Another thing I had to modify was the :exclude pattern which was
mis-formed earlier ("setup.org\\|website.org\\|rss.org" changed to
"setup\\.org\\|website\\.org\\|rss\\.org").  The earlier version of the
pattern results in an empty file list but was not a problem on the older
version of the sitemap tools.  Anyway, I have now fixed my setup.

> Also, setting :sitemap-format-entry
> to
>
>(lambda (entry root style)
>  (if (directory-name-p entry)
>  (file-name-nondirectory (directory-file-name entry))
>(format
> "[[file:%s][%s]]%s"
> (file-relative-name entry root)
> (org-publish-find-title entry)
> (let ((subtitle
>(org-element-interpret-data
> (org-publish-find-property entry :subtitle 'latex
>   (if (equal subtitle "") "" (format " (%s)" subtitle))

This is perfect for me, thanks.  I wanted to display the date along with
the title for all the pages in the posts heading so I used the following
(I should be able to filter the folder name better than this, this was
just to test things out).

   (lambda (entry root style)
 (if (directory-name-p entry)
 (file-name-nondirectory (directory-file-name entry))
   (format
"[[file:%s][%s%s]]"
(file-relative-name entry root)
(let ((date
   (org-element-interpret-data
(org-publish-find-property entry :date
  (if (or (equal date "")
  (not (string-match
"posts/"
(file-relative-name entry root
  "" (format "(%s) "
 (replace-regexp-in-string
  "[<>]" ""
  date
(org-publish-find-title entry

> Feedback weclome.

>From my limited use, this perfectly fits my needs.  The only thing I
have not fully tested yet is the sorting mechanism, I'll try that soon.

Thanks,
thibault



[O] org-meta-return

2016-10-30 Thread 42 147
Hello,

I notice that org-meta-return now inserts a space between the new headline
and the previous headline. This was not the functionality before (not sure
which update changed it).

Either that, or I preferred defective functionality all along.

Any way to restore the old org-meta-return?

Thanks,

John



Re: [O] Bug: Please supply stable releases on ELPA or MELPA Stable [8.3.4 (8.3.4-dist @ /usr/local/share/emacs/25.1.50/site-lisp/org-mode/)]

2016-10-30 Thread Josiah Schwab
Hi Reuben,

> It would be great if it were possible to install stable org-mode
> versions from GNU ELPA or MELPA Stable. At present, one has to choose
> between installing bleeding-edge versions simply, or stable versions
> built by hand.
>
> (I am a bit surprised I can’t find anything about this in the mailing
> list archives, so do forgive me if I’ve overlooked previous discussion.)

The version on GNU ELPA (http://elpa.gnu.org/packages/org.html), which
is labeled org-20161024, is org-git-version 8.3.6-7-g4d7d52-elpa.

I believe that indicates that it is the latest version from the stable
maint branch, not a version from the unstable master branch (which is at
8.3.6-1264-g21932c right now).

Hope that helps,
Josiah



Re: [O] “Match data clobbered by buffer modification hooks”

2016-10-30 Thread Nicolas Goaziou
Hello,

Saša Janiška  writes:

> Kaushal Modi  writes:
>
>> Can you check if you see this bug on the org mode version build from
>> the latest commit on the master branch?
>
> I just tried with the master build locally:
>
>
> Org-mode version 8.3.6 (8.3.6-7-g4d7d52-elpa @
> /home/gour/.emacs.d/lisp/org-mode/lisp/)

This is not master. You are still on stable branch according to the
string above.

Regards,

-- 
Nicolas Goaziou



[O] Bug: Please supply stable releases on ELPA or MELPA Stable [8.3.4 (8.3.4-dist @ /usr/local/share/emacs/25.1.50/site-lisp/org-mode/)]

2016-10-30 Thread Reuben Thomas


Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.


It would be great if it were possible to install stable org-mode
versions from GNU ELPA or MELPA Stable. At present, one has to choose
between installing bleeding-edge versions simply, or stable versions
built by hand.

(I am a bit surprised I can’t find anything about this in the mailing
list archives, so do forgive me if I’ve overlooked previous discussion.)

Emacs  : GNU Emacs 25.1.50.9 (x86_64-pc-linux-gnu, GTK+ Version 3.18.9)
 of 2016-10-15
Package: Org-mode version 8.3.4 (8.3.4-dist @ 
/usr/local/share/emacs/25.1.50/site-lisp/org-mode/)
-- 
http://rrt.sc3d.org/



Re: [O] html-email in org-mode

2016-10-30 Thread John Kitchin
Do you mean monospace in the whole html message, e.g. something like Courier?

Or just in a table? I do not think you can control the font in plain
text emails.

You can set the font in the td elements of a table like this (I used
cursive because it was easy to see.

#+BEGIN_SRC emacs-lisp
(defun italicize-table (data backend info)
  (with-temp-buffer
(insert data)
(goto-char (point-min))
(while (re-search-forward " writes:
>
>> 1.1.3 Tables
>>
>>  Table 1: A table for you.  
>>   x  y
>>   1  2
>>
>
> Hi John,
>
> I haven't (yet) found the email thread that you had alluded to, but I
> think this post is awesome.  Works well for me!
>
> One suggestion/thought:
>
> I would like to do is force monospace font in these messages, since the
> recipients I typically send to will have variable width fonts, and
> tables and the like tend to get messed up.
>
> How might this be done?
>
> Best regards,
> Eric


-- 
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



[O] Tasks don't repeat correctly if system-time-locale is set to certain languages

2016-10-30 Thread Bruce V. Chiarelli
Hello all,

I've noticed some unusual behavior with repeating entries when the
system-time-locale variable is set. Specifically:

It is Sunday, today, October 30th. I did not mark this task, which is
a habit, yesterday.

-- If I have (setq system-time-locale "hu_HU.utf8"), Hungarian, then
marking this task DONE

* TODO Anki basic reviews   :habit:study:
  SCHEDULED: <2016-10-29 szo .+1d>

vbecomesv

* TODO Anki basic reviews   :habit:study:
  SCHEDULED: <2016-10-30 v .+1d>

Which is not correct. I marked it DONE today, so it should repeat tomorrow.

-- If I have (setq system-time-locale "es_MX.utf8"), Mexican Spanish,
then doing the same thing:

* TODO Anki basic reviews   :habit:study:
  SCHEDULED: <2016-10-29 szo .+1d>

vbecomesv

* TODO Anki basic reviews   :habit:study:
  SCHEDULED: <2016-10-31 lun .+1d>

Which *is* correct. I have tried this with an unset
system-time-locale, and with it set to fa_IR, es_MX, en_GB, and hu_HU.
So far, hu_HU is the only one that behaves incorrectly. Note that it
doesn't seem to matter which language the day-of-the-week abbreviation
is already in, since every time I tried this, I reverted the file back
to the Hungarian line. Changing the date to <2016-10-29 Sat .+1d>
before marking it also had no effect.

Of course, I could just set the date locale to "C" or unset it, but
there's still a bug somewhere.

I am running the 1399f5 revision now, but I can reproduce this
behavior all the way back until version 7,

Cheers,
Bruce V C



Re: [O] Use headings in sitemap

2016-10-30 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> Hello,
>
> Rasmus Pank Roulund  writes:
>
>> Nicolas Goaziou  writes:
>
>> It’s not quite that complicated in my patch/WIP.  You specify an ordering
>> function.  E.g. the plain list is:
>>
>>  (defun org-publish-org-sitemap-as-list (files project-plist)
>>"Insert FILES as simple list separated by newlines.
>>  PROJECT-PLIST holds the project information."
>>(mapconcat
>> (lambda (file) (org-publish-format-file-entry
>>org-publish-sitemap-file-entry-format
>>file project-plist))
>> files "\n"))
>>
>> If you don’t have the full flexibility of a function I guess someone will
>> always run into trouble eventually...
>
> I think one mistake here is to conflate style and formatting. By doing
> so, defining a new style implies that one has to handle sorting,
> directories (or lack thereof)... and also Org syntax.
>
> I suggest to keep style as a mean to control how the file names are
> provided, and separate it from the formatting process, handled
> by :sitemap-function and :sitemap-format-entry or some such.
>
> We might, however, by this definition, merge sorting and style together
> (e.g., tree-date-ascending list-name-descending).
>
>>> I suggest to let :sitemap-function operate on the lists of files
>>> included in the sitemap (i.e., the list of files in the project),
>>> already ordered, and formatted according to
>>> `org-publish-sitemap-file-entry-format'.
>>
>> Isn’t that’s what my patch does?
>
> More or less, but my proposal is slightly different. E.g., I suggest
> a different data type for the arguments.
>
> OTOH, your patch does other things orthogonal to my proposal (e.g.
> preamble and postambles for sitemaps...).
>
>> I like that, but AFAIK the backend is not known at the time the sitemap is
>> generated.  And it might not be deducible from the publishing
>> function.
>
> You might have misread my proposal. 
>
> I'm suggesting to leave it up to the user. Whenever they define a new
> sitemap function and need to implement a formatting function, they can
> provide the name of the back-end they want to use. This information is
> known to the user.
>
> Conversely, we do not provide any ready-to-use keyword (so, no format
> string with placeholders) because, as you write, we cannot predict the
> back-end with certainty. Instead, we merely implement a generic getter
> function (which you mostly implemented in your patch set).

I pushed an implementation of that idea in wip-sitemap branch, if anyone
wants to test it.

For example, setting :sitemap-function property to

   (lambda (title list)
 (concat "#+TITLE: " title "\n\n"
 (org-list-to-subtree list)))

mostly achieves what the OP wants. Also, setting :sitemap-format-entry
to

   (lambda (entry root style)
 (if (directory-name-p entry)
 (file-name-nondirectory (directory-file-name entry))
   (format
"[[file:%s][%s]]%s"
(file-relative-name entry root)
(org-publish-find-title entry)
(let ((subtitle
   (org-element-interpret-data
(org-publish-find-property entry :subtitle 'latex
  (if (equal subtitle "") "" (format " (%s)" subtitle))

will add a subtitle to the entry, when available, upon publishing to
LaTeX.

Feedback weclome.


Regards,



Re: [O] html-email in org-mode

2016-10-30 Thread tbanelwebmin

* Awesome
This is awesome!

* Simple
I followed your instructions, and in 2 minutes I was able to send a
/1st/ mail from Org Mode

* Thanks
Thanks John for showing that.


Re: [O] html-email in org-mode

2016-10-30 Thread Marcin Borkowski

On 2016-10-30, at 15:34, Eric Brown  wrote:

> One suggestion/thought:
>
> I would like to do is force monospace font in these messages, since the
> recipients I typically send to will have variable width fonts, and
> tables and the like tend to get messed up.

+20! (that is, +243290200817664)

I'm not very interested in sending HTML emails, but this would be
AWESOME.  I sometimes send ASCII-art-ish tables (like Org-mode ones, or
Ledger reports) by email, and opening them in variable-width font is
rather messy indeed.

TIA,

-- 
Marcin Borkowski



Re: [O] html-email in org-mode

2016-10-30 Thread Eric Brown
John Kitchin  writes:

> 1.1.3 Tables
>
>  Table 1: A table for you.  
>   x  y
>   1  2
>

Hi John,

I haven't (yet) found the email thread that you had alluded to, but I
think this post is awesome.  Works well for me!

One suggestion/thought:

I would like to do is force monospace font in these messages, since the
recipients I typically send to will have variable width fonts, and
tables and the like tend to get messed up.

How might this be done?

Best regards,
Eric