[O] bug#23917: bug#23917: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks)

2016-07-26 Thread Sebastian Wiesner
Please do not CC me on Emacs bug threads.  If there's an issue in Flycheck 
please take it to our issue tracker at 
https://github.com/flycheck/flycheck/issues where we can keep track of it.





Re: [O] Limit subtree to a specific export backend

2013-10-04 Thread Sebastian Wiesner
2013/9/30 Rasmus ras...@gmx.us:
 Hi Sebastian,

 Sebastian Wiesner lunary...@gmail.com writes:

 can I limit a subtree to be exported with specific backends only?
 I.e. only to HTML, but not Texinfo or LaTeX?

 Background:  I am trying to simplify the documentation of one of my
 projects, and combine the website and the user manual into a single
 document.  Naturally, there is some content on the website that should
 not appear in the manual and vice versa.

 As Sebastien suggests, if you can identify export status depending on
 tags you can do it with a filter.

Great, I think I will go by this way…

I presume, I can set org-export-filter-options-functions as a
directory-local variable, so that this kind of export restrictions
only applies to Org mode documents in the specific project.

 Here's an example that's perhaps a bit too verbose and not thoroughly
 tested:

 #+BEGIN_SRC Org
 #+TITLE: Conditional export
 #+options: tags:nil
 * Common intro
   txt
 ** Pdf heading:latex:
the math is really pretty!
 ** HTML heading:html:
the text features hyperlinks!
 ** More common notes
