Re: [O] org babel, ess, R

2017-07-01 Thread Vikas Rawal
> 
>> When I press C-c' in an R code block to open an edit buffer with ess, on my
>> computer, it splits the screen into two side-by-side windows, with the new
>> window on the right showing the edit buffer, and the window on the left
>> showing the original file.
>> 
>> I would like to change this behaviour in two ways.
>> 
>> 1. I would like the window that continues to show the original file to
>> instead show the R session in which lines from the edit buffer can be
>> evaluated. I can manually change the buffer in this window to show me the R
>> session but I was wondering if this can be the default behaviour.
> 
> I fail to see how this could be a default behaviour since this is very
> specific to R source blocks.
> 

Isn’t is what most users need while editing the code block? The possibility of 
evaluating the code to test and see what happens? At present, one window shows 
the original buffer, which is, at least in my case, not needed while I am 
editing the code.

Is this an R specific need? Do people working with other languages not need 
this?


> I suggest to implement your own `org-edit-special' wrapper, and bind it
> to C-c ' (or advise the function).
> 


Thanks for the pointer. Let me look at this.

Thanks and best wishes,

Vikas




Re: [O] Bug: Org loses data if the user types C-u C-c C-c while composing a state change note [9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/)]

2017-07-01 Thread Samuel Wales
random observations/ideas to be ignored or possibly considered:

  - iirc note taking uses after command hook or so, which felt
bug-inviting to me
  - note taking is like capture
  - could use similar or same mechanism, with indirect buffer and user
settings [i favor c-c c-c :]]

is it possible to make note taking /be/ capture?  never mind if this
is what nicolas meant to imply.



Re: [O] org-protocol documentation

2017-07-01 Thread Mario Martelli

>> I’m not happy with that there is so much information - although
>> outdated - in the old Worg documentation which might be hidden to the
>> reader.
> 
> Note that most of this documentation is available through other
> means, AFAIU.

Ok, what I meant are the readers who are not able to use Google ;)

> You probably missed my remark about this part. I think each sub-protocol
> should be introduced in a similar way.

I misinterpreted the meaning. I do not really like to begin each sentence with 
the same phrase. But I got it eventually that it's a manual ;)

>> +Two functions can help you fill @code{org-protocol-project-alist} with valid
>> +contents: @code{org-protocol-create} and @code{org-publish-project-alist}.  
>> The
>> +latter is of use if you're editing an Org file that is part of a
>> +publishing project.
> 
> Though, I'm puzzled, `org-publish-project-alist' is a variable, not a 
> function.

Don’t know what happened there. Repaired.

>> +Org protocol is triggered by @file{emacsclient}. If you want to use Org
>  ^^^
> Gotcha
> 
>> +protocol, there are many possibilities to do so.  You can invoke emacsclient
>> +by a shortcut on your desktop for example. Or by adding a bookmark to your 
>> browser.
>^^^
>   Ditto

This one I do not understand.
I use now @file{emacsclient} consistently if that was the meaning of the 
comment.

> This is the trick part. We need to feed the index.

>@cindex Installing Org protocol

>  @vindex org-protocol-project-alist

>  @findex org-protocol-project-alist

I started this whole thing because I wanted to learn elisp. But learning 
texinfo en-passant is nice :)




0001-org.texi-Basic-Org-protocol-documentation-is-added.patch
Description: Binary data


0002-org.texi-Fixes-missing-space-after-dot.patch
Description: Binary data


0003-org.texi-Minor-changes-and-added-index-to-org-protoc.patch
Description: Binary data


(second patch attached out of consistency reasons)

Kind regards
Mario
— 




Re: [O] Bug: Org loses data if the user types C-u C-c C-c while composing a state change note [9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/)]

2017-07-01 Thread Kyle Meyer
Nicolas Goaziou  writes:

[...]

