Re: [O] Several org-entities to be fixed.

2014-12-11 Thread Rasmus
Hi Konstantin,

Thanks for the patch.

Konstantin Kliakhandler  writes:

> On all the computers I've used so far, including: Windows[8, 8.1] ,
> OSX[Mavericks,Yosemite], debian[wheezy], ubuntu[14.04.1], I've seen the
> same problem: the org-entities symbols for phi and varphi were inverted,
> and the symbol for setminus was displayed as a W with a strike-through.

Actually, it's not so obvious.  LaTeX has it the wrong way around, as far
as I know.  See also:

   https://github.com/mathjax/MathJax/issues/353

(I read this first on Wikipedia, but I can't find the link now).

Note that M-x set-input-method RET TeX RET \phi produces φ as well.
Likewise, the org-entities correspond to what Firefox shows when exporting
to HTML.

> Attached is a patch that exchanges between the inverted symbols, and
> replaces the W symbol by the unicode 'SET MINUS' symbol.

Actually the current symbol "backslash" looks better with my fonts, but
the one you suggests is the correct one.


Beside the above concerns wrt \phi you need to include at proper changelog
in the commit message.  See

http://orgmode.org/worg/org-contribute.html#unnumbered-4

Also, if you do not have FSF copyright papers sorted out you need to add
TINYCHANGE.  See the same page.

—Rasmus

-- 
To err is human. To screw up 10⁶ times per second, you need a computer




[O] Repository for released versions

2014-12-11 Thread Peter Hoeg
Hi, 

the release in orgmode.org/elpa seem to be nightly dumps. Any chance to have 
a separate repository for the released version?

/Peter




Re: [O] demoting a heading inserts spaces in column-0 text

2014-12-11 Thread Daniel Clemente
> >Proposal: if text starts in column 0, don't move the text; move
> >only the headers.
>
> Then, in this case, :CLOCK: drawer will not move either. Unless
> "headers" is defined as "stuff not too far from the headline". But it is
> too vague to be usable.

> There no such thing as a your "headers" in Org. :CLOCK: and "Text" are
> treated equally, as contents of the headline.

  Of course everything's text, but if there's no distinction between
drawers/headers and text, that's the problem. Those headers are metadata
written and managed by org and must follow some rules, whereas the rest of
text is data typed by the user and relatively free. Those headers must even
follow strict processes (like being "repaired" to make CLOCK appear after
PROPERTIES), so I wouldn't say they are normal text.
  Maybe you are referring to the non-drawers metadata, i.e. to those notes
that you can add with C-c C-z. That's in the limbo between org data and
text, that's the tricky part. I don't know whether that should be indented
together with the drawers, probably yes.
  So, I think org should detect its own syntax (:CLOCK: ... :END: etc.), and
do automatic changes only to its own syntax, not to text typed by the user
unless the user asks for it.

--
Daniel

On Sat, Dec 6, 2014 at 6:40 AM, Nicolas Goaziou 
wrote:

> Hello,
>
> Daniel Clemente  writes:
>
> >   There was a change (cba2f0a2a3024ae5bf71e1a12ba99778a92902a2, Sat
> >   Nov 8 14:35:24 2014 +0100) which made :CLOCK: etc entries shift to
> >   the right when the tree is being shifted to the right ("demoted",
> >   e.g. using M-S-Right).
> >
> >
> > But now it changes from this:
> >
> >  some
> >   :CLOCK:
> >   CLOCK: [2013-11-12 Sel 10:45]--[2013-11-12 Sel 11:40] =>  0:55
> >   :END:
> > Text
> >
> >
> >
> >   to this:
> >
> > * some
> >:CLOCK:
> >CLOCK: [2013-11-12 Sel 10:45]--[2013-11-12 Sel 11:40] =>  0:55
> >:END:
> >  Text
> >
> >
> >
> >while what I expected was this:
> >
> > * some
> >:CLOCK:
> >CLOCK: [2013-11-12 Sel 10:45]--[2013-11-12 Sel 11:40] =>  0:55
> >:END:
> > Text
> >
> >
> >
> >
> >Proposal: if text starts in column 0, don't move the text; move
> >only the headers.
>
> Then, in this case, :CLOCK: drawer will not move either. Unless
> "headers" is defined as "stuff not too far from the headline". But it is
> too vague to be usable.
>
> >An old behaviour (reported in
> http://permalink.gmane.org/gmane.emacs.orgmode/92450) was not to move
> anything in this case, that's bad and was fixed. I think the proposal is
> better.
> >org-adapt-indentation=nil would write all headers in column 0 by
> >default, which is ugly and doesn't give the desired result.
>
> There no such thing as a your "headers" in Org. :CLOCK: and "Text" are
> treated equally, as contents of the headline.
>
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Repository for released versions

2014-12-11 Thread Nick Dokos
Peter Hoeg  writes:


> the release in orgmode.org/elpa seem to be nightly dumps. Any chance to have 
> a separate repository for the released version?
>

They are weekly snapshots of the stable version (the maint branch of the
git repo) AFAIK, so they include the latest bug fixes, but they don't
include the cutting edge features that you get from the master branch of
the git repo. What do you mean by "released"?

-- 
Nick




[O] How to delete org-stored-links - feature request?

2014-12-11 Thread Marcin Borkowski
Hi,

I use org-capture with org-protocol to capture links to web pages I want
to save.  However, over time this results in a huge org-stored-links
variable.  I didn't find any function to clear it.  I started a fresh
Emacs instance (something I only do once a week or even less...) just to
check that its initial value is just plain ().  So I can just do an M-:
(setq ...); but wouldn't it be nice to provide a "front-end" function to
do that?  (Or at least explain in the manual how to do it?  It takes a
bit of experience to hunt down even the name of this variable - it's not
mentioned in the manual, and not all users know how to grep the
source...)

Best,

-- 
Marcin Borkowski
http://octd.wmi.amu.edu.pl/en/Marcin_Borkowski
Faculty of Mathematics and Computer Science
Adam Mickiewicz University



[O] Radio Targets in Tables

2014-12-11 Thread R . T .
Hi,

I have the following two tables in a .org file:

TABLE A
 | PM  | Notebook   |
 |-+|
 | TAD | [[./13939-SEC.org][13939-SEC]] |
 | KB  | [[./13488-PAG.org][13488-PAG]] |
 
TABLE B
 | Employee| Initials  |
 |-+---|
 | Kenneth Bones   | <<>>  |
 | Timothy Duggett | <<>> |


The intent is that when I click on an entry in the PM field in TABLE A, that
focus jumps to the associated record in TABLE B.

The entries in the PM field do seem to link after a C-c C-c or upon initial
loading.  Org mode changes them to be underlined.

However when I click on a "PM" link, it instead takes me to the link to the
right in the associated "Notebook" column in TABLE A.

For example, clicking on "TAD" in TABLE A does not jump me to "Timothy
Duggett" in TABLE B, but instead opens the "13939-SEC.org" file.

I cannot explain this behavior, but am assuming it has something to do with
radio links not working properly within tables.

Thanks

GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ c:/Program Files
(x86)/emacs-24.3/lisp/org/)






[O] (org-protocol-check-filename-for-protocol) should not (server-edit)

2014-12-11 Thread Vladimir Alexiev
I want org-protocol-store-link to paste the link in my current buffer and 
location, no questions asked.
I've defined a function like this:

(defun va/org-protocol-store-link (info)
  "Process an org-protocol://store-link:// style url.
Store a browser URL as an org link, automatically in the current buffer.
Also saves marked text. The browser bookmark has to look like this:
  javascript:location.href='org-protocol://store-link://'+ 
encodeURIComponent(location.href)+'/' \\ 
encodeURIComponent(document.title)+'/'+encodeURIComponent(window.getSelection())"
  (let* ((parts (org-protocol-split-data info t org-protocol-data-separator))
 (url (org-protocol-sanitize-uri (car parts)))
 (title (cadr parts))
 (region (caddr parts)))
;; (set-buffer (car (buffer-list))) ; when called, a server buffer is 
current
;; (setq org-stored-links (cons (list uri title) org-stored-links))
;; (org-insert-link)
(insert "[[" url "]")
(if title (insert "[" title "]"))
(insert "]")
(if region (insert " " region))
(raise-frame)
nil ; no buffer to edit
))

And attached it like that:

(setq org-protocol-protocol-alist
  '(("org-store-link" :protocol "store-link"
 :function va/org-protocol-store-link :kill-client t)))

