Re: [O] Set org-agenda-span per file

2017-05-31 Thread Loris Bennett
Hi Eric,

Eric S Fraga  writes:

> On Wednesday, 31 May 2017 at 05:22, Loris Bennett wrote:
>> I don't know the answer to your question, but I am interested in how you
>> are creating an org file synced from your departmental calendar.  Could
>> you share some details of the setup?
>
> What calendar system are you interested in?  The easiest way, in my
> experience, is to use an ics/ical translation script and access the
> ics/ical version of the department calendar, if such is available.  I do
> this to import appointments and TODO information from both MS outlook
> and Google calendar.
>
> I use the attached AWK script.  It has been previously posted to this
> list (many years ago) and a slightly different version is available on
> Worg, I believe.  I've been using this script for a long time and
> generally works very well.  There can be some issues with time zones and
> summer time depending on where you import from...

Thanks for the information.  I seem to remember using your script in the
past.  However, I never managed to automate pulling an ICS file from the
local Exchange server via the EWS API.  I seem to remember there was a
problem with some IIS setting that the Windows admins were unwilling to
change.  So I gave up on that and now just import meeting invites
directly from Gnus into Org using the gnus-icalendar package.

Cheers,

Loris

-- 
This signature is currently under construction.




Re: [O] Moving and resetting attachments

2017-05-31 Thread Eric Abrahamsen
Florian Lindner  writes:

> Hello,
>
> two questions about moving attachments to org files:
>
> C-c C-a a attaches a file and stores it under ./data/ID/...
>
> Using C-c C-a s I can set another directory a attachment directory.
> Can I make org-mode move the content of the previous
> directory to the new directory?
>
> Can I "reset" the attachment directory, i.e. like C-c C-a s but
> :ATTACH_DIR: is deleted and the contents of the previous
> directory are moved to ./data/ID?
>
> Rationale:
>
> I use org mode as a document management system. Create an entry Papers -> 
> Interpolation -> ECCOMAS. I know create an
> custom attachment directory ECCOMAS, next to the org file as long as I
> am working on that paper. When it's finished, I
> want to move the contents of the ECCOMAS attachment directory to ./data/ID/.

It doesn't work this way now, but I think it makes sense, and I would
also find that helpful. `org-attach-set-directory' could be changed to
check for existing files, and offer to move them. There's no
`org-attach-unset-directory', but I suppose there could be.

Eric




Re: [O] how to replace includegraphics?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 5:35 PM,   wrote:
> Hello John,
>
>> instead of footnotes. Have you considered just changing the definition
>> in LaTeX instead? [1] [2]
>
> Yes, may be the redaction of my request was not very clear, I'm sorry. I did
> not want to do that, because I foresee that someone may think that my
> \includesvg is the \includesvg from the svg package. However, the two do not
> work in the same way, and may lead to problems.

I initially saw this:

(replace-regexp-in-string "\\`includegraphics.+\\({.+\.svg}\\)"
"simplesvg\1" contents))

That looked like you wanted to just swap \includegraphics with
\simplesvg. Doing that via LaTeX directly seemed like an easy way:

#+latex: \let\includegraphics\simplesvg

Now that I'm re-examining, you only want to do this for .svgs so
that's not nearly as straightforward.

> If my previous e-mail was indeed clear, may be I'm not getting what you are
> trying to say, sorry.

If the above *did* work, I don't see why you couldn't just remove the
#+latex line before publishing. Or define it in a setupfile that you
load and no one would ever know the contents to get confused. Or
perhaps it was a mandatory requirement to do zero changes to the file
you publish? The first method you showed appeared to apply elisp code
from within the file, so I'd assume an external user would see it but
have to ignore/not eval.

Filters are intimidating to me (no elisp-fu here!), but they
definitely sound like the ticket!


Good luck,
John

P.S. On a last point re. the confusion alone, I'm interpreting you to
mean users may think \simplesvg == \includesvg? Or simplesvg is your
package *name*, svg is the CTAN package, and they both provide
\includesvg? Why not rename your local version's command to a
different name? Or do \usepacakge{simplesvg} locally, and in the
published version have it commented with a note that it's special? Or
make your package available and include a link and instructions to
replicate? Just seems like an awful lot of work for a naming
convention issue!

> Thank you.
>
>
> Edgar
>
> -
>
> ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the
> NSA's hands!
> $24.95 ONETIME Lifetime accounts with Privacy Features!  15GB disk! No
> bandwidth quotas!
> Commercial and Bulk Mail Options!



Re: [O] how to replace includegraphics?

2017-05-31 Thread edgar

This is what filters are for.  In your case `:filter-link' needs to
have a function that changes `includegraphics' to `simplesvg', if I
get what you want.


Oh! Thanks! I was unaware of this. I'll try :) .


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] how to replace includegraphics?

2017-05-31 Thread edgar

Hello John,