> FWIW, long ago, I added
>
>   (defun ngz-org-capture-hook-handler ()
> (define-key org-capture-mode-map "\C-x\C-s" 'org-capture-finalize)
> (define-key org-capture-mode-map "\C-c\C-c" 'org-ctrl-c-ctrl-c))
>   (add-hook 'org-capture-mode-hook 'ngz-org-capture-hook-handler)
>
> to my config file. I'm pretty happy with it.
>
> One solution would be to have C-x C-s (or some other binding, I don't
> really mind) calling `org-finish-function' instead of the very busy C-c
> C-c. 
>
> C-x C-s makes sense as Log buffers are not attached to any file, so
> `save-buffer' is morally equivalent to C-x C-w, aka `write-file'.
>
> Fellow Orgers, WDYT?

On the master branch, I'd be in favor of making a separate command for
calling org-finish-function and binding it to C-x C-s.  I'd also be OK
with changing org-capture-finalize's binding to C-x C-s.

On maint, can this issue be solved by just removing the prefix argument
check from org-store-log-note?  AFAICS, the prefix argument behavior
isn't documented anywhere, and the same behavior is already available
through org-kill-note-or-show-branches (C-c C-k).

-- 
Kyle



Re: [O] Org mode version 9.0.9 (9.0.9-elpaplus @ /home/jorge/.emacs.d/elpa/org-plus-contrib-20170622/); Org lost my state change note during idle clock resolution

2017-07-01 Thread Nicolas Goaziou
Hello,

Jorge Morais Neto  writes:

> I changed the TODO state and started composing a state change note.
> Later I clocked in a certain task (automatically clocking out of the
> previous) and left the computer.  When I returned, some 32 min later,
> Org was showing clock idle time resolution.  I typed "i" to consider the
> idle time as clock time.  The clock idle time resolution did its job,
> but Org lost my note draft and the window configuration from before the
> TODO state change.  winner-undo could not restore the window
> configuration and AFAIK I had no way to recover the note.

Even if the window configuration is lost, I cannot see how the "*Org
Note*" buffer could be closed. Are you certain it was not accessible
anymore from the buffer list?

> In two days this is the second time Org loses a TODO state change note
> draft.  I guess that, if I realize the note will take time to compose, I
> am supposed to compose it in some file and, only when it is ready,
> change state and yank it.

Note that I answered to your previous report. I'm still waiting from
feedback from the Org community.

Regards,

-- 
Nicolas Goaziou



Re: [O] org-protocol documentation

2017-07-01 Thread Nicolas Goaziou
Nicolas Goaziou  writes:

> Mario Martelli  writes:

>> outdated - in the old Worg documentation which might be hidden to the
>> reader.
>
> Note that

Ahem. Note that most of this documentation is available through other
means, AFAIU.



Re: [O] org-protocol documentation

2017-07-01 Thread Nicolas Goaziou
Mario Martelli  writes:

>> Genuine question: is this documentation actually complete enough to use
>> the feature?
>
> I suppose so, if one knows how to configure URL handlers on their OS.
> Of course there are some things missing from the documentation. But
> it’s more than we have at the moment :)

That is true.

> I’m not happy with that there is so much information - although
> outdated - in the old Worg documentation which might be hidden to the
> reader.

Note that

> +Org protocol comes with three predefined handlers:
> +@table @asis
> +@item @code{org-protocol-store-link}
> + Triggered through the sub-protocol @code{store-link}.  Store a
> +link and push the URL to the kill-ring.
> +@item @code{org-protocol-capture}
> + Fill a @code{capture} buffer with information gathered somewhere
> +else.  This handler is triggered through the @code{capture} sub-protocol and
> +uses the function @code{org-capture}.
> +@item @code{org-protocol-open-source}
> + @code{open-source}.  Map a URL to local filename.  Use this to open
> +sources of already published contents in Emacs for editing.

You probably missed my remark about this part. I think each sub-protocol
should be introduced in a similar way.

> +@end table
> +
> +@node Setting up Org protocol
> +@subsection Setting up Org protocol

This is the trick part. We need to feed the index. For example, we could
add the following right below the @subsection line

@cindex Org protocol, set-up
@cindex Installing Org protocol

Feel free to adapt.

> +You need to set up a custom URL handler on your system to trigger Emacs by a
> +URL.  This URL handler could be already installed by Emacs.  Please consult 
> the
> +handbook of your operating system how to install a custom URL handler if you
> +need to.
> +
> +To map a website with @code{open-source} to local files you have to set up
> +the mapping in @code{org-protocol-project-alist}.

Just above this paragraph, you need

  @vindex org-protocol-project-alist

> +For example, in order to open files published on Worg locally, you can set
> +@code{org-protocol-project-alist} to the following
> +
> +@lisp
> +(setq org-protocol-project-alist
> +  '(("Worg"
> +  :base-url "http://orgmode.org/worg/";
> +  :working-directory "/home/user/worg/"
> +  :online-suffix ".html"
> +  :working-suffix ".org")))
> +@end lisp
> +
> +Two functions can help you fill @code{org-protocol-project-alist} with valid
> +contents: @code{org-protocol-create} and @code{org-publish-project-alist}.  
> The
> +latter is of use if you're editing an Org file that is part of a
> +publishing project.