Unfortunately it pastes the link in the most recent "server" buffer.
The reason is that (org-protocol-check-filename-for-protocol) does 
(server-edit), 
which does "Switch to next server editing buffer; say "Done" for current 
buffer."

If I set the :kill-client to nil, nothing happens (as far as I can see).

Why does (org-protocol-check-filename-for-protocol) call (server-edit)?

Cheers! Vladimir

PS: the gmane search is pretty bad. I googled with this:
+"org-protocol" +"server-edit" url:gmane.emacs.orgmode
and found a slightly related article:
http://blog.gmane.org/gmane.emacs.orgmode/month=20100901





[O] /emsp in clock tables

2014-12-11 Thread J. David Boyd

I don't remember reading about this here, so hopefully I haven't just missed
it.

I've found some reference to it on the web, but no resolution.

Sometime in the last few releases, clock tables have changed the display.

I now see

| *Total time*  | *2:17* |  |  |
|---++--+--|
| Tasks | 2:17   |  |  |
| \emsp Infrastructure  || 0:27 |  |
| \emsp\emsp WAITING Email  ||  | 0:06 |


How can I remove the \emsp artifact and get back the old behavior?

Advance apologies if this is somewhere in a README that I didn't...

Dave in Hudson, FL





[O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Calvin Young
Hi all,

I've been using org-mode for a while now, and it's been life-changing in
terms of how I keep organized. However, there's still one thing I miss from
traditional note-taking apps when working with lists. Specifically, I'd
like to enable the following behavior:

   - If the cursor is at the end of a list item, then "Return" should
   insert a new list item (i.e., automatically perform org-meta-return)
   - If the cursor is at the beginning of an empty list item, then "Return"
   should outdent the list item (or remove it if it's already at the
   outer-most indentation level)
   - If the cursor is at the beginning of an empty list item, then
   "Backspace" should delete the list item and move my cursor to the end of
   the previous list item
   - It'd be nice of these rules could be applied to checkboxes as well

What I'm describing is really just the default behavior around bulleted /
numbered lists in other GUI editors (e.g., Google Docs, Gmail, OSX Notes,
etc.). Are there options built in to org-mode that'd let me enable this?

Best,
Calvin


Re: [O] /emsp in clock tables

2014-12-11 Thread Joost Helberg
Dave,

the customizable org-pretty-entities screws up the alignment in the
table. I don't know where the problem lies, but it's fixed by hitting
C-c C-c in the table for re-aligning stuff.

I don't know why you see the '\emsp' code, as it's supposed to be
translated into a blank on screen. 

unset org-pretty-entities to avoid \emsp stuff.

regards,

Joost

> "J" == J David Boyd  writes:
 > From: J. David Boyd 
 > To: emacs-orgmode@gnu.org
 > Subject: [O] /emsp in clock tables
 > Date: 2014-12-11T17:52:27+0100

 > I don't remember reading about this here, so hopefully I haven't just missed
 > it.

 > I've found some reference to it on the web, but no resolution.

 > Sometime in the last few releases, clock tables have changed the display.

 > I now see

 > | *Total time*  | *2:17* |  |  |
 > |---++--+--|
 > | Tasks | 2:17   |  |  |
 > | \emsp Infrastructure  || 0:27 |  |
 > | \emsp\emsp WAITING Email  ||  | 0:06 |


 > How can I remove the \emsp artifact and get back the old behavior?

 > Advance apologies if this is somewhere in a README that I didn't...

 > Dave in Hudson, FL




-- 
Snow B.V.



Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Jorge A. Alfaro-Murillo

Calvin Young writes:

* If the cursor is at the end of a list item, then "Return" 
should 
  insert a new list item (i.e., automatically perform 
  org-meta-return)


M- does this. You do not want  to do that because 
you when you want to finish the list  finishes it.


* If the cursor is at the beginning of an empty list item, then 
  "Return" should outdent the list item (or remove it if it's 
  already at the outer-most indentation level)


I am not sure that I understand this but I assume that you would 
obtain the same with . It goes back and forth between levels 
of list so if you have


- one
- two
 + a
 + CURSOR_HERE

and you hit  then it changes to 


- one
- two
 + a
   + CURSOR_HERE

and then two times  (or S- from the beginning) changes 
it to


- one
- two
 + a
- CURSOR_HERE


* If the cursor is at the beginning of an empty list item, then 
  "Backspace" should delete the list item and move my cursor to 
  the end of the previous list item 


I guess you could remap  to a function that checks if 
you are at the beginning of the list and when that is true it does 
what you want, otherwise it just calls `delete-backward-char'. But 
generally I would do C-a C-k , just two more 
keystrokes.


* It'd be nice of these rules could be applied to checkboxes as 
well


M-S- inserts a check box.

Best,

--
Jorge.




Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Jorge A. Alfaro-Murillo

Jorge A. Alfaro-Murillo writes:

Calvin Young writes: 


* It'd be nice of these rules could be applied to checkboxes as 
well 


M-S- inserts a check box. 


I forgot to mention that the  S- behavior also works 
with check boxes.


--
Jorge.




Re: [O] org-read-date with pop-up-frames set to t

2014-12-11 Thread Alan Schmitt
Hello,

Here is a patch that honors the setting for `calendar-setup' when it's
'calendar-only: is now correctly creates a new frame for the calendar,
and removes is and restores the focus when the date is selected. As a
side effect, is also fixes the bug I reported in this thread.

I have signed the FSF papers.

From 40c1905f77d706c52cc964449c88c16b64b5a449 Mon Sep 17 00:00:00 2001
From: Alan Schmitt 
Date: Thu, 11 Dec 2014 19:01:45 +0100
Subject: [PATCH] org.el: Allow calendars to be in their own frame

* lisp/org.el (org-read-date): Create and delete frames if
`calendar-setup' is set to 'calendar-only.
---
 lisp/org.el | 20 ++--
 1 file changed, 14 insertions(+), 6 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index bed5cb9..144d038 100755
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -16728,9 +16728,10 @@ user."
 		(setcar (nthcdr 1 org-defdecode) 59)
 		(setq org-def (apply 'encode-time org-defdecode)
 			  org-defdecode (decode-time org-def)
+ (cur-frame (selected-frame))
 	 (mouse-autoselect-window nil) ; Don't let the mouse jump
 	 (calendar-frame-setup nil)
-	 (calendar-setup nil)
+	 (calendar-setup (when (eq calendar-setup 'calendar-only) 'calendar-only))
 	 (calendar-move-hook nil)
 	 (calendar-view-diary-initially-flag nil)
 	 (calendar-view-holidays-initially-flag nil)
@@ -16738,7 +16739,7 @@ user."
 		   (if org-with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") org-def))
 	 (prompt (concat (if prompt (concat prompt " ") "")
 			 (format "Date+time [%s]: " timestr)))
-	 ans (org-ans0 "") org-ans1 org-ans2 final)
+	 ans (org-ans0 "") org-ans1 org-ans2 final cal-frame)
 
 (cond
  (from-string (setq ans from-string))
@@ -16746,9 +16747,13 @@ user."
   (save-excursion
 	(save-window-excursion
 	  (calendar)
+	  (when (eq calendar-setup 'calendar-only)
+	(setq cal-frame
+		  (window-frame (get-buffer-window "*Calendar*" 'visible)))
+	(select-frame cal-frame))
 	  (org-eval-in-calendar '(setq cursor-type nil) t)
-  (unwind-protect
-  (progn
+	  (unwind-protect
+	  (progn
 		(calendar-forward-day (- (time-to-days org-def)
 	 (calendar-absolute-from-gregorian
 	  (calendar-current-date
@@ -16775,8 +16780,11 @@ user."
 		(use-local-map old-map)
 		(when org-read-date-overlay
 		  (delete-overlay org-read-date-overlay)
-  (setq org-read-date-overlay nil)
-	(bury-buffer "*Calendar*")
+		  (setq org-read-date-overlay nil)
+	(bury-buffer "*Calendar*")
+	(when cal-frame
+	  (delete-frame cal-frame)
+	  (select-frame-set-input-focus cur-frame))
 
  (t ; Naked prompt only
   (unwind-protect
-- 
2.2.0


Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Calvin Young
Jorge, thanks for the quick response!


>  * If the cursor is at the end of a list item, then "Return" should
>>  insert a new list item (i.e., automatically perform   org-meta-return)
>>
>
> M- does this. You do not want  to do that because you when
> you want to finish the list  finishes it.
>

I don't think I explained myself clearly the first time around. The
behavior I'm hoping to achieve (i.e., the default bulletting behavior in
Google Docs, OSX Notes, etc.) is as follows:

;; Starting with this setup:

- one
- two
 + a[CURSOR_HERE]

;; Hitting  should produce:

- one
- two
 + a
 + [CURSOR_HERE]

;; Hitting  again would then produce:

- one
- two
 + a
- [CURSOR_HERE]

;; And hitting  one last time would produce:

- one
- two
 + a

[CURSOR_HERE]

I know we can already achieve this with some combination of M-,
, and M-S-, but this behavior has 2 distinct advantages:

1. The user only needs to remember one key to cycle between all of these
actions, rather than 3 key combinations.
2. This behavior is more consistent with the bulleting behavior in other
editors, which could make it feel more intuitive for new org-mode users.


>  * If the cursor is at the beginning of an empty list item, then
>>  "Return" should outdent the list item (or remove it if it's   already at
>> the outer-most indentation level)
>>
>
> I am not sure that I understand this but I assume that you would obtain
> the same with . It goes back and forth between levels of list so if
> you have
>
> - one
> - two
>  + a
>  + CURSOR_HERE
>
> and you hit  then it changes to
> - one
> - two
>  + a
>+ CURSOR_HERE
>
> and then two times  (or S- from the beginning) changes it to
>
> - one
> - two
>  + a
> - CURSOR_HERE
>

Yes, but for the reasons mentioned above, it'd be nice if we could use the
 to outdent a new list entry as well.


>  * If the cursor is at the beginning of an empty list item, then
>>  "Backspace" should delete the list item and move my cursor to   the end of
>> the previous list item
>>
>
> I guess you could remap  to a function that checks if you are
> at the beginning of the list and when that is true it does what you want,
> otherwise it just calls `delete-backward-char'. But generally I would do
> C-a C-k , just two more keystrokes.
>

Makes sense. This is an easy function to write -- just wanted to make sure
there wasn't something that already does this out-of-the-box.


>  * It'd be nice of these rules could be applied to checkboxes as well
>>
>
> M-S- inserts a check box.


In general, I *believe* a lot of folks use lists and checkboxs in similar
ways. I certainly do, and I frequently accidentally hit M- while
editing a checkbox when I really intend to insert a new checkbox entry. As
a result, it seems desirable to create an interface that treats them more
similarly (e.g., using a single  keypress to auto-insert a new
entry).

If this doesn't exist yet, I'd be happy to roll it myself. But it'd be nice
to avoid re-inventing the wheel here if possible :)


