Re: [O] store-link protocol does not store the title

2018-07-17 Thread Mario Martelli
Hi Aline,

I just called it from my browser and got a nice org link after executing 
‘org-insert-link’. With ‘C-y’ you’ll get only the URL.

Cheers Mario

— 

GNU Emacs 25.3.3 (x86_64-apple-darwin13.4.0, Carbon Version 157 AppKit 1265.21) 
of 2017-09-28
Org mode version 9.1.2 (release_9.1.2-154-g99dbca @ 
/Users/…./Documents/repo/org-mode/lisp/)




> Am 17.07.2018 um 17:15 schrieb Aline Gerard :
> 
> 
> Hi all,
> 
> I'm testing store-link protocol. 
> When I execute  ' emacsclient "org-protocol://store-link?url=URL=TITLE" 
> ' the title is not stored, just url is stored. 
> I don't have [[URL][TITLE]] but just URL !
> 
> Any idea ? Thanks.
> 
> -- 
> Aline
> 



Re: [O] [BUG] org-special-ctrl-k no longer protects tags

2018-07-17 Thread Nicolas Goaziou
Hello,

Matt Lundin  writes:

> Since commit e87ebca2a7, setting org-special-ctrl-k to t no longer
> protects tags if when pressing C-k (org-kill-line) in the middle of a
> headline. The expected behavior is described in the docstring for
> org-special-ctrl-k: "When in the middle of the headline text, kill the
> headline up to the tags."
>
> Take the following example:
>
> * Headline  :tag:
>
> If I hit C-k with the cursor on the letter "l" on the example above, I
> expect to get this...
>
> * Head  :tag:
>
> Instead, I get this...
>
> * Head

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



[O] [BUG] org-special-ctrl-k no longer protects tags

2018-07-17 Thread Matt Lundin
Since commit e87ebca2a7, setting org-special-ctrl-k to t no longer
protects tags if when pressing C-k (org-kill-line) in the middle of a
headline. The expected behavior is described in the docstring for
org-special-ctrl-k: "When in the middle of the headline text, kill the
headline up to the tags."

Take the following example:

* Headline  :tag:

If I hit C-k with the cursor on the letter "l" on the example above, I
expect to get this...

* Head  :tag:

Instead, I get this...

* Head

I think this is because when (looking-at org-tag-line-re) is called on
line 22840, the cursor is in the middle of the line, whereas
org-tag-line-re expects it to be at the beginning of the line.

Best,
Matt



[O] store-link protocol does not store the title

2018-07-17 Thread Aline Gerard
Hi all,

I'm testing store-link protocol.
When I execute  ' emacsclient
"org-protocol://store-link?url=URL=TITLE" ' the title is not stored,
just url is stored.
I don't have [[URL][TITLE]] but just URL !

Any idea ? Thanks.

-- 
Aline


Re: [O] Bug: (org-clock-in 4) fails from non-Org buffer due to nil org-complex-heading-regexp [9.1.13 (9.1.13-elpaplus @ ~/.emacs.d/elpa/org-plus-contrib-20180702/)]

2018-07-17 Thread Nicolas Goaziou
Hello,

Robert Irelan  writes:

> How to reproduce:
>
> 1. Clock into default task.
> 2. Switch to non-Org buffer (I used `*scratch*`).
> 3. Type C-u M-x org-clock-info
> 4. Type d to clock into default task (which is located in a buffer
>that's part of my agenda).
>
> Clocking in will then fail with the attached backtrace. It appears that
> this is happening due to a missing value for the variable
> `org-complex-heading-regexp`. Clocking in from an Org mode buffer
> works. I'd expect that org-clock-in would attempt to temporarily switch
> to that buffer to correctly set these buffer-local variables.
>
> Backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument stringp nil)
>   looking-at(nil)
>   org-heading-components()
>   org-clock-in((4))

Fixed. Thank you.

Regards,

-- 
Nicolas Goaziou



Re: [O] bug: org-table-sort-lines does only case sensitive alphabetical sorting

2018-07-17 Thread Sebastian Reuße


Heikki Lehvaslaiho  writes:

> x86_64-apple-darwin14.5.0

Looking at the C source of ‘string-collate-lessp’ (src/fns.c), it looks
like there exists a case where Emacs itself will fall back on
‘string-lessp’ even when ‘string-collate-lessp’ is invoked.

#else  /* !__STDC_ISO_10646__, !WINDOWSNT */
 return Fstring_lessp (s1, s2);
#endif /* !__STDC_ISO_10646__, !WINDOWSNT */

I can’t tell what the first macro evaluates to on your platform. Might
this be the cause?

An indication for whether your Emacs uses the locale at all may be
testing the following (presuming you have the German locale data
installed and compiled):

(string-collate-lessp "ß" "ssa" "de_DE.utf-8") ; t
(string-lessp "ß" "ssa")   ; nil

This is based on the German ‘ß’ ligature being sorted as if it were
equal to the string ‘ss’ (you can probably construct something analogous
using fi_FI). If the first call returns nil, your Emacs isn’t using the
locale data at all.

Kind regards,
SR

-- 
Insane cobra split the wood
Trader of the lowland breed
Call a jittney, drive away
In the slipstream we will stay



Re: [O] bug: org-table-sort-lines does only case sensitive alphabetical sorting

2018-07-17 Thread Heikki Lehvaslaiho
Thanks for replies,

I am using:
GNU Emacs 26.1 (build 1, x86_64-apple-darwin14.5.0, NS appkit-1348.17
Version 10.10.5 (Build 14F2511)) of 2018-05-31


This is what I get:

(string-collate-lessp "a" "x" "de_DE.utf-8" nil) ; t
(string-collate-lessp "a" "X" "de_DE.utf-8" t) ; nil
(string-collate-lessp "a" "x" "fi_FI.utf-8" nil) ; t
(string-collate-lessp "a" "X" "fi_FI.utf-8" t) ; nil


I think I have lost the sense how Emacs language environments work
after struggling for years with buffers getting automatically
converted to Latin-1. I started setting all possible variables to
'UTF-8 and finally something did it.

Now I tried again various values to see if they affect the org table
sorting:

(set-language-environment 'utf-8)
(set-language-environment 'English)
(set-language-environment 'Swedish)

(setq locale-coding-system 'utf-8)
(setq locale-coding-system 'fi_FI.utf-8)
(setq locale-coding-system 'de_DE.utf-8)
(setq locale-coding-system 'en_GB.utf-8)

Unfortunately none of these made any difference. Any suggestions?

I am testing sorting in a simple one column table:

| a |
| c |
| B |
| D |




 -Heikki

Heikki Lehväslaiho - skype:heikki_lehvaslaiho cell: +358 40 850 6640
http://about.me/heikki

On 14 July 2018 at 15:31, Sebastian Reuße  wrote:

> Hello Nicolas, hello Heikki,
>
> > Heikki Lehvaslaiho  writes:
>
> >> I can not see any change in function with the new code. Alphabetical
> >> sorting is fixedly case sensitive.
>
> Is your Emacs≤24? Emacs (surprisingly) only gained a facility for
> alphabetic (locale-sensitive) sorting with ver. 25. Before that, we will
> resort to using «string-lessp», which only sorts lexicographically (i.e,
> based on the binary character value, which means it is always
> case-sensitive on Unicode systems).
>
> If you are using GNU Emacs≥25, what locale are you using? FI_fi and most
> of the other western locales are based on ISO-14651, so you should
> always get case-*in*sensitive orderings, which is what I get with Emacs
> 26.1. So, evaluating the following should all yield «t»:
>
> (string-collate-lessp "a" "x" "de_DE.utf-8" nil)
> (string-collate-lessp "a" "X" "de_DE.utf-8" t)
> (string-collate-lessp "a" "x" "fi_FI.utf-8" nil)
> (string-collate-lessp "a" "X" "fi_FI.utf-8" t)
>
> Kind regards,
>
> Sebastian
>
> --
> Insane cobra split the wood
> Trader of the lowland breed
> Call a jittney, drive away
> In the slipstream we will stay
>