Just above this paragraph, we need

  @findex org-protocol-project-alist
  @findex org-protocol-create

Though, I'm puzzled, `org-publish-project-alist' is a variable, not a function.

> +@node Using Org protocol
> +@subsection Using Org protocol

See above about the @cindex:

  @cindex Org protocol, usage
  ...

> +Org protocol is triggered by @file{emacsclient}. If you want to use Org
  ^^^
 Gotcha
 
> +protocol, there are many possibilities to do so.  You can invoke emacsclient
> +by a shortcut on your desktop for example. Or by adding a bookmark to your 
> browser.
^^^
   Ditto

> +@table @asis
> +@item @code{org-store-link}
> +  store a link, insertable through @kbd{M-x org-insert-link} and

 -> Store
 
> Subject: [PATCH 2/2] org.texi: Fixes missing space after dot.
>
> * org.texi Minor change regarding missing space

Good catch. Applied. Thank you.

Regards,



Re: [O] [Chris Kauffman] Re: include org-table-move-single-cell.el in org mode

2017-07-01 Thread Nicolas Goaziou
Uwe Brauer  writes:

> Before I contact Chris, what additional documentation (besides doc
> strings) entries in info files?

Docstrings, org.texi, and an entry in ORG-NEWS. That's about it.

> and what sort of tests?

See "test-org-table.el" in testing/lisp/ directory. In particular, see
`test-org-table/move-row-down', added recently.

Regards,



Re: [O] causing work by pasting links

2017-07-01 Thread Mario Martelli
Hi,

> *   before i paste a link i type [[
> * [[|]]   this leaves the point right there.
> 
> then i paste and now i want to press [ to write my notes.
> 

Did you try ‘org-insert-link’? Should be less typing.

rgrds
Mario
— 



smime.p7s
Description: S/MIME cryptographic signature


Re: [O] Parsing property drawers in subtree scope exports

2017-07-01 Thread Nicolas Goaziou
Kaushal Modi  writes:

> I didn't follow that. Do you mean that the "EXPORT_" is a special
> prefix?

I do. See (info "(org) Export settings").

> Should that be added to these?
>
> =
> :options-alist '((:hugo-front-matter-format "HUGO_FRONT_MATTER_FORMAT" nil
> org-hugo-front-matter-format)
> (:hugo-tags "HUGO_TAGS" nil nil)
> =

If you set this, you can access to EXPORT_HUgo_TAGS property
with :hugo-tags.

> I already tried above, but I don't know how to get the ":HUGO_TAGS" value
> from the property drawer, in subtreep export only, in the body filter (with
> only body and info available).

(plist-get info :hugo-tags)

> Otherwise, you simply need to retrieve it and store it before calling
>> `org-export-to-file' or whatever.
>
>
> Hmm, will give this a try.. may be look at the pre export hook?

You can also do that, if you don't use the "EXPORT_" prefix above.
However, you need to expand the buffer first, because it will be
narrowed to the current subtree.

Regards,



Re: [O] [Chris Kauffman] Re: include org-table-move-single-cell.el in org mode

2017-07-01 Thread Uwe Brauer

   > Hello,
   > Uwe Brauer  writes:


   > Thank you for the heads-up.

   > I see no objection to this. I can be useful sometimes.

   > However, the feature would require documentation and a couple of simple
   > tests. Would Chris, or someone else, be willing to do that?

Before I contact Chris, what additional documentation (besides doc
strings) entries in info files? and what sort of tests?

regards


Uwe 



Re: [O] :noweb from external file

2017-07-01 Thread edgar

On 2017-06-24 06:03, ed...@openmail.cc wrote:

On 2017-06-22 22:08, ed...@openmail.cc wrote:


Right now, I can only do it like this:

../dir2/file3.org
==
#+INCLUDE: ../dir1/file1.org::py-numpy
#+NAME: py-noweb
#+CAPTION: Loading Numpy and Matplotlib onto Python.
#+BEGIN_SRC python :results none :noweb yes
<>
#+END_SRC
==



I'm sorry. This is not working either. I am not trying to waste your
time, I promise: it was working at some point.

Thanks again.


* Contribution: Script to convert directory with source to an org-file
So, by now, everybody knows that I don't understand squat about lisp. 
Yet, I created a little bash script (for which there may be an 
alternative already) to convert a directory with source files (in 
Python) to source blocks within an Org file. It should be easily 
adaptable to other languages. I hope that it is useful to someone. See 
attachment.