Re: [O] "org-plus-contrib" yes, "org" no!

2014-12-11 Thread Achim Gratz
Sharon Kimble writes:
> My emacs version is in the sig, and my org-version is "Org-mode
> version 8.2.10 (8.2.10-23-g1ec416-elpaplus @
> /home/boudiccas/.emacs.d/elpa/org-plus-contrib-20141208/)" so we're
> in agreement, but still it happens. I've checked everywhere in my
> "init.org" and I don't have a spare "(require 'org)" floating
> around, its not in there at all!

You probably have another package installed via ELPA that requires Org.
Currently there is no way to tell the package manager that
org-plus-contrib does in fact provide plain org as well.

Simply create a directory

~/.emacs.d/elpa/org-29991231

and put a file named org-pkg.el in there with the following content:

--8<---cut here---start->8---
(define-package "org" "29991231" "Dummy package to satisfy dependencies on org" 
'nil)
--8<---cut here---end--->8---


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html




Re: [O] unlinking links

2014-12-11 Thread Nicolas Goaziou
Adam Spiers  writes:

>> FWIW, I don't think it is useful enough for inclusion in core.
>
> Why not?

Because we cannot possibly stuff everything related to Org in core.

The function saves a few keystrokes, but considering how often I expect
it to be used, the benefit from using it seems rather negligible.

OTOH, putting it on Worg gives it some exposure, so it isn't lost in the
mailing list archives.

Of course, this is all IMO, and other developers, or Bastien, could
disagree.

> Or perhaps I should ask: how is it determined whether
> something's useful enough for core? :-)

As for myself, the following works surprisingly well in various
situations:

  (defun ngz-answering-helper (&optional from-wife-p)
(cond (from-wife-p 'yes)
  ((= (random 10) 0) 'yes)
  (t 'no)))

Regards,



Re: [O] Radio Targets in Tables

2014-12-11 Thread Nicolas Goaziou
Hello,

R.T.  writes:

> I have the following two tables in a .org file:
>
> TABLE A
>  | PM  | Notebook   |
>  |-+|
>  | TAD | [[./13939-SEC.org][13939-SEC]] |
>  | KB  | [[./13488-PAG.org][13488-PAG]] |
>  
> TABLE B
>  | Employee| Initials  |
>  |-+---|
>  | Kenneth Bones   | <<>>  |
>  | Timothy Duggett | <<>> |
>
>
> The intent is that when I click on an entry in the PM field in TABLE A, that
> focus jumps to the associated record in TABLE B.
>
> The entries in the PM field do seem to link after a C-c C-c or upon initial
> loading.  Org mode changes them to be underlined.
>
> However when I click on a "PM" link, it instead takes me to the link to the
> right in the associated "Notebook" column in TABLE A.
>
> For example, clicking on "TAD" in TABLE A does not jump me to "Timothy
> Duggett" in TABLE B, but instead opens the "13939-SEC.org" file.

AFAICT, this is fixed in soon-to-be-released Org 8.3 (and perhaps on
current 8.2, though I didn't check).

You may want to update Org.


Regards,

-- 
Nicolas Goaziou



Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Jorge A. Alfaro-Murillo

Calvin Young writes:

;; Starting with this setup: 

- one - two + a[CURSOR_HERE] 

;; Hitting  should produce: 

- one - two + a + [CURSOR_HERE] 

;; Hitting  again would then produce: 

- one - two + a - [CURSOR_HERE] 

;; And hitting  one last time would produce: 

- one - two + a 

[CURSOR_HERE] 


I think there is a confusion here, my understanding is that org 
separates sublists by indentation so if you have:


- a
+ b[CURSOR]

and hit M- it should correct to:

- a
- b
- [CURSOR]

It is different if you have:

- a
 + b[CURSOR]

or

- a
 - b[CURSOR]

or 


1. a
  - b[CURSOR]
2. c

etc

I know we can already achieve this with some combination of 
M-, , and M-S-, but this behavior has 2 
distinct advantages: 

1. The user only needs to remember one key to cycle between all 
of these actions, rather than 3 key combinations.


But the problem is that you lose the functionality of  to 
exit the list. I want to have  to finish a line and  
 to finish a paragraph like I am used everywhere else.


2. This behavior is more consistent with the bulleting behavior 
in other editors


We shouldn't aim to imitate other much inferior editors ;-)

, which could make it feel more intuitive for new org-mode 
users.  [...]
Yes, but for the reasons mentioned above, it'd be nice if we 
could use the  to outdent a new list entry as well. 


I disagree,  and S- for indenting is much more friendly 
than , most modes in emacs behave like that. A new user 
just has to understand that sublists are separated by indentation, 
and learn that M- is for lists, and M-S- is for 
check boxes.



Jorge A. Alfaro-Murillo says:
I guess you could remap  to a function that checks 
if you are at the beginning of the list and when that is true 
it does what you want, otherwise it just calls 
`delete-backward-char'. But generally I would do C-a C-k 
, just two more keystrokes.
Makes sense. This is an easy function to write — just wanted to 
make sure there wasn't something that already does this 
out-of-the-box.


It should save around half a second per use, so if you use it five 
times a day you have about 1 hour to write it... minus the time it 
takes you to read this: http://xkcd.com/1205/ =)


In general, I *believe* a lot of folks use lists and checkboxs 
in similar ways. I certainly do, and I frequently accidentally 
hit M- while editing a checkbox when I really intend to 
insert a new checkbox entry. As a result, it seems desirable to 
create an interface that treats them more similarly (e.g., using 
a single  keypress to auto-insert a new entry).


If this doesn't exist yet, I'd be happy to roll it myself. But 
it'd be nice to avoid re-inventing the wheel here if possible :) 


Maybe, but you would lose the ability to have mixed check boxes 
and items lists. But you are right, it might be a nice 
configuration to allow M- to give you another item with 
check box if you are already in one (and then M-S- gives 
you a plain list item). But it might be even more confusing for a 
new user as to why the behavior is not consistent with M-, 
so probably it shouldn't be default.


Best,

--
Jorge.




[O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Calvin Young
Hi all,

I've been using org-mode for a while now, and it's been life-changing in
terms of how I keep organized. However, there's still one thing I miss from
traditional note-taking apps when working with lists. Specifically, I'd
like to enable the following behavior:

   - If the cursor is at the end of a list item, then "Return" should
   insert a new list item (i.e., automatically perform org-meta-return)
   - If the cursor is at the beginning of an empty list item, then "Return"
   should outdent the list item (or remove it if it's already at the
   outer-most indentation level)
   - If the cursor is at the beginning of an empty list item, then
   "Backspace" should delete the list item and move my cursor to the end of
   the previous list item
   - It'd be nice of these rules could be applied to checkboxes as well

What I'm describing is really just the default behavior around bulleted /
numbered lists in other GUI editors (e.g., Google Docs, Gmail, OSX Notes,
etc.). Are there any options built in to org-mode that'd let me enable this?

Best,
Calvin


Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Rasmus
Hi,

Calvin Young  writes:

>- If the cursor is at the end of a list item, then "Return" should
>insert a new list item (i.e., automatically perform org-meta-return)

Maybe you can use org-element-at-point and advice org-return? 

>- If the cursor is at the beginning of an empty list item, then "Return"
>should outdent the list item (or remove it if it's already at the
>outer-most indentation level)

I don't understand this.  Do you know M-{left,right}?  Again, you could
advice org-return.

In LO it removes the bullet.  Here you can use C-S-Backspace.  Bonus: it
works everywhere! 

>- If the cursor is at the beginning of an empty list item, then
>"Backspace" should delete the list item and move my cursor to the end of
>the previous list item

This is like C-S-Backspace C-p C-e.  You could advice org-delete-backward.

>- It'd be nice of these rules could be applied to checkboxes as well

It should be trivial to support using org-element-at-point.

> What I'm describing is really just the default behavior around bulleted /
> numbered lists in other GUI editors (e.g., Google Docs, Gmail, OSX Notes,
> etc.).

OK...

> Are there any options built in to org-mode that'd let me enable this?

No.  And I doubt it should be.  But Emacs is /your/ extensible editor.

—Rasmus

-- 
Need more coffee. . .




Re: [O] open file link in dired?

2014-12-11 Thread Haider Rizvi
Alan Schmitt  writes:

> My main motivation for using this is that I have some code to
> preview a file using Quicklook (I'm on OS X), and code to open a
> file in an external app when in dired, so it's quite useful for
> files that emacs cannot display:

Alan, fyi if you don't know, openwith package does a pretty good job
of opening with external apps. I've been using it on osx for a while.

;; openwith setup to help in find-file, dired, helm, etc. for common file types
(use-package openwith
  :ensure
  :commands openwith-mode
  :config
  (progn 
(openwith-mode t)
(setq openwith-associations
  (quote (("\\.pdf\\'"  "open" (file))
  ;;  ("\\.svg\\'"  "open" (file))
  ("\\.\\(?:mpe?g\\|avi\\|wmv\\)\\'" "open -a vlc" (file))
  ;; change .jpg to be able to show inline in .org mode
  ;;  ("\\.\\(?:jp?g\\|png\\)\\'" "open" (file))
  ("\\.ppt[x]*\\'"  "open" (file))
  ("\\.doc[x]*\\'"  "open" (file))
  ("\\.xls[x]*\\'"  "open" (file))
  ("\\.html\\'"  "open" (file))
  ("\\.vNotes.*\\'" "open" (file)) ;spotlight searches for 
Notes open these files
  )



Regards, 
-- 
Haider




[O] Possible bug with Org Babel source code blocks and ESS integration

2014-12-11 Thread Vikas Rawal
I am having a strange problem with R Source Blocks. Let me explain (I hope the 
explanation below makes sense).

When I am creating a source block, I typically create the #+BEGIN_SRC and 
#+END_SRC lines, and then use C-c ' to enter ESS mode, fill the block there, 
and return to my org buffer using C-c ' again. 

While I am filling in my source block, I sometimes need to refer to my full org 
file and some other source blocks in there. So my cursor in the Org file moves. 
Then, if my code block is a little complex, I like to save it while I am 
editing (C-x C-s). This is where the mess is created. Instead of saving the 
code in the source block from where ESS was called, the code is saved at the 
point where my cursor in the org file at the moment is. As a result, I get a 
copy of the source code text (without the BEGIN_SRC and END_SRC lines) at the 
place where my cursor is. This obviously creates a total mess and I have to 
clean it up.

Is this the intended behaviour? I have used source code blocks for years and 
have not had this problem before. But I cannot say whether this is a new 
behaviour in org or something in my behaviour has changed. In the past, I 
perhaps never moved the cursor in my org buffer while editing a source code 
block. 

Of course, one advice could be not to switch back from the ESS buffer without 
closing it. But a better thing would be if saving in the ESS buffer saved the 
source code block in the right place. But I don’t know if that is too much to 
ask.

Vikas




Re: [O] Possible bug with Org Babel source code blocks and ESS integration

2014-12-11 Thread Aaron Ecay
Hi Vikas,

2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen:
> 
> I am having a strange problem with R Source Blocks. Let me explain (I
> hope the explanation below makes sense).
> 
> When I am creating a source block, I typically create the #+BEGIN_SRC
> and #+END_SRC lines, and then use C-c ' to enter ESS mode, fill the
> block there, and return to my org buffer using C-c ' again.
> 
> While I am filling in my source block, I sometimes need to refer to my
> full org file and some other source blocks in there. So my cursor in
> the Org file moves. Then, if my code block is a little complex, I like
> to save it while I am editing (C-x C-s). This is where the mess is
> created. Instead of saving the code in the source block from where ESS
> was called, the code is saved at the point where my cursor in the org
> file at the moment is. As a result, I get a copy of the source code
> text (without the BEGIN_SRC and END_SRC lines) at the place where my
> cursor is. This obviously creates a total mess and I have to clean it
> up.
> 
> Is this the intended behaviour? I have used source code blocks for
> years and have not had this problem before. But I cannot say whether
> this is a new behaviour in org or something in my behaviour has
> changed. In the past, I perhaps never moved the cursor in my org
> buffer while editing a source code block.

I just pushed a change to master (398286a) which should fix this issue,
and one other I discovered along the way.  These bugs may have been
dislodged by Nicolas’s recent rework of this code.  (Not that I’m
complaining – the new code seems a lot pleasanter, even with a couple
transitory bugs.  :P )

I assume that you’re using master, though you don’t say.  Could you test
the patch?

Thanks,

-- 
Aaron Ecay



Re: [O] Possible bug with Org Babel source code blocks and ESS integration

2014-12-11 Thread Vikas Rawal
> I just pushed a change to master (398286a) which should fix this issue,
> and one other I discovered along the way.  These bugs may have been
> dislodged by Nicolas’s recent rework of this code.  (Not that I’m
> complaining – the new code seems a lot pleasanter, even with a couple
> transitory bugs.  :P )
> 
> I assume that you’re using master, though you don’t say.  Could you test
> the patch?
> 

Yes, it works fine now.

Thanks.

Vikas


Re: [O] Emulating list functionality from traditional GUI editors

2014-12-11 Thread Calvin Young
Makes sense! Just wanted to see how others felt about this :)

Anyway thanks for the consideration, and for the tip
about org-element-at-point -- really did make this trivial to implement.


On Thu, Dec 11, 2014 at 11:48 AM, Rasmus  wrote:

> Hi,
>
> Calvin Young  writes:
>
> >- If the cursor is at the end of a list item, then "Return" should
> >insert a new list item (i.e., automatically perform org-meta-return)
>
> Maybe you can use org-element-at-point and advice org-return?
>
> >- If the cursor is at the beginning of an empty list item, then
> "Return"
> >should outdent the list item (or remove it if it's already at the
> >outer-most indentation level)
>
> I don't understand this.  Do you know M-{left,right}?  Again, you could
> advice org-return.
>
> In LO it removes the bullet.  Here you can use C-S-Backspace.  Bonus: it
> works everywhere!
>
> >- If the cursor is at the beginning of an empty list item, then
> >"Backspace" should delete the list item and move my cursor to the end
> of
> >the previous list item
>
> This is like C-S-Backspace C-p C-e.  You could advice org-delete-backward.
>
> >- It'd be nice of these rules could be applied to checkboxes as well
>
> It should be trivial to support using org-element-at-point.
>
> > What I'm describing is really just the default behavior around bulleted /
> > numbered lists in other GUI editors (e.g., Google Docs, Gmail, OSX Notes,
> > etc.).
>
> OK...
>
> > Are there any options built in to org-mode that'd let me enable this?
>
> No.  And I doubt it should be.  But Emacs is /your/ extensible editor.
>
> --Rasmus
>
> --
> Need more coffee. . .
>
>
>


Re: [O] File local variables

2014-12-11 Thread Vikas Rawal


> I used to disable evaluation of source code when exporting by using the 
> following as the first line:
> 
> ;; -*- mode: Org; org-export-babel-evaluate: nil; -*-
> 
> This is not working any more. Has something changed?
> 
> My org-version is: Org-mode version 8.3beta (release_8.3beta-614-gc10ae1 @ 
> /Users/vikas/.emacs.d/src/org-mode/lisp/)
> 
> Vikas

I think this is a bug. Could somebody confirm.

The following line shows up in the Latex export.

; -*- mode: org; org-export-babel-evaluate: nil -*-

Vikas


Re: [O] Possible bug with Org Babel source code blocks and ESS integration

2014-12-11 Thread Aaron Ecay
2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen:
>
> Yes, it works fine now.

Glad to hear it, thanks for confirming.

-- 
Aaron Ecay



Re: [O] [RFC] [PATCH] org-table: introduce an upper bound on the number of lines `org-table-convert-region-max-lines' will attempt.

2014-12-11 Thread Aaron Ecay
Hi Bastien,

2014ko abenudak 1an, Bastien-ek idatzi zuen:
> 
> Hi Aaron,
> 
> Aaron Ecay  writes:
> 
>> * lisp/org-table.el (org-table-convert-region-max-lines): New
>> defcustom.
>> (org-table-convert-region): Use it.
> 
> Looks good, feel free to apply this.

Thanks, done.

-- 
Aaron Ecay



Re: [O] File local variables

2014-12-11 Thread Aaron Ecay
Hi Vikas,

2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen:
> 
>> I used to disable evaluation of source code when exporting by using the 
>> following as the first line:
>> 
>> ;; -*- mode: Org; org-export-babel-evaluate: nil; -*-
>> 
>> This is not working any more. Has something changed?
>> 
>> My org-version is: Org-mode version 8.3beta (release_8.3beta-614-gc10ae1 @ 
>> /Users/vikas/.emacs.d/src/org-mode/lisp/)
>> 
>> Vikas
> 
> I think this is a bug. Could somebody confirm.

I can’t confirm, in the sense that including that line in a file sets
the buffer-local value of org-export-babel-evaluate to nil.

If that variable isn’t having the effect of suppressing evaluation, that
sounds like a bug, but it’s not clear that that is what is going on.
Can you send an ECM?

> 
> The following line shows up in the Latex export.
> 
> ; -*- mode: org; org-export-babel-evaluate: nil -*-

That is because ; is the comment syntax for (e)lisp.  You probably want
to begin the line with # instead.

-- 
Aaron Ecay



Re: [O] Repository for released versions

2014-12-11 Thread Peter Hoeg
Nick Dokos  gmail.com> writes:

> They are weekly snapshots of the stable version (the maint branch of the
> git repo) AFAIK, so they include the latest bug fixes, but they don't
> include the cutting edge features that you get from the master branch of
> the git repo. What do you mean by "released"?

I was referring to the regular releases (8.2.9, 8.2.10 and so on).





Re: [O] File local variables

2014-12-11 Thread Kyle Meyer
Aaron Ecay  wrote:
> 2014ko abenudak 11an, Vikas Rawal-ek idatzi zuen:
>>> I used to disable evaluation of source code when exporting by using
>>> the following as the first line:
[...]
>> I think this is a bug. Could somebody confirm.
>
> I can’t confirm, in the sense that including that line in a file sets
> the buffer-local value of org-export-babel-evaluate to nil.
>
> If that variable isn’t having the effect of suppressing evaluation,
> that sounds like a bug, but it’s not clear that that is what is going
> on.  Can you send an ECM?

I can't confirm this either (using the following text).

,
| # -*- org-export-babel-evaluate: nil; -*-
|
| #+begin_src emacs-lisp :exports both
|   (message "Evaluating?")
| #+end_src
|
| #+RESULTS:
| : Evaluating?
`

'C-h v' indicates that the buffer-local value is indeed set to nil.

The only place the value of org-export-babel-evaluate is checked is
org-babel-exp-results.  Exporting the example above with
org-babel-exp-results edebugged shows that the main body of that
function doesn't execute.  So, the code isn't being evaluated at export,
unless it's happening elsewhere.

How are you checking that the code is evaluated at export?

--
Kyle



Re: [O] File local variables

2014-12-11 Thread Vikas Rawal
>> 
>> I can’t confirm, in the sense that including that line in a file sets
>> the buffer-local value of org-export-babel-evaluate to nil.
>> 
>> If that variable isn’t having the effect of suppressing evaluation,
>> that sounds like a bug, but it’s not clear that that is what is going
>> on.  Can you send an ECM?
> 
> I can't confirm this either (using the following text).
> 
> ,
> | # -*- org-export-babel-evaluate: nil; -*-
> |
> | #+begin_src emacs-lisp :exports both
> |   (message "Evaluating?")
> | #+end_src
> |
> | #+RESULTS:
> | : Evaluating?
> `


Thanks Aaron and Kyle.

I perhaps confused the fact that the line which started with a ; was showing up 
in the export to understand that the line was not being treated as it should.

But in my earlier org files, I always started this line with a ; and it used to 
work fine. Perhaps (perhaps), the behaviour has changed in terms of not 
treating lines starting with ; as comments in org.

Be that as it may, starting the line with a # works.

Thanks again,

Vikas


[O] org-index question: targeting a <> link

2014-12-11 Thread Alan Schmitt
Hello,

Is it possible to target some text using org-index, for instance to a
<> marker (the link would be something like "file:foo.org::My
Target" I think)? Right now I only see how to create id links.

Thanks,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature


[O] doc patch: move footnote in external links

2014-12-11 Thread Alan Schmitt
Hello,

I think the footnote in
http://orgmode.org/manual/External-links.html#fn-1 is in the wrong
place, it should be on the next line.

Here is a patch to fix it. If you prefer I can push it directly myself.

From 4f3ccb3531744fb57d2b26a7844daf54e034e38f Mon Sep 17 00:00:00 2001
From: Alan Schmitt 
Date: Fri, 12 Dec 2014 08:26:05 +0100
Subject: [PATCH] org.texi: Move footnote

* doc/org.texi (External links): Move footnote about the
`org-link-search-must-match-exact-headline' option from text search to
heading search.
---
 doc/org.texi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/doc/org.texi b/doc/org.texi
index d617259..dab6e1a 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -3555,14 +3555,14 @@ file:/myself@@some.where:papers/last.pdf   @r{file, path on remote machine}
 /myself@@some.where:papers/last.pdf@r{same as above}
 file:sometextfile::NNN@r{file, jump to line number}
 file:projects.org @r{another Org file}
-file:projects.org::some words @r{text search in Org file}@footnote{
+file:projects.org::some words @r{text search in Org file}
+file:projects.org::*task title@r{heading search in Org file}@footnote{
 The actual behavior of the search will depend on the value of
 the option @code{org-link-search-must-match-exact-headline}.  If its value
 is @code{nil}, then a fuzzy text search will be done.  If it is t, then only the
 exact headline will be matched.  If the value is @code{'query-to-create},
 then an exact headline will be searched; if it is not found, then the user
 will be queried to create it.}
-file:projects.org::*task title@r{heading search in Org file}
 file+sys:/path/to/file@r{open via OS, like double-click}
 file+emacs:/path/to/file  @r{force opening by Emacs}
 docview:papers/last.pdf::NNN  @r{open in doc-view mode at page}
-- 
2.2.0


Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7


signature.asc
Description: PGP signature