Re: [O] easy way to open include files

2018-02-07 Thread Yasushi SHOJI
On Thu, Feb 8, 2018 at 3:20 PM, Yasushi SHOJI  wrote:
> Is there any function / key bindings to open a included file?

I don't know what I was up to.

The manual says:

C-c '
Visit the include file at point.

Sorry for the noise.
-- 
  yashi



[O] easy way to open include files

2018-02-07 Thread Yasushi SHOJI
Hi,

Is there any function / key bindings to open a included file?

Let's say we have a.org which has:

* headline

#+INCLUDE: |b.org

and we are at "|", which indicates a cursor position.
How can I easily open "b.org"?
-- 
  yashi



Re: [O] [Bug] M-S Ret keybinding translated to M-Ret

2018-02-07 Thread Allen Li
On Wed, Feb 7, 2018 at 1:47 PM Matt Lundin  wrote:

> Matt Lundin  writes:

> > I discovered that when trying to insert a new item with a checkbox using
> > M-S Return (org-insert-todo-heading), the keybinding is "translated" to
> > M-Return (org-meta-return). As a result, all I get is simple list item
> > without a checkbox.
> >

> The attached patch fixes this issue.

I'm pretty sure your patch would break those binding in terminal Emacs
completely, since 
cannot be typed in the terminal and Emacs does not remap these bindings.

Furthermore, I cannot reproduce your issue on Org mode version 9.1.6
(9.1.6-33-g5b4a71-elpaplus)

C-h C-k M-S-

 runs the command org-insert-todo-heading (found in
org-mode-map), which is an interactive compiled Lisp function in
‘org.el’.

It is bound to .

(org-insert-todo-heading ARG  FORCE-HEADING)



Re: [O] [Bug] M-S Ret keybinding translated to M-Ret

2018-02-07 Thread Matt Lundin
Matt Lundin  writes:

> I discovered that when trying to insert a new item with a checkbox using
> M-S Return (org-insert-todo-heading), the keybinding is "translated" to
> M-Return (org-meta-return). As a result, all I get is simple list item
> without a checkbox.
>

The attached patch fixes this issue.

>From 240caa630ef053a27536fe9c4725d0480dc4c570 Mon Sep 17 00:00:00 2001
From: Matt Lundin 
Date: Wed, 7 Feb 2018 15:45:45 -0600
Subject: [PATCH] Fix return bindings