* Question
The reason for which I reply to this thread is that it can serve in the 
case that one wishes to use (org-babel-lob-ingest "path/to/file.org"). I 
would like to know if loading such a file every time I start Emacs (with 
my init file) will slow the startup. Thanks, and sorry if it is a stupid 
question.


* Request (or how to, if exists)
Does anybody know how to achieve this?:
- inherit fill-column When C-c ' to edit source

  it would be nice if the new temporary buffer
  had the same fill-column as the one that
  spawns it

Thanks for this too.

-

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!  This code helps to convert a directory with Python
files into an org-mode file with code
blocks. Change the value of :dir if you want
another path. Do ~C-c C-c~ or ~C-c C-v C-e~
(~org-babel-execute-maybe~) on the next block. It
will (hopefully) generate a file named
*code-blocks.org* which you could (possibly) use to
load into the Library of Babel by doing
~M-:(org-babel-lob-ingest "path/to/file.org")~

#+HEADER: :results none
#+BEGIN_SRC bash :dir ./
  #!/bin/bash
  # * Set a general configuration
  cat << EOF > code-blocks.org;
  All my functions are in this file. If you want
  to create individual files, run
  ~M-x org-babel-tangle~.
  Make sure that there is a directory for each heading.

  ,* License
  EOF
  cat LICENSE.txt >> code-blocks.org
  cat <> code-blocks.org

  ,* Configuration   :noexport:ARCHIVE:

  When exporting, print table of contents,
  author and date
  ,#+OPTIONS: toc:t author:t date:t

  When opening this file, visually indent lines
  according to headers
  ,#+STARTUP: indent hidestars

  By default, set Python blocks to run with Python 3,
  do not evaluate when exporting (quick) and work
  in a dedicated session.
  ,#+PROPERTY: header-args:python ":python python3 :eval no-export :session


  EOF
  printf "* Code to generate this file\n" >> code-blocks.org;
  cat dir-to-org-babel.org >> code-blocks.org;
  printf "\n" >> code-blocks.org;
  # * Loop over the contents of the current
  # directory (having two nested while IFS... seemed
  # too much, but may be a more efficient way)
  for dir in *; do
  # ** Make sure that we will look into directories
  if [[ -d "$dir" ]] && [[ ! "$dir" =~ "Moose" ]]; then
  # *** Make the name of the sub-dir a heading
  printf "* $dir\n";
  # ** Loop over the files of the current sub-dir
  # https://stackoverflow.com/a/301059 this
  # is safe (requires that ~find~ can use
  # ~-print0~)
  while IFS= read -r -d '' file; do
  # *** Print file only if it has code
  #  Get number of lines with awk
  numl=$(awk 'END{print NR}')
  if [[ "$numl" -gt 0 ]]; then
  # *** Print the file names (in quotation
  # format; with spaces like \ )
  printf '** %q\n' "${file##./}" |
  sed "s-$dir/--";
  # *** Print a name for the block,
  # substitute slashes with dashes,
  # remove ./
  #  Create prototype for name
  a=py-$(printf "$file" |
sed 's_\./__g; s_/_-_g')
  #  Print name header
  printf "#+NAME: $a\n"
  # *** Print a caption for the block
  # (use same prototype as the name)
  printf "#+CAPTION: $a\n";
  # *** Print start of the block
  printf "#+BEGIN_SRC python :tangle $file\n";
  cat "$file";
  # *** Print end of block
  printf "#+END_SRC\n\n";
  else
  printf "\n";
  fi;
  done < <(#  List all files that end

Re: [O] :noweb from external file

2017-07-01 Thread edgar

On 2017-07-01 06:53, ed...@openmail.cc wrote:

* Contribution: Script to convert directory with source to an org-file
So, by now, everybody knows that I don't understand squat about lisp.
Yet, I created a little bash script (for which there may be an
alternative already) to convert a directory with source files (in
Python) to source blocks within an Org file. It should be easily
adaptable to other languages. I hope that it is useful to someone. See
attachment.



Oops, missed the name file in the awk line

modified   dir-to-org-babel.org
@@ -58,7 +58,7 @@ load into the Library of Babel by doing
   while IFS= read -r -d '' file; do
   # *** Print file only if it has code
   #  Get number of lines with awk
-  numl=$(awk 'END{print NR}')
+  numl=$(awk 'END{print NR}' "$file")
   if [[ "$numl" -gt 0 ]]; then
   # *** Print the file names (in quotation
   # format; with spaces like \ )

-

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

2017-07-01 Thread Mario Martelli
Hi,

>> Any comments?
> 
> Always ;)