instead of footnotes. Have you considered just changing the definition
in LaTeX instead? [1] [2]
Yes, may be the redaction of my request was not very clear, I'm sorry. I 
did not want to do that, because I foresee that someone may think that 
my \includesvg is the \includesvg from the svg package. However, the two 
do not work in the same way, and may lead to problems.


If my previous e-mail was indeed clear, may be I'm not getting what you 
are trying to say, sorry.


Thank you.


Edgar

-

ONLY AT VFEmail! - Use our Metadata Mitigator to keep your email out of the 
NSA's hands!
$24.95 ONETIME Lifetime accounts with Privacy Features!  
15GB disk! No bandwidth quotas!
Commercial and Bulk Mail Options!  



Re: [O] org to static site?

2017-05-31 Thread John Ankarström
Chunyang Xu  writes:

> It is said that Nanoc is flexible. You can convert org mode to
> HTML with Pandoc or Emacs. Nanoc supports Pandoc out of box. To
> use Emacs, you need to write your own "filter" (Nanoc's
> terminology, i.e., convert one format into another), for
> example,
> [...]
> I just created my own site  with it
> last week.

Looks fantastic! I've been searching for a good way to write blog
posts in Org, and this looks very promising. Thanks for the
examples, too.

> The syntax highlighting on code block is provided by
> htmlize.el. I noticed `org-html-export-to-html' produces
> different HTML every time even the org file is unchanged at
> all. It is very annoying to me. I found a work-around to avoid
> it,

I've always been annoyed by Org's default heading id's. The way
I usually solve it is by setting a CUSTOM_ID property for every
heading, but it's rather inflexible ...

Does anybody know of a way to have Org produce sensible, readable
id's for headings? Like #this-is-a-heading instead of
#orgdcbac14.

- John



Re: [O] org-hide in terminal

2017-05-31 Thread Michael Brand
Hi Johannes

In a terminal with at least 16 colors the terminal color white (ID 7)
which is used for the face org-hide is darker than the terminal color
bright white (ID 15). Bright white is usually the same as the light
background. Use M-x list-colors-display in a terminal Emacs and look
at the first eight and the next eight colors, the bright variants of
the previous eight. For more about terminal colors see for example
http://en.wikipedia.org/wiki/ANSI_escape_code#Colors

To improve the situation of hiding the leading stars at least for
Emacs in a terminal with otherwise default color settings and with a
light background I started to use

  ;; For for example 256-color terminal and light background. The
  ;; Emacs color brightwhite is only defined on a terminal Emacs.
  (when (and (eq 'light (frame-parameter nil 'background-mode))
 (color-defined-p "brightwhite"))
(set-face-foreground 'org-hide "brightwhite"))

On macOS Terminal.app it does not work as good as on other operating
systems and terminals because there even bright white is darker than
the light background. Also take into account that on Terminal.app the
256 color IDs are mapped to only 16 instead of the usual 256 different
RGB values.

Michael



On Sat, Feb 11, 2017 at 3:12 PM, Johannes  wrote:

> Hello,
>
> With "org-hide-leading-stars" set to t orgmode tries to hide stars by
> using the "org-hide" face. This is documented with: "The foreground
> color of this face should be equal to the background
> color of the frame." and in the org manual in section Clean-view we find
> "Because Org makes the font color same as the background color to hide
> to stars, sometimes org-hide face may need tweaking to get the effect
> right. For some black and white combinations, grey90 on a white
> background might mask the stars better". As far as I can tell (which
> might be wront) it just assumes default colors "white" or "black", which
> might not be accurate.
>
> I think this is a bad solution for the following reasons.
>
> - It doesn't work well if emacs runs in a terminal (often the stars just
> get a grey background)
> - It shows the stars when we mark them (this might or might not be a
> good thing)
> - People who use the same config in multiple environments (other
> terminals and colors) will have to write some if-else code to get this
> right.
> - People who change their terminal colors get problems.
>
>
> Possible solutions I can think of are:
> a) Somhow make the existion solution work for terminals. I thought I
> could simply set org-hides forground to the backgrounf-value of the face
> "default", but somehow it didn't work out and I ended up with some sort
> of grey (which is not my background).
> b) emacs could have a text property, similar to "invisible", which hides
> text but still lets it occupy the space. I don't know how it work
> internaly, though. This is probably the best solution if the problem of
> hiding text occurs more often. I was told this was already discussed on
> emcas-devel, but I couldn't find it there.
> c) hide the leading stars behind spaces. I have a working prototype
> which works quite well. It uses "org-bullets" and "compose-region". It
> is not 100% clean though, since there still is a character which might
> be visible when using some minor mode.
>
> I am very new to emacs-lsip (and mailing lists) so I hope this is how it
> is done.
> Johannes Lippmann



Re: [O] org to static site?

2017-05-31 Thread lists

On 2017-05-31 16:00, Matt Price wrote:

I'm trying to wean myself off of Wordpress for next year's teaching
websites, and am wondering what solutions other people are using for
turning a collection of org pages and/or subtrees into a static html
site. I am leaning towards Hugo but honestly not for any sensible
reason; I've seen other people use Jekyll, though the fact that Github
doesn't support direct conversion from org-mode removes some of
Jekyll's appeal; and I know there are a number of other solutions too.




I have been using Pelican https://pelican.readthedocs.io/en/3.0/ for a 
while. It's written in Python and has a plugin which supports org-mode, 
or you can use markdown by exporting your content from org-mode. I have 
used it to publish a web version of a book, which is also available in 
pdf. All done from org-mode.


The html version is at: http://thecastle.github.io/thecastle/

The github repo is at: https://github.com/thecastle/thecastle

Ian.



Re: [O] org to static site?

2017-05-31 Thread Chunyang Xu
Matt Price  writes:

> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.
> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.
>
> So, I would love to hear what you all recommend.

It is said that Nanoc is flexible. You can convert org mode to HTML with
Pandoc or Emacs. Nanoc supports Pandoc out of box. To use Emacs, you
need to write your own "filter" (Nanoc's terminology, i.e., convert one
format into another), for example,

#+BEGIN_SRC ruby
require 'tempfile'

class OrgFilter < Nanoc::Filter
  identifier :org

  def run(content, params = {})
file = Tempfile.new(['nanoc', '.org'])
file.write(content)
file.close
system("emacs --batch --load init.el #{file.path} --eval 
'(org-html-export-to-html nil nil nil t)'")
html = "#{File.dirname(file.path)}/#{File.basename(file.path, '.org')}.html"
file.unlink
File.read(html)
  end
end
#+END_SRC

I just created my own site  with it last
week. The syntax highlighting on code block is provided by htmlize.el.
I noticed `org-html-export-to-html' produces different HTML every time
even the org file is unchanged at all. It is very annoying to me. I
found a work-around to avoid it,