---
 lisp/org.el | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 688e48bcc..133bf038a 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -18859,11 +18859,11 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names."
 (define-key org-mode-map (kbd "") #'org-shifttab)
 
  RET key with modifiers
-(org-defkey org-mode-map (kbd "S-RET") #'org-table-copy-down)
-(org-defkey org-mode-map (kbd "M-S-RET") #'org-insert-todo-heading)
-(org-defkey org-mode-map (kbd "ESC S-RET") #'org-insert-todo-heading)
-(org-defkey org-mode-map (kbd "M-RET") #'org-meta-return)
-(org-defkey org-mode-map (kbd "ESC RET") #'org-meta-return)
+(org-defkey org-mode-map (kbd "S-") #'org-table-copy-down)
+(org-defkey org-mode-map (kbd "M-S-") #'org-insert-todo-heading)
+(org-defkey org-mode-map (kbd "ESC S-") #'org-insert-todo-heading)
+(org-defkey org-mode-map (kbd "M-") #'org-meta-return)
+(org-defkey org-mode-map (kbd "ESC ") #'org-meta-return)
 
  Cursor keys with modifiers
 (org-defkey org-mode-map (kbd "M-") #'org-metaleft)
-- 
2.16.1



Re: [O] :EXPORT_FILE_NAME: containing a date-stamp

2018-02-07 Thread Berry, Charles


> On Feb 7, 2018, at 9:37 AM, Kaushal Modi  wrote:
> 
> On Wed, Feb 7, 2018 at 12:22 PM Berry, Charles  wrote:
> Use an `eval' macro.
> 
> In a more recent version than you use, this works:
> 
> * abc
>   :PROPERTIES:
>   :EXPORT_TITLE: {{{etitle(my title)}}}
>   :END:
> 
> #+macro: etitle (eval (concat (format-time-string "%Y-%m-%d") " " $1))
> 
> That works for EXPORT_TITLE!
> 
> So I tried for EXPORT_FILE_NAME, but it doesn't work there, because 
> org-export-output-file-name should be getting called internally *before* the 
> macro expansion is done.

I missed that. 

Further, `org-export-file-name' gets called before `org-export-as' so there is 
no hope of using export hooks or filters or other gambits like that.

I don't see a clean way to do date stamp the file name without writing your own 
export-to-file function that handles date-stamping the file arg sent to 
`org-export-to-file' or replacing/advicing `org-export-file-name' to do that.

Chuck



Re: [O] org-reveal: content side by side

2018-02-07 Thread Michael Welle
Hello,

Matt Price  writes:

> for this issue, I define a class "paired" in my local cass file (or
> actually, I now use a very modestly edited custom theme) :
>
>
> .paired {
> float:left !important;
> max-width:47% !important;
>
> }
>
> and then in the org file:
> :#+ATTR_HTML: :class paired
>
> That works OK for me. the "!important" is necessary because reveal css is
> prtty greedy & hard to override.
thanks, I will check it out. I have to say it takes quite some time to
get a presentation that looks as good as the beamer based presentation I
use as an example.

The current issue I have is this. I have a structure like this:

* foo
** foo1
** foo2

Basically foo acts as a container for the content. I want foo to appear
in the table of contents and I want two slides, foo1 and foo2, and none
for foo. I'm nearly there, but I don't know how to suppress the
generation of a slide for foo.

I could use this structure:

* foo1
* foo2

But I miss the container that groups the content for me, the presenter.
And what is more important, I don't know how to get foo into the TOC (in
a nice way).

Or I could use:

* foo1
** foo2

Which seems to have even more issues: the content of foo2 is on the same
level as the content of foo1, it's not sub-content. The headers of the
slides have different sizes then, etc.

Regards
hmw



Re: [O] :EXPORT_FILE_NAME: containing a date-stamp

2018-02-07 Thread Kaushal Modi
On Wed, Feb 7, 2018 at 12:22 PM Berry, Charles  wrote:

> Use an `eval' macro.
>
> In a more recent version than you use, this works:
>
> * abc
>   :PROPERTIES:
>   :EXPORT_TITLE: {{{etitle(my title)}}}
>   :END:
>
> #+macro: etitle (eval (concat (format-time-string "%Y-%m-%d") " " $1))
>

That works for EXPORT_TITLE!

So I tried for EXPORT_FILE_NAME, but it doesn't work there, because
org-export-output-file-name should be getting called internally *before*
the macro expansion is done.
-- 

Kaushal Modi


Re: [O] :EXPORT_FILE_NAME: containing a date-stamp

2018-02-07 Thread Berry, Charles


> On Feb 7, 2018, at 7:31 AM, Karl Voit  wrote:
> 
> What I want to achieve:
> 
> *** My Report
> :PROPERTIES:
> :EXPORT_FILE_NAME: (format-time-string "%Y-%m-%d") Project Status.html
> :END:
> 
> ... which results in the file: "2018-02-07 Project Status.html"


Use an `eval' macro.

In a more recent version than you use, this works:

* abc
  :PROPERTIES:
  :EXPORT_TITLE: {{{etitle(my title)}}}
  :END:


#+macro: etitle (eval (concat (format-time-string "%Y-%m-%d") " " $1))

...

You might need to quote the `$1'. The quoting convention was changed recently.

HTH,

Chuck



Re: [O] :EXPORT_FILE_NAME: containing a date-stamp

2018-02-07 Thread Kaushal Modi
On Wed, Feb 7, 2018 at 10:33 AM Karl Voit  wrote:

> :EXPORT_FILE_NAME: (format-time-string "%Y-%m-%d") Project Status.html
>

Yes, you cannot do that (How would Org know that you do not want to name
your file literally like that? :)).

Also you do not need to (should not?) provide the file extension there..
the correct extension is added based on the exporter you use.

That said, I quickly tested this out, and it works:

(defun modi/org-advice-prefix-export-file-name-with-date (orig-fun 
args)
  "Prefix the output file name with current date."
  (let* ((date-format "%Y-%m-%d")   ;Customize this variable as you like
 (date-file-separator "-")  ;Customize this variable as you like
 (orig-output-file-name (apply orig-fun args))
 (orig-output-dir (file-name-directory orig-output-file-name))
 (orig-output-just-file-name (file-name-nondirectory
orig-output-file-name))
 (date (format-time-string date-format (current-time
(concat orig-output-dir date date-file-separator
orig-output-just-file-name)))
(advice-add 'org-export-output-file-name :around
#'modi/org-advice-prefix-export-file-name-with-date)
;; (advice-remove 'org-export-output-file-name
#'modi/org-advice-prefix-export-file-name-with-date)


After evaluating the above, current date will be prefixed to the exported
file name, whether you export the whole file or just a subtree.
-- 

Kaushal Modi


Re: [O] Insert timestamp other than DEADLINE: or SCHEDULED: for heading

2018-02-07 Thread Tyler Smith
Ok, thanks for the info.


On Tue, Feb 6, 2018, at 8:55 PM, Samuel Wales wrote:
> regular tses can be anywhere.  there is no command to put it after the
> maiin org thingies.  there was discussion a while back about adding
> EVENT: but it has not been implemented yet.
> 



Re: [O] Prompt org-capture for buffer?

2018-02-07 Thread Rasmus
Lawrence Bottorff  writes:

> I've got this
>
>  '(org-capture-templates
>(quote
> (("a" "Normal add" entry (file "~/org/notes.org")
>   "* %(plainutc)\n%x%?"
>
> But it wants to put my captured things into ~/org/notes.org . Is there any
> way to have it prompt for which buffer to add to -- or even just put it in
> the active buffer?

You could either use "file+function" or "function" and write a function to
find location or file/buffer and location, respectively.  See the
‘org-capture-templates’ docstring.

 (file+function "path/to/file" function-finding-location)
 A function to find the right location in the file

 (function function-finding-location)
Most general way: write your own function which both visits
the file and moves point to the right location

Functions take no arguments and in the case of file+function, the function
is run from the file buffer.

Example:

(file+function "~/doc.org"
   (lambda ()
 (org-goto-local-search-headings
  (ido-completing-read
   "File note to: "
   (org-element-map
   (org-element-parse-buffer)
   'headline
 (lambda (hl)
   (and (= (org-element-property :level hl) 1)
(org-element-property :title hl)
  nil nil)
 (forward-line 1))
 :prepend t
 :empty-lines-after 1)


Hope it helps,
Rasmus

-- 
. . . It begins of course with The Internet.  A Net of Peers




[O] :EXPORT_FILE_NAME: containing a date-stamp

2018-02-07 Thread Karl Voit
Hi,

Is there a possibility to define an export file name of a heading so
that the resulting file contains a date-stamp?

What I want to achieve:

*** My Report
:PROPERTIES:
:EXPORT_FILE_NAME: (format-time-string "%Y-%m-%d") Project Status.html
:END:

... which results in the file: "2018-02-07 Project Status.html"

No, this does not work this way at the moment (Orgmode from git
maint, d3f7309cb from 9 weeks ago).

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




Re: [O] Orgmode repeater intervals with end date

2018-02-07 Thread Karl Voit
* Tory S. Anderson  wrote:
> I was very pleased to find, when browsing the manual for a 
> different reason, the 'orgmode' solution to the problem, which 
> provides daily customization ability and also maintains 
> exportability: `org-clone-subtree-with-timeshift`[1], with which I 
> can easily accomplish my goals and even consolidate my 
> notes-for-that-event-instance. I'm just writing this here because 
> it has totally upgraded my planning experience and I wish I'd 
> known about it sooner!

You should subscribe to my blog ;-)

http://karl-voit.at/2017/01/15/org-clone-subtree-with-time-shift/
I do think I remember that I linked to this article somewhere in
Worg.

-- 
get mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML into Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <
Personal Information Management > http://Karl-Voit.at/tags/pim/
Emacs-related > http://Karl-Voit.at/tags/emacs/




[O] Org-mode new website accept PR like GitHub?

2018-02-07 Thread numbch...@gmail.com
Can I send PR to add contrib support at new Org-mode source code website
like this: https://code.orgmode.org/bzg/org-mode/pulls/1

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