:-)

> Are there really two functions? You only
> document one.

Hope it’s clearer now.

> Genuine question: is this documentation actually complete enough to use
> the feature?

I suppose so, if one knows how to configure URL handlers on their OS. Of course 
there are some things missing from the documentation. But it’s more than we 
have at the moment :)

I’m not happy with that there is so much information - although outdated - in 
the old Worg documentation which might be hidden to the reader. 

Anyway, I hope I’ve correctly incorporated all your comments.




0001-org.texi-Basic-Org-protocol-documentation-is-added.patch
Description: Binary data


0002-org.texi-Fixes-missing-space-after-dot.patch
Description: Binary data


Kind regards
Mario
— 



Re: [O] Parsing property drawers in subtree scope exports

2017-07-01 Thread Kaushal Modi
Hello,

On Sat, Jul 1, 2017, 3:48 AM Nicolas Goaziou  wrote:

>
> You can write it :EXPORT_FOO: and define it in the back-end options.
>

I didn't follow that. Do you mean that the "EXPORT_" is a special prefix?
Or "EXPORT" is any backend prefix I choose?

Should that be added to these?

=
:options-alist '((:hugo-front-matter-format "HUGO_FRONT_MATTER_FORMAT" nil
org-hugo-front-matter-format)
(:hugo-tags "HUGO_TAGS" nil nil)
=

I already tried above, but I don't know how to get the ":HUGO_TAGS" value
from the property drawer, in subtreep export only, in the body filter (with
only body and info available).

If it is a full document export, I can use the "org export parse headlines"
function (forgot the name, on the phone at the moment) to get the
properties from each headline. But the same doesn't work when exporting
just one sub-tree.

Otherwise, you simply need to retrieve it and store it before calling
> `org-export-to-file' or whatever.


Hmm, will give this a try.. may be look at the pre export hook?

Thank you.
-- 

Kaushal Modi


Re: [O] org babel, ess, R

2017-07-01 Thread Nicolas Goaziou
Hello,

Vikas Rawal  writes:

> When I press C-c' in an R code block to open an edit buffer with ess, on my
> computer, it splits the screen into two side-by-side windows, with the new
> window on the right showing the edit buffer, and the window on the left
> showing the original file.
>
> I would like to change this behaviour in two ways.
>
> 1. I would like the window that continues to show the original file to
> instead show the R session in which lines from the edit buffer can be
> evaluated. I can manually change the buffer in this window to show me the R
> session but I was wondering if this can be the default behaviour.

I fail to see how this could be a default behaviour since this is very
specific to R source blocks.

I suggest to implement your own `org-edit-special' wrapper, and bind it
to C-c ' (or advise the function).

Regards,

-- 
Nicolas Goaziou



Re: [O] Controlling new line characters during tangle

2017-07-01 Thread Nicolas Goaziou
Hello,

Giacomo M  writes:

> Ok, rudimentary elisp knowledge seems to help here:
>
> #+BEGIN_SRC emacs-lisp
> (defun jack/dos2unix-post-tangle-hook ()
> (set-buffer-file-coding-system 'unix 't)
> (save-buffer)
> )
> (add-hook 'org-babel-post-tangle-hook 'jack/dos2unix-post-tangle-hook)
> #+END_SRC

Thank you for sharing.

Would it make sense to provide a :tangle-coding-system attribute? Would
you want to implement it?

Regards,

-- 
Nicolas Goaziou



Re: [O] bug?

2017-07-01 Thread Nicolas Goaziou
Hello,

John Kitchin  writes:

> All I thought should happen is that the invisible text adjacent to the
> point would be edited (except for the {}). Other than the edge case
> where there is no first headline, it seems to work ok as far as I can
> tell.

Oops. I thought I had fixed it, but it wasn't the case. Done now.

My question is still open: what could this function do, if anything,
close to invisible text per properties (i.e., a link or
sub/superscript)?

I'm not even sure there is something clever to do. A few months ago,
I wanted to solve the problem differently, and suggested to display
"[[path][desc]]" as "[desc]" instead of just "desc". It wasn't so well
received. Admittedly, it adds cruft to the buffer.

Someone suggested to have the link expand whenever the point was over
it, but it was a time-consuming process and it would cause the text to
jump around.


Regards,