#+BEGIN_SRC emacs-lisp
;; -*- lexical-binding: t; -*-
(let ((id 0))
  (defun org-export-new-reference--use-persistent-id (references)
(let ((new id))
  (while (rassq new references)
(setq new (incf id)))
  new)))

(advice-add 'org-export-new-reference
:override #'org-export-new-reference--use-persistent-id)
#+END_SRC

[...]

--
Org mode version 9.0.7 (release_9.0.7-496-g3d3e24 @
/Users/xcy/src/org-mode/lisp/)





Re: [O] how to replace includegraphics?

2017-05-31 Thread Charles C. Berry

On Wed, 31 May 2017, ed...@openmail.cc wrote:


Hello dear list,

* Summary
I want to know if someone could tell me how to replace (the macro, function, 
string) includegraphics for something else when exporting to LaTeX. In my 
case, simplesvg.




This is what filters are for.  In your case `:filter-link' needs to have a 
function that changes `includegraphics' to `simplesvg', if I get what you 
want.


Check out the manual:

(info "(org) Advanced configuration")

maybe run the example here:

http://orgmode.org/worg/exporters/filter-markup.html

and consult the part about filters here:

http://orgmode.org/worg/dev/org-export-reference.html

There are examples in the ox-*.el files, too. So, grep these for 
`filters-alist' to see some examples.


HTH,

Chuck




Re: [O] org to static site?

2017-05-31 Thread John Kitchin
I have used blogofile for many years now. I write the posts in orgmode but
export them to html with the required yaml header.

That approach could also be used for markdown. This old
http://kitchingroup.cheme.cmu.edu/blog/2013/09/27/Publishing-to-blogofile-using-org-mode/
but lays out the basic approach I use with my blog.

Note I am not sure I would recommend blogofile today. It is not actively
developed anymore I think. It does what I want these days.
On Wed, May 31, 2017 at 12:21 PM Russell Adams 
wrote:

> On Wed, May 31, 2017 at 10:34:57AM -0500, John Hendy wrote:
> > On Wed, May 31, 2017 at 10:29 AM, Russell Adams
> >  wrote:
> > >
> > > On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
> > >> Nikola supports org-mode last I checked though?
> > >
> > > I think it tries to remotely call emacs to compile the org to html,
> but I didn't want the extra layers. Markdown is adequate.
> > >
> > >> I use Nikola, and find the documentation frustratingly incomplete,
> but not so frustrating as to change :)
> > >
> > > Yeah, but IRC has been good for answering questions. I was able to get
> a minimal site with NO external links, libs, js,
> > > css, other crap, etc in a short time.
> >
> > I'm intrigued. Do you have the sources or could you post the gist
> > somewhere? While the result looks more or less pretty, the bootstrap3
> > base was super intimidating with respect to changing anything. I
> > probably hunted for 30min or more just to figure out why changing the
> > navbar color didn't work. Turns out it was hardcoded to use the
> > navbar-inverse class instead of the regular navbar class!?
>
> http://adamssystems.nl/
>
> You can examine the CSS there. I disabled all CDNs. I didn't want any
> javascript, external libs, etc. My ublock shows
> zero other sites, no third party code.
>
> I'd have to dig into how I customized the pre-compiled css files.
>
> >
> > John
> >
> > > I think my only complaint is that when I moved laptops my Python
> version changed and now I have to fix it.
> > >
> > >
> > > --
> > > Russell Adamsrlad...@adamsinfoserv.com
> > >
> > > PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
> > >
> > > Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> > >
> >
>
>
> --
> Russell Adamsrlad...@adamsinfoserv.com
>
> PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
>
> Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
>
> --
John

---
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] org to static site?

2017-05-31 Thread Russell Adams
On Wed, May 31, 2017 at 10:34:57AM -0500, John Hendy wrote:
> On Wed, May 31, 2017 at 10:29 AM, Russell Adams
>  wrote:
> >
> > On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
> >> Nikola supports org-mode last I checked though?
> >
> > I think it tries to remotely call emacs to compile the org to html, but I 
> > didn't want the extra layers. Markdown is adequate.
> >
> >> I use Nikola, and find the documentation frustratingly incomplete, but not 
> >> so frustrating as to change :)
> >
> > Yeah, but IRC has been good for answering questions. I was able to get a 
> > minimal site with NO external links, libs, js,
> > css, other crap, etc in a short time.
>
> I'm intrigued. Do you have the sources or could you post the gist
> somewhere? While the result looks more or less pretty, the bootstrap3
> base was super intimidating with respect to changing anything. I
> probably hunted for 30min or more just to figure out why changing the
> navbar color didn't work. Turns out it was hardcoded to use the
> navbar-inverse class instead of the regular navbar class!?

http://adamssystems.nl/

You can examine the CSS there. I disabled all CDNs. I didn't want any 
javascript, external libs, etc. My ublock shows
zero other sites, no third party code.

I'd have to dig into how I customized the pre-compiled css files.

>
> John
>
> > I think my only complaint is that when I moved laptops my Python version 
> > changed and now I have to fix it.
> >
> >
> > --
> > Russell Adamsrlad...@adamsinfoserv.com
> >
> > PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/
> >
> > Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3
> >
>


--
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] org to static site?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 11:08 AM, Puneeth Chaganti  wrote:
> I really wrestled with getting it to behave initially. I hope the
> intro to the docs is a joke, as either I'm an idiot or the author
> definitely failed :)
> - https://getnikola.com/handbook.html
>
> "DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE
> THING."
>
>
> To be fair to the author, org support is not built into Nikola, and is
> coming through a plugin (by yours truly). The remote calls to Emacs for
> compiling, and other ugly stuff can make it harder than necessary to deal
> with.

Understood, and I just meant in general (not org integration). This
was a bit tongue in cheek; I don't think anyone would *expect* that
something like this could be used without a manual. It's complicated
and takes a bit to parse, just like any other software! I think it's
great thus far, but can't fathom how someone could "pick it up" and
start using it from scratch with no docs.

John

> - Puneeth



Re: [O] org to static site?

2017-05-31 Thread Puneeth Chaganti
I really wrestled with getting it to behave initially. I hope the
intro to the docs is a joke, as either I'm an idiot or the author
definitely failed :)
- https://getnikola.com/handbook.html

"DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE
THING."


To be fair to the author, org support is not built into Nikola, and is
coming through a plugin (by yours truly). The remote calls to Emacs for
compiling, and other ugly stuff can make it harder than necessary to deal
with.

- Puneeth


Re: [O] org to static site?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 10:29 AM, Russell Adams
 wrote:
>
> On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
>> Nikola supports org-mode last I checked though?
>
> I think it tries to remotely call emacs to compile the org to html, but I 
> didn't want the extra layers. Markdown is adequate.
>
>> I use Nikola, and find the documentation frustratingly incomplete, but not 
>> so frustrating as to change :)
>
> Yeah, but IRC has been good for answering questions. I was able to get a 
> minimal site with NO external links, libs, js,
> css, other crap, etc in a short time.

I'm intrigued. Do you have the sources or could you post the gist
somewhere? While the result looks more or less pretty, the bootstrap3
base was super intimidating with respect to changing anything. I
probably hunted for 30min or more just to figure out why changing the
navbar color didn't work. Turns out it was hardcoded to use the
navbar-inverse class instead of the regular navbar class!?

John

> I think my only complaint is that when I moved laptops my Python version 
> changed and now I have to fix it.
>
>
> --
> 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] org to static site?

2017-05-31 Thread John Hendy
On Wed, May 31, 2017 at 10:17 AM, Jeffrey Brent McBeth
 wrote:
> Nikola supports org-mode last I checked though?

Make that a +1 for Nikola, and confirming it supports Org-mode. I just
started setting up an online portfolio/blog via github.io and found
these helpful:
- http://cestlaz.github.io/posts/2016-04-17-emacs-jekyll-nikola/#.WS7gV3VE5D8
- https://streakycobra.github.io/posts/blogging-in-org-mode-with-nikola/

> I use Nikola, and find the documentation frustratingly incomplete, but not so 
> frustrating as to change :)

I really wrestled with getting it to behave initially. I hope the
intro to the docs is a joke, as either I'm an idiot or the author
definitely failed :)
- https://getnikola.com/handbook.html

"DON'T READ THIS MANUAL. IF YOU NEED TO READ IT I FAILED, JUST USE THE THING."


John

> Jeff
>
> --
> "The man who does not read good books has no advantage over
>  the man who cannot read them."
>  -- not Mark Twain, maybe a southen librarian in 1910
>
>



Re: [O] org to static site?

2017-05-31 Thread Russell Adams

On Wed, May 31, 2017 at 11:17:10AM -0400, Jeffrey Brent McBeth wrote:
> Nikola supports org-mode last I checked though?

I think it tries to remotely call emacs to compile the org to html, but I 
didn't want the extra layers. Markdown is adequate.

> I use Nikola, and find the documentation frustratingly incomplete, but not so 
> frustrating as to change :)

Yeah, but IRC has been good for answering questions. I was able to get a 
minimal site with NO external links, libs, js,
css, other crap, etc in a short time.

I think my only complaint is that when I moved laptops my Python version 
changed and now I have to fix it.


--
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] org to static site?

2017-05-31 Thread Jeffrey Brent McBeth
Nikola supports org-mode last I checked though?

I use Nikola, and find the documentation frustratingly incomplete, but not so 
frustrating as to change :)

Jeff

-- 
"The man who does not read good books has no advantage over 
 the man who cannot read them."
 -- not Mark Twain, maybe a southen librarian in 1910




Re: [O] org to static site?

2017-05-31 Thread Russell Adams
On Wed, May 31, 2017 at 11:00:10AM -0400, Matt Price wrote:
> I'm trying to wean myself off of Wordpress for next year's teaching
> websites, and am wondering what solutions other people are using for
> turning a collection of org pages and/or subtrees into a static html site.
> I am leaning towards Hugo but honestly not for any sensible reason; I've
> seen other people use Jekyll, though the fact that Github doesn't support
> direct conversion from org-mode removes some of Jekyll's appeal; and I know
> there are a number of other solutions too.
>
> So, I would love to hear what you all recommend.
>
> Thanks,
> Matt

As much as I adore Org, I didn't like any of the static site generators. I 
ended up using Nikola, which uses Markdown.


--
Russell Adamsrlad...@adamsinfoserv.com

PGP Key ID: 0x1160DCB3   http://www.adamsinfoserv.com/

Fingerprint:1723 D8CA 4280 1EC9 557F  66E8 1154 E018 1160 DCB3



[O] org to static site?

2017-05-31 Thread Matt Price
I'm trying to wean myself off of Wordpress for next year's teaching
websites, and am wondering what solutions other people are using for
turning a collection of org pages and/or subtrees into a static html site.
I am leaning towards Hugo but honestly not for any sensible reason; I've
seen other people use Jekyll, though the fact that Github doesn't support
direct conversion from org-mode removes some of Jekyll's appeal; and I know
there are a number of other solutions too.

So, I would love to hear what you all recommend.

Thanks,
Matt


[O] time not shown in capture buffer, but captured

2017-05-31 Thread Detlef Steuer
Hi!

At some moment in the last 10 days the beheaviour of capturing
and/or date/time-selection has changed.

(org git from today, emacs 25.2.1)

I have the following capture template:
...
("t" "Todo" entry (file+headline "~/.pim/inbox.org" "Inbox")
"* TODO %? \n " )
...

C-c c t works, a buffer pops up as expected.

Now

C-c C-s

Gives the usual date+time selection buffer.

 chooses the selected date.

BUT: the timestamp is only added to the inbox.org, but invisible
in the capture buffer.

Any ideas?

Detlef

-- 

"Wisely and slow. Those stumble that run fast."
Shakespeare -- Romeo and Juliet





Re: [O] Org-mode link returned path is truncated when contains space

2017-05-31 Thread Nicolas Goaziou
Hello,

"numbch...@gmail.com"  writes:

> I have a link in org-moe file like this:
>
>  #+BEGIN_SRC org
>  [[file:Data/images/logos/Full color Git logo for light backgrounds.png]]
>  #+END_SRC
>
>
>  *The file did exist.*
>
>  I have elisp code like this to fontify link when the file does not exist:
>
>  #+BEGIN_SRC emacs-lisp
>  (org-link-set-parameters
>   "file"
>   ;; TODO: fix path contains space case.
>   :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning)))
>  #+END_SRC
>
>
>  But it is fontied as red. I tried to debug info by print of ~path~ in
> upper `org-link-set-parameters` lambda function.
>
>  It return for path:
>
>  #+BEGIN_EXAMPLE
>  "Data/images/logos/Full"
>  #+END_EXAMPLE

Could you update Org to a more recent version, e.g., 9.0.7. It may have
been fixed already.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: begin_src org :results replace does not work

2017-05-31 Thread Nicolas Goaziou
Hello,

"Charles C. Berry"  writes:

> On Mon, 29 May 2017, Vikas Rawal wrote:
>
>> Why does the replace keyword not work? It prepends the results. I have
>> tried both ":results value replace" and ":results output replace".
>>
>> I am on org-version 9.0.7
>>
>> Vikas
>>
>>
>>
>>
>> #+NAME: one
>> #+BEGIN_SRC org :results value replace export both
>> ,#+NAME: table-yield
>> ,#+CAPTION: Simple table created using latex tabular environment
>> ,#+attr_latex: :environment tabular :width \textwidth :align lrr
>>| State  | Variable one | Varia two |
>>|+---+|
>>| MP |   672 |  13000 |
>>| Har|   300 |  25000 |
>>| Pun|   260 |  35000 |
>> #+End_SRC
>>
>
> The problem is that the results you generate is a table with
> affiliated keywords NAME and CAPTION and ATTR_[backend].
>
> `org-at-table-p' does not recognize that the keywords are followed by
> a table.  Altering this function might be asking for trouble as it is
> used outside babel.
>
> So maybe the cond test should refer to `org-element-context' to better
> sort this out and correctly identify the table end.

Even though that change may be interesting on its own, it isn't a proper
solution here. 

Raw values cannot be replaced. The only possible handling is "prepend"
since Org cannot possibly know what the results are. For example, with
the following src block

  #+begin_src org
  Pargraph 1

  Paragaph 2
  #+end_src

Org cannot know if a raw "Parapraph 2" belongs the the results or is
a paragraph following them.

Since "raw" format is special, the most surprising thing here is that
Org src blocks use it as a default.

Anyway, I don't think there is anything to fix (except maybe the
documentation). The OP is requesting an impossible combination of
parameters.

Regards,

-- 
Nicolas Goaziou



Re: [O] how to replace includegraphics?

2017-05-31 Thread John Hendy
On Tue, May 30, 2017 at 10:37 PM,   wrote:
> Hello dear list,
>
> * Summary
> I want to know if someone could tell me how to replace (the macro, function,
> string) includegraphics for something else when exporting to LaTeX. In my
> case, simplesvg.

This made me think of the various times someone wants to use endnotes
instead of footnotes. Have you considered just changing the definition
in LaTeX instead? [1] [2]

#+LaTeX_HEADER: \usepackage{endnotes}
#+LaTeX_HEADER: \let\footnote=\endnote

In other words, utilize the fact that Org already handles images
flawlessly and then just define \includegraphics to be something else
on the LaTeX end of things.


John

[1] http://perlstalker.vuser.org/blog/2014/07/15/endnotes-org-mode/
[2] 
https://tex.stackexchange.com/questions/53895/converting-footnotemarks-to-endnotes



Re: [O] emacs vs emacs -nw

2017-05-31 Thread Yuri Khan
On Wed, May 31, 2017 at 5:41 PM, Jean-Christophe Helary
 wrote:

> FN-left in a level 2 header in org mode triggers beginning-of-buffer and 
> *not* org-promote-header.

The Fn key is a whole different issue. It’s likely that your system is
reporting a Home key code when you press Fn+Left.



[O] Moving and resetting attachments

2017-05-31 Thread Florian Lindner
Hello,

two questions about moving attachments to org files:

C-c C-a a attaches a file and stores it under ./data/ID/...

Using C-c C-a s I can set another directory a attachment directory. Can I make 
org-mode move the content of the previous
directory to the new directory?

Can I "reset" the attachment directory, i.e. like C-c C-a s but :ATTACH_DIR: is 
deleted and the contents of the previous
directory are moved to ./data/ID?

Rationale:

I use org mode as a document management system. Create an entry Papers -> 
Interpolation -> ECCOMAS. I know create an
custom attachment directory ECCOMAS, next to the org file as long as I am 
working on that paper. When it's finished, I
want to move the contents of the ECCOMAS attachment directory to ./data/ID/.

Thanks,
Florian




Re: [O] emacs vs emacs -nw

2017-05-31 Thread Jean-Christophe Helary

> On May 31, 2017, at 20:30, Eli Zaretskii  wrote:
> 
>> From: Jean-Christophe Helary 
>> Date: Wed, 31 May 2017 19:41:00 +0900
>> Cc: Org-mode 
>> 
>> Ok, I just tried something else:
>> 
>> (setq  ns-function-modifier 'meta) and what I get is *very* similar to the 
>> issue I have with ESC:
>> 
>> FN-x correctly "calls" M-x
>> FN-left in a level 2 header in org mode triggers beginning-of-buffer and 
>> *not* org-promote-header.
>> 
>> So the problem is not limited to ESC, and maybe not limited to org-mode.
> 
> AFAIR, the remapping of Meta-something to ESC-something happens
> automatically only for characters, not for function keys.  For
> function keys, this remapping must be set somewhere, or it won't
> happen.  You can see in bindings.el how some of these remappings are
> set up.

Yes, I realized after Yuri's comment that the comparison with ESC was a bit 
far-fetched.

Jean-Christophe 


Re: [O] emacs vs emacs -nw

2017-05-31 Thread Eli Zaretskii
> From: Jean-Christophe Helary 
> Date: Wed, 31 May 2017 19:41:00 +0900
> Cc: Org-mode 
> 
> Ok, I just tried something else:
> 
> (setq  ns-function-modifier 'meta) and what I get is *very* similar to the 
> issue I have with ESC:
> 
> FN-x correctly "calls" M-x
> FN-left in a level 2 header in org mode triggers beginning-of-buffer and 
> *not* org-promote-header.
> 
> So the problem is not limited to ESC, and maybe not limited to org-mode.

AFAIR, the remapping of Meta-something to ESC-something happens
automatically only for characters, not for function keys.  For
function keys, this remapping must be set somewhere, or it won't
happen.  You can see in bindings.el how some of these remappings are
set up.



Re: [O] emacs vs emacs -nw

2017-05-31 Thread Eric S Fraga
On Wednesday, 31 May 2017 at 10:04, Jean-Christophe Helary wrote:

[...]

> And I get the expected behavior in GUI emacs. So it's really an issue
> about ESC that is not recognized in GUI mode for *some* bindings in
> org-mode.

I can actually confirm this on quite recent org (as well as 8.2.10 as
bundled with emacs 26.x) on Linux as well.

Comparing Alt-left with the ESC key followed by left arrow gives this
using C-h c:

:  runs the command org-metaleft
: ESC  (translated from  ) runs the command backward-word

with emacs -Q in GUI mode.  Have not tried terminal mode.

As Jean-Christophe has said, this seems to be independent of the window
manager.  For completeness, I am using ratpoison.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-425-gf4fca1


signature.asc
Description: PGP signature


Re: [O] emacs vs emacs -nw

2017-05-31 Thread Jean-Christophe Helary

> On May 31, 2017, at 19:04, Jean-Christophe Helary 
>  wrote:

>> On X11/GNU/Linux, I get header promotion with Alt+Left but word
>> navigation on Esc Left.
> 
> Now that I think about it, I just tried this:
> 
> (setq  ns-right-command-modifier 'meta)
> 
> And I get the expected behavior in GUI emacs. So it's really an issue about 
> ESC that is not recognized in GUI mode for *some* bindings in org-mode.

Ok, I just tried something else:

(setq  ns-function-modifier 'meta) and what I get is *very* similar to the 
issue I have with ESC:

FN-x correctly "calls" M-x
FN-left in a level 2 header in org mode triggers beginning-of-buffer and *not* 
org-promote-header.

So the problem is not limited to ESC, and maybe not limited to org-mode.

Jean-Christophe



Re: [O] [org] different key binding between GUI emacs and emacs -nw

2017-05-31 Thread Jean-Christophe Helary

> On May 31, 2017, at 19:01, Eric S Fraga  wrote:
> 
> On Wednesday, 31 May 2017 at 02:38, Tim Cross wrote:
>> I'm sure this has been checked, but make sure it isn't the window
>> manager/OS 'stealing' the keys. When I install emacs on any system,
> 
> My own experience over the years is that this is indeed usually the
> culprit, especially for keys such as M-arrows which are often bound to
> functions like changing workspace views.

In this case, M-Left (ESC-left) triggers backward-word instead of the expected 
org-promote-subtree.

It does not seem to me that the OS is stealing anything.

Jean-Christophe


Re: [O] Set org-agenda-span per file

2017-05-31 Thread Eric S Fraga
On Wednesday, 31 May 2017 at 05:22, Loris Bennett wrote:
> I don't know the answer to your question, but I am interested in how you
> are creating an org file synced from your departmental calendar.  Could
> you share some details of the setup?

What calendar system are you interested in?  The easiest way, in my
experience, is to use an ics/ical translation script and access the
ics/ical version of the department calendar, if such is available.  I do
this to import appointments and TODO information from both MS outlook
and Google calendar.

I use the attached AWK script.  It has been previously posted to this
list (many years ago) and a slightly different version is available on
Worg, I believe.  I've been using this script for a long time and
generally works very well.  There can be some issues with time zones and
summer time depending on where you import from...

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-425-gf4fca1


ical2org.awk
Description: Binary data


signature.asc
Description: PGP signature


Re: [O] emacs vs emacs -nw

2017-05-31 Thread Jean-Christophe Helary

> On May 31, 2017, at 18:41, Yuri Khan  wrote:
> 
> On Wed, May 31, 2017 at 3:58 PM, Jean-Christophe Helary
>  wrote:
> 
>>> Could you provide an example and/or a recipe to demonstrate the issue?
>> 
>> • Open an org file with a few headers and different header levels.
>> • Select a lower level header
>> • Hit M-left
> 
> I believe this last step may be a bit unclear and misleading. Today,
> Meta is not a real key. You only get it via emulation from ESC or a
> modifier key, normally Alt on PCs. I don’t know the convention on Mac.

Ooops, you're right. Indeed.

On my machine I *systematically* use ESC for META.

> On X11/GNU/Linux, I get header promotion with Alt+Left but word
> navigation on Esc Left.

Now that I think about it, I just tried this:

(setq  ns-right-command-modifier 'meta)

And I get the expected behavior in GUI emacs. So it's really an issue about ESC 
that is not recognized in GUI mode for *some* bindings in org-mode.

Jean-Christophe 

> 
>> Expected result:
>> • the header is promoted
>> 
>> Result in GUI Emacs (Aquamacs too)
>> • The cursor jumps to the beginning of the previous word




Re: [O] Set org-agenda-span per file

2017-05-31 Thread Eric S Fraga
On Tuesday, 30 May 2017 at 20:02, Florian Lindner wrote:
> Hello,
>
> is it possible to set the number of days that are shown in the agenda,
> i.e. org-agenda-span on a per file basis?

I would suggest the easiest way would be a custom view for the agenda
which should allow multiple entries from different files with different
settings for each.
-- 
: Eric S Fraga (0xFFFCF67D), Emacs 26.0.50, Org release_9.0.6-425-gf4fca1


signature.asc
Description: PGP signature


Re: [O] [org] different key binding between GUI emacs and emacs -nw

2017-05-31 Thread Eric S Fraga
On Wednesday, 31 May 2017 at 02:38, Tim Cross wrote:
> I'm sure this has been checked, but make sure it isn't the window
> manager/OS 'stealing' the keys. When I install emacs on any system,

My own experience over the years is that this is indeed usually the
culprit, especially for keys such as M-arrows which are often bound to
functions like changing workspace views.

-- 
Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D)


signature.asc
Description: PGP signature


[O] Org-mode link returned path is truncated when contains space

2017-05-31 Thread numbch...@gmail.com
I have a link in org-moe file like this:

 #+BEGIN_SRC org
 [[file:Data/images/logos/Full color Git logo for light backgrounds.png]]
 #+END_SRC

 *The file did exist.*

 I have elisp code like this to fontify link when the file does not exist:

 #+BEGIN_SRC emacs-lisp
 (org-link-set-parameters
  "file"
  ;; TODO: fix path contains space case.
  :face (lambda (path) (if (file-exists-p path) 'org-link 'org-warning)))
 #+END_SRC

 But it is fontied as red. I tried to debug info by print of ~path~ in
upper `org-link-set-parameters` lambda function.

 It return for path:

 #+BEGIN_EXAMPLE
 "Data/images/logos/Full"
 #+END_EXAMPLE


[stardiviner] GPG key ID: 47C32433
IRC(freeenode): stardiviner Twitter:  @numbchild
Key fingerprint = 9BAA 92BC CDDD B9EF 3B36  CB99 B8C4 B8E5 47C3 2433
Blog: http://stardiviner.github.io/


Re: [O] Set org-agenda-span per file

2017-05-31 Thread Florian Lindner
Am 31.05.2017 um 07:22 schrieb Loris Bennett:
> Hi,
> 
> Florian Lindner  writes:
> 
>> Hello,
>>
>> is it possible to set the number of days that are shown in the agenda,
>> i.e. org-agenda-span on a per file basis?
>>
>> I want to show two weeks of deadlines in my own org file, and just 4
>> days of appointments in the org file synced from the department's
>> calendar.
> 
> I don't know the answer to your question, but I am interested in how you
> are creating an org file synced from your departmental calendar.  Could
> you share some details of the setup?

Sure! My department uses a shared ownCloud calendar and I use org-caldav to 
sync.

https://github.com/dengste/org-caldav

configuration is simple:

(setq org-caldav-url 
"https://invalid.org/cloud/remote.php/dav/calendars/lindner";
  org-caldav-calendar-id "sgskalender"
  org-caldav-inbox "~/sgs.org"
  org-icalendar-timezone "Europe/Berlin"
  org-caldav-files nil)

Best,
Florian