Intro over

 * Code :noexport:
 #+begin_src emacs-lisp
   (defun rasmus/conditional-export (settings backend)
 Change SETTINGS to include dynamically set export-tags.

 Enable the use of BACKEND as EXPORT_TAGS.  A derived backend is
 treated as its parent.
 (let ((backends (remove-duplicates
  (mapcar (lambda (x)
(or (org-export-backend-parent x)
(org-export-backend-name x)))
  org-export--registered-backends)))
   ;; for treating derived backend and parent backends differently:
   ;; (backend-or-parent backend)
   (backend-or-parent (dolist (b org-export--registered-backends 
 return)
(when  (eq (org-export-backend-name b) backend)
  (return (or (org-export-backend-parent b)
  (org-export-backend-name b)))
   (plist-put
settings :exclude-tags
(append (plist-get settings :exclude-tags)
(mapcar 'symbol-name
(remove backend-or-parent backends))

   (add-to-list 'org-export-filter-options-functions 
 'rasmus/conditional-export)
 #+end_src
 #+END_SRC

Do I understand correctly, that this code adds all *other* backends to
the exclude-tags setting, instead of adding the current one to
select-tags?  Is there a specific reason to do this?

Just adding backend to select-tags seems simpler to me, and I
wonder whether exclude-tags even behaves correctly for headlines
with more than one tag.  As far as I understand the Org manual, it
would exclude headlines tagged as :html:latex: when exporting to
html, because latex is added as exclude-tag, preventing the
headline from being exported.



Re: [O] Limit subtree to a specific export backend

2013-10-03 Thread Sebastian Wiesner
2013/9/30 Sebastien Vauban sva-n...@mygooglest.com:
 A partly manual solution would be to use tags for which sections to export in
 which backend, make a sparse tree with the backend you're interested to 
 export,
 and export what's visible?

I am by far not an Org mode expert, and have never used sparse trees.
Would you mind to point me to the appropriate manual section, or give
me some details on how to create a sparse tree matching a specific tag
only?



[O] Limit subtree to a specific export backend

2013-09-30 Thread Sebastian Wiesner
Hello,

can I limit a subtree to be exported with specific backends only?
I.e. only to HTML, but not Texinfo or LaTeX?

Background:  I am trying to simplify the documentation of one of my
projects, and combine the website and the user manual into a single
document.  Naturally, there is some content on the website that should
not appear in the manual and vice versa.

So long,
Sebastian Wiesner



Re: [O] HTML export and info: links

2013-07-03 Thread Sebastian Wiesner
2013/7/3 Bastien b...@gnu.org:
 Hi Sebastian,

 Sebastian Wiesner lunary...@gmail.com writes:

 Hardly the answer I hoped to get.

 Please let us know the answer you hoped to get, it will
 surely help us giving it :)

Uh, I hoped for a “easy, just toggle that customize setting” sort of
answer, not the “well, write it yourself” one ;)  More precisely I had
hoped for an easy way to plug Texinfo's HTML Xref Configuration [1]
into Org, which would have given proper HTML links for free.

I'll put Org mode migration of said manual on hold, for I currently
lack the time to write a proper link exporter myself.  I might get
back to it later, and look into the details of Texinfo's system, but I
can't promise anything.  I'll probably just stick to Texinfo, until
someone else does the dirty work ;)

Anyway, thank you for your answer, and please excuse the rather harsh
brevity of my previous answer.

Sebastian Wiesner

[1]: 
http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Configuration.html#HTML-Xref-Configuration



Re: [O] HTML export and info: links

2013-07-03 Thread Sebastian Wiesner
2013/7/3 Bastien b...@gnu.org:
 Hi Sebastian,

 Sebastian Wiesner lunary...@gmail.com writes:

 I'll put Org mode migration of said manual on hold, for I currently
 lack the time to write a proper link exporter myself.

 I gave this a closer look: one problem is that info links are relative
 to the user installation.

 For example [[info:internals#Top]] goes to the XEmacs manual, but
 there is no information about XEmacs in the link itself.

Texinfo deals with problem by mapping Info manual names to URLs of
corresponding online HTML manuals, see the link in my previous post.
The built-in manual database of Texinfo is pretty comprehensive, and
covers almost all GNU manuals, and some more.  It'd be totally
sufficient for my use case.

Ideally the HTML exporter would consult this database when exporting
info links, to find out where the corresponding HTML manual is
published.



Re: [O] HTML export and info: links

2013-07-03 Thread Sebastian Wiesner
2013/7/3 Bastien b...@gnu.org:
 Sebastian Wiesner lunary...@gmail.com writes:

 Ideally the HTML exporter would consult this database when exporting
 info links, to find out where the corresponding HTML manual is
 published.

 I see, thanks.  Is it safe to assume that htmlxref.cnf will always
 be located in /usr/share/texinfo/?  E.g. is it for you?

It's not actually located there at all.  My Texinfo is installed via
Homebrew into ~/.homebrew, hence my htmlxref.cnf is  at
~/.homebrew/share/texinfo/htmlxref.cnf.  There is no
/usr/share/texinfo/htmlxref.cnf.

Texinfo doesn't read a single file anyway, but all of these, and
merges them into a single file.  For my manual, I use an additional
htmlxref.cnf right next to the .texi source to add some missing
links.

The Org exporter should take all of these files, and merge them by the
same rules.  For system-wide configuration files, it should either try
to get the right prefix out of the makeinfo executable in
exec-path (as returned by executable-find), or take the list of
files from a customization option.  The latter is probably easier, and
more predictable to the user.

Implementing this likely amounts to a fair bit of work, which I was
somewhat disappointed to learn that Org doesn't do it already :)



Re: [O] HTML export and info: links

2013-07-03 Thread Sebastian Wiesner
2013/7/3 Bastien b...@altern.org:
 Well, that's too much work for me now.  Hopefully someone who needs
 this can help too.

I'll probably give it a shot, depending on how much free time I can
find in the next weeks.

You said, you might incorporate such an extension into Org, but isn't
Org covered by Copyright Assignments?



Re: [O] HTML export and info: links

2013-07-03 Thread Sebastian Wiesner
2013/7/3 Bastien b...@altern.org:
 Sebastian Wiesner lunary...@gmail.com writes:

 2013/7/3 Bastien b...@altern.org:
 Well, that's too much work for me now.  Hopefully someone who needs
 this can help too.

 I'll probably give it a shot, depending on how much free time I can
 find in the next weeks.

 Great, thanks.

Don't thank me yet, I can't promise anything :)

 You said, you might incorporate such an extension into Org, but isn't
 Org covered by Copyright Assignments?

 Yes, see this:
 http://orgmode.org/cgit.cgi/org-mode.git/plain/request-assign-future.txt

Is there a single assignment for just one specific patch?  I am not
going to assign the FSF copyright for any and every future change to
Emacs I might create.



Re: [O] HTML export and info: links

2013-07-03 Thread Sebastian Wiesner
2013/7/3 Bastien b...@altern.org:
 Sebastian Wiesner lunary...@gmail.com writes:

 Is there a single assignment for just one specific patch?  I am not
 going to assign the FSF copyright for any and every future change to
 Emacs I might create.

 The FSF policy is that you cannot assign your copyright for just one
 patch, you assign it for future changes too.

This is unfortunate.  I am sorry, but under this circumstances I won't
contribute to Org mode.  I may still implement support for Info links,
but it's won't become part of Org mode, as long as I am required to
sign an assignment of such broad and unlimited scope.  I am not going
to get myself into legal trouble for such a comparatively small thing.



Re: [O] HTML export and info: links

2013-07-02 Thread Sebastian Wiesner
2013/6/30 Bastien b...@gnu.org:
 Hi Sebastian,

 Sebastian Wiesner lunary...@gmail.com writes:

 how can I customize info: links in HTML output?

 Look at org-info.el in the source code.

 You can extend

   (org-add-link-type info 'org-info-open)

 into

   (org-add-link-type info 'org-info-open org-info-export)

 and write a new `org-info-export' that will take care of
 exporting info links correctly in the backends you decide.

 See `org-bbdb-export' or `org-docview-export' for examples
 of such functions -- if you write `org-info-export', we
 might be interested in integrating it into Org!

Hardly the answer I hoped to get.   I'll stick to Texinfo for now…



[O] HTML export and info: links

2013-06-28 Thread Sebastian Wiesner
Hello,

how can I customize info: links in HTML output?

I'd like replace info: links with HTML links to the corresponding
upstream manuals, such as
http://www.gnu.org/software/emacs/manual/html_node/emacs/Commands.html#Commands
for an info link info:emacs#Commands, just like in Texinfo HTML
output. However, I cannot find a way to achieve this.

I'm trying to port the Texinfo manual of a project of mine to Org,
which worked quite well so far, but now I am stuck.  Proper info:
link handling is really important to me.  I don't have many info:
links, but each of these is important and must be rendered properly in
both, Texinfo and HTML output.

Greetings,
Sebastian Wiesner



Re: [O] Online manual

2013-02-24 Thread Sebastian Wiesner
2013/2/24 Mike McLean mike.mcl...@pobox.com:

 On Feb 24, 2013, at 11:03 AM, Sebastian Wiesner lunary...@gmail.com wrote:

 Hello,

 how is the online manual of Org mode [1] rendered?  Especially, how is
 the awesome table of contents on the right sight created?

 It is done through CSS and I do something similar with most of my HTML 
 exports. I have a custom CSS that I load by having the following in every Org 
 file.

So is the Org manual written in Org?  I thought it was written in
Texinfo.  After all, there is a Texinfo document in the Org sources
[1]. Is this Texinfo document generated from some Org document?
Generally, can Org be exported to Texinfo/Info?

[1]: http://orgmode.org/cgit.cgi/org-mode.git/tree/doc/org.texi

 #+begin_example
 #+HTML_STYLE: link rel=stylesheet type=text/css 
 href=/Users/mlm/Documents/OrgMaster/org/css/org-html.css /
 #+end_example

 Into my custom CSS I copied the TOC CSS from the Org mode home page (see 
 below). I may have altered it slightly from what is on Org for colors and 
 such, but I don't recall.

 #+begin_example
 @media screen {

 /* TOC inspired by http://jashkenas.github.com/coffee-script */
 #table-of-contents {
 font-size: 10pt;
 position: fixed;
 right: 0em;
 top: 0em;
 background-color: #F3F5F7;
 -webkit-box-shadow: 0 0 1em #77;
 -moz-box-shadow: 0 0 1em #77;
 -webkit-border-bottom-left-radius: 5px;
 -moz-border-radius-bottomleft: 5px;
 text-align: right;
 /* ensure doesn't flow off the screen when expanded */
 max-height: 80%;
 overflow: auto;
 }

 #table-of-contents h2 {
 font-size: 10pt;
 max-width: 10em;
 text-decoration: underline;
 padding-left: 0.5em;
 padding-left: 0.5em;
 padding-top: 0.05em;
 padding-bottom: 0.05em;
 margin-bottom: 15px;
 border: none;
 }

 #table-of-contents ul {
 list-style-type: none;
 }

 #table-of-contents #text-table-of-contents {
 display: none;
 text-align: left;
 }

 #table-of-contents:hover #text-table-of-contents {
 display: block;
 padding: 0.5em;
 margin-top: -1.5em;
 }
 }

 @media print {
 /* TOC inspired by http://jashkenas.github.com/coffee-script */
 #table-of-contents {
 font-size: 10pt;
 background: white;
 }

 #table-of-contents h2 {
 font-size: 10pt;
 max-width: 10em;
 text-decoration: underline;
 padding-left: 0.5em;
 padding-left: 0.5em;
 padding-top: 0.05em;
 padding-bottom: 0.05em;
 margin-bottom: 15px;
 border: none;
 }

 #table-of-contents ul {
 list-style-type: none;
 }

 #table-of-contents #text-table-of-contents {
 text-align: left;
 }

 #table-of-contents:hover #text-table-of-contents {
 display: block;
 padding: 0.5em;
 margin-top: -1.5em;
 }

 }
 #+end_example