-- 
Nicolas Goaziou



Re: [O] Android sync client

2017-07-01 Thread Eric S Fraga
On Friday, 30 Jun 2017 at 15:07, Gour wrote:
> Mostly/only tasks (TODO/NEXT items) appearing in my Agenda view…I’ll try
> to make org-caldav working for calendar entries…

Do you need full 2-way synchronisation or would you want more one way
versus the other?  I ask because I am more concerned about retrieving
items from other places to put in my org files as I live in emacs most
of the time.  For that use case, I use an awk script to convert ICS
format files to org.  I can send you that if you wish.

Org will also export to ICS but I am not sure how it handles TODO
items.  It works fine for scheduled items, however.

-- 
: Eric S Fraga via Emacs 26.0.50, Org release_9.0.9-551-g92e8c8


signature.asc
Description: PGP signature


Re: [O] org-protocol documentation

2017-07-01 Thread Nicolas Goaziou
Hello,

Mario Martelli  writes:

> I created a pretty short documentation of org-protocol. It’s still
> mainly copied from the old documentation. But distilled :)

Thank you.

> It might be an idea to link to the old documentation at worg.

I'd rather not do that. Ideally, Org internal documentation should be
self-contained.

> Any comments?

Always ;)

> +Org protocol comes with three predefined handlers:
> +@table @asis
> +@item @code{org-protocol-store-link}
> + triggered through the sub-protocol @code{store-link}.  Stores an
> +Org-link and pushes the URL to the kill-ring.

triggered -> Triggered

Stores -> Store

pushes -> push

Org-link -> Org link -> link (since we can assume in an Org manual,
links default to Org link).

> +@item @code{org-protocol-capture}
> + Fill a @code{capture} buffer with information gathered somewhere
> +else.  This handler is triggered through the @code{capture} sub-protocol and
> +uses the function @code{org-capture}.

This should be consistent with the previous wording, e.g.:

Triggered through the sub-protocol @code{capture}. Fill
a @samp{Capture} buffer with ... calling @code{org-capture}
function.

> +@item @code{org-protocol-open-source}
> + @code{open-source}.  Maps URLs to local filenames.  Use this to open
> +sources of already published contents in Emacs for editing.

See above.

> +To configure handling of @code{open-source} the location of the website and 
> the
> +location of the corresponding source must be configured.  In addition the 
> mapping
> +needs to be defined.

I suggest to rewrite this using a more direct style.

> +To open files published on Worg locally, @code{org-protocol-project-alist}
> +should look like this.

  For example, in order to open files published on Worg locally, you can
  set @code{org-protocol-project-alist} to the following

> +@lisp
> +(setq org-protocol-project-alist
> +  '(("Worg"
> +  :base-url "http://orgmode.org/worg/";
> +  :working-directory "/home/user/worg/"
> +  :online-suffix ".html"
> +  :working-suffix ".org")))
> +@end lisp
> +
> +There are two functions to help you fill @code{org-protocol-project-alist} 
> with
> +valid contents. One possibility is @code{org-protocol-create} that guides 
> you through

Missing space after dot.  Are there really two functions? You only
document one.

Also, more direct:

  Two functions can help you filling... @code{org-protocol-create}
  guides...

> +the process. If you're editing an Org-mode file that is part of a publishing

Missing space.

Also, 

  Org-mode file -> Org file

> +project in @code{org-publish-project-alist}, try
> +
> +@example
> +M-x org-protocol-create-for-org RET
> +@end example

  @example
  @kbd{M-x org-protocol-create-for org @key{RET}}
  @end example

But is the example really necessary?

> +@node Using Org protocol
> +@subsection Using Org protocol
> +
> +To actually use org-protocol add a bookmark to your browser.

  org-protocol -> Org protocol

Is Org protocol really limited to bookmarks in browsers?

> +Here is the URL to use as @emph{Location} for browser bookmarks.  Just 
> remove the
> +line breaks and replace @code{sub-protocol} with the real sub-protocol to 
> use:
> +
> +@example
> +javascript:location.href='org-protocol://sub-protocol?
> +template=x&url='+encodeURIComponent(window.location.href)+
> +'&title='+encodeURIComponent(document.title)+
> +'&body='+encodeURIComponent(window.getSelection());
> +@end example
> +
> +This URL may be used for all three standard handlers in
> +@code{org-protocol.el}.  Some of the values will be ignored,
> +e.g. @code{store-link} will use the URL and title only.

will be ignored -> are ignored

will use -> uses

> +@table @asis
> +@item @code{org-store-link}
> +  stores an Org-link insertable through @code{M-x org-insert-link} and
> +  pushes the URL found onto the kill-ring for yanking.
> +  The sub-protocol used is @code{store-link}:

  stores an Org-link -> Store a link

  @kbd{M-x org-insert-link}

  pushes -> push

> +@example
> +emacsclient org-protocol://store-link?url=URL&title=TITLE
> +@end example
> +
> +will store this Org-link:

will store this Org-link > stores the following link

> +@example
> +[[URL][TITLE]]
> +@end example
> +
> +In addition, @code{URL} will be pushed on the kill-ring for yanking.

In addition, @samp{URL} is pushed...

> +You will have to encode @code{URL} and @code{TITLE} if

You will have to -> You need to (or something equivalent)

@samp{URL} ... @samp{TITLE}

> +they contain slashes, and probably quote those for the shell.
> +
> +To use this feature, add a bookmark with an arbitrary name, e.g.
> +@samp{Org: store-link} and enter this as @samp{Location}:
> +
> +@example
> +javascript:location.href='org-protocol://store-link?
> +   url='+encodeURIComponent(location.href);
> +@end example
> +
> +@item @code{org-capture}
> +This one is triggered through the sub-protocol @code{capture} and consumes up
> +to four dat

Re: [O] [rows?]

2017-07-01 Thread Nicolas Goaziou
Hello,

Uwe Brauer  writes:

> I tested it quite a bit yesterday. There was only one problem concerning
> pabbrev mode which scans the buffer periodically and this scanning did
> widen the columns at some point. One can try this out by running
> (pabbrev-scavenge-buffer) in an org buffer with columns being narrowed:
> the columns will widen. But I am not sure whether this is a bug of your
> implementation. I am happy with turning pabbrev mode off in org buffers
> with large table where I need to narrow.

I could not reproduce it. Columns are automatically expanded whenever
contents change in a field (and change is not wrapped within
`org-table-with-shrunk-columns'). AFAICT, `pabbrev-scavenge-buffer' uses
`with-silent-modifications' so that shouldn't happen.

> BTW what's about hiding rows? For very long tables (~100 and more rows)
> hiding can be convenient. I do that by running hide-region (a third
> package found in elpa). But maybe that feature could be included in org
> mode as well?

Hiding rows is a different beast. For example, it doesn't make sense to
have a feature to hide current row since Org rows are already
1 character high. So, we would only want to hide contiguous rows.

But then, the problem is that hlines may disappear and the formulas
could be more difficult to write (without using
`org-table-toggle-coordinate-overlays'). Perhaps we could only allow to
hide columns between 2 hlines. 

Do you have any idea about the interface of such functionality?

Regards,

-- 
Nicolas Goaziou



Re: [O] [Chris Kauffman] Re: include org-table-move-single-cell.el in org mode

2017-07-01 Thread Nicolas Goaziou
Uwe Brauer  writes:

> Thanks for your answer. I will ask him, if he does not want to do it, I
> might volunteer. What's about signing FSF copyright papers?

Good question. We will need them from both Chris and the person writing
the documentation.

Regards,



Re: [O] [Chris Kauffman] Re: include org-table-move-single-cell.el in org mode

2017-07-01 Thread Uwe Brauer

   > Hello,
   > Uwe Brauer  writes:


   > Thank you for the heads-up.

   > I see no objection to this. I can be useful sometimes.

   > However, the feature would require documentation and a couple of simple
   > tests. Would Chris, or someone else, be willing to do that?

Thanks for your answer. I will ask him, if he does not want to do it, I
might volunteer. What's about signing FSF copyright papers?

Regards

Uwe 



Re: [O] Capture template stopped working: nil

2017-07-01 Thread Nicolas Goaziou
Hello,

Bastien  writes:

> Nicolas Goaziou  writes:
>
>> Bastien Guerry  writes:
>>
>>> May I ask you why `eval' in the code base is problematic?
>>
>> Because 1. it is hideous, 2. it doesn't cope well with lexical
>> binding.
>
> Can you provide with an example on how `eval' can lead to trouble
> due to lexical binding for the org-capture configuration?
>
> I'm trying to understand.

I never said `eval' could lead to trouble due to lexical binding in Org
capture configuration. I said `eval' is a problem in the code base,
notwithstanding its location.

Moreover, allowing Sexp in a capture template is really abusing
homoiconicity of the language. As soon as the S-exp becomes mildly
complex, the resulting template is unreadable. OTOH, using a function
right from the start clarifies the structure of the template. The
occasional `(concat a b)' is not a sufficient reason, IMO, to allow
`eval' there. We should encourage saner practices.

>> Using `eval' should be made with extreme parcimony and for very
>> consensual reasons.
>
> Yes, but unless we fix a realistic bug, not bothering the user with
> backward-incompatible changes should take over IMHO.

Let's consider `eval' in the code base a coding design bug, then.
A clearer code base (e.g., more comments, less obscure variable names,
more expressive syntax) is something we should strive for.

Anyway, this is a rather small incompatible change we're talking about
here. In particular, it doesn't change document syntax. It's
a straightforward modification of some configuration. Not as bad as it
sounds, really. Note we already did the same for `org-file-apps' in Org
9.0 (although the reason was different).

Regards,

-- 
Nicolas Goaziou



Re: [O] minitocs not displaying in latex export

2017-07-01 Thread Sharon Kimble
Rasmus  writes:

> Sharon Kimble  writes:
>
>> I'm having great difficulties in getting minitocs appearing in my chapters. 
>> This is my preamble -
>
> Not quite answering your question, but did you try to use titletoc?
>
>  * Chapter
>
>  #+TOC: headlines 1 local 
>
> Note that the package has to be loaded before hyperref.  See also the
> manual under "Table of contents".
>

Thanks for this Rasmus.

I did try using 'titletoc' which didn't give such nice output as
'minitoc', so I set about finding out what the minitoc problem was.

Under TeX-live 2016 my document compiled perfectly with all 24 of its
minitocs, but it failed under TeX-live 2017. So I've sent a bug report
to the newsgroup that it only compiles 'doc.maf', 'doc.mtc' and
'doc.mtc0' and nothing else.

So hopefully it will soon be fixed.

Thanks
Sharon.
-- 
A taste of linux = http://www.sharons.org.uk
TGmeds = http://www.tgmeds.org.uk
DrugFacts = https://www.drugfacts.org.uk  
Debian 9.0, fluxbox 1.3.5-2, emacs 25.1.1, org-mode 9.0.7


signature.asc
Description: PGP signature


Re: [O] [Chris Kauffman] Re: include org-table-move-single-cell.el in org mode

2017-07-01 Thread Nicolas Goaziou
Hello,

Uwe Brauer  writes:

> I found swapping of cells very useful and came across some code written
> by Chris Kauffman, which proved to be very helpful and considerably
> shorted by workflow. 
>
> https://cs.gmu.edu/~kauffman/software/org-table-move-single-cell.el
>
>
> Chris agreed that his code could be included in the orgmode repo,  I
> have attached his mail.
>
> I recommend strongly to do that.

Thank you for the heads-up.

I see no objection to this. I can be useful sometimes.

However, the feature would require documentation and a couple of simple
tests. Would Chris, or someone else, be willing to do that?

Regards,

-- 
Nicolas Goaziou



Re: [O] Parsing property drawers in subtree scope exports

2017-07-01 Thread Nicolas Goaziou
Hello,

Kaushal Modi  writes:

> I have this test Org file:
>
> =
> * Title
> :PROPERTIES:
> :FOO: 123
> :END:
> Something
> =
>
> I am working on an exporter back-end, and I need to get the value of the
> :FOO property
> - During *subtree* export (C-c C-e C-s ..)
> - In the body filter fn. So I have only info and body at my access.
>
> I looked at ox-html.el for hints but that didn't help. In there too, the
> CUSTOM_ID property drawer (picked one example I knew) is not parsed during
> subtreep export.
>
> How can I do this?

It depends. 

You can write it :EXPORT_FOO: and define it in the back-end options.
Otherwise, you simply need to retrieve it and store it before calling
`org-export-to-file' or whatever.

Regards,

-- 
Nicolas Goaziou



[O] Parsing property drawers in subtree scope exports

2017-07-01 Thread Kaushal Modi
Hello,

I have this test Org file:

=
* Title
:PROPERTIES:
:FOO: 123
:END:
Something
=

I am working on an exporter back-end, and I need to get the value of the
:FOO property
- During *subtree* export (C-c C-e C-s ..)
- In the body filter fn. So I have only info and body at my access.

I looked at ox-html.el for hints but that didn't help. In there too, the
CUSTOM_ID property drawer (picked one example I knew) is not parsed during
subtreep export.

How can I do this?

Thanks.
-- 

Kaushal Modi