[O] Bug: Org fontifying bracket links as plain links [8.2.10 (release_8.2.10 @ /home/bhj/external/local/emacs25/share/emacs/25.0.95/lisp/org/)]

2016-11-05 Thread Bao Haojun


When I wrote "[[http://hello]],hello", with a FULLWIDTH COMMA and no
space after it, the whole string is fontified as link, instead of just
the text in the brackets. This is because the org-plain-link-re is used
whereas org-bracket-link-regexp should have matched it, I think.

I understand that in English, there is normally a space after the comma,
thus org-plain-link-re works fine, but as a Chinese user, we don't put
space after a FULLWIDTH COMMA.

Currently I'm working around this with:

(defadvice org-make-link-regexps (after bhj/org-link-tweak activate)
(setq org-plain-link-re org-any-link-re))


Emacs : GNU Emacs 25.0.95.1 (x86_64-pc-linux-gnu, GTK+ Version 3.20.7)
of 2016-08-18
Package: Org-mode version 8.2.10 (release_8.2.10 @ 
/home/bhj/external/local/emacs25/share/emacs/25.0.95/lisp/org/)


current state:
==
(setq
org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe

org-babel-hide-result-toggle-maybe org-babel-header-arg-expand)
org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)

org-occur-hook '(org-first-headline-recenter)
org-metaup-hook '(org-babel-load-in-session-maybe)
org-confirm-shell-link-function 'yes-or-no-p
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)

org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-babel-pre-tangle-hook '(save-buffer)
org-mode-hook '(#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-show-block-all append local] 5]
#[nil "\300\301\302\303\304$\207"
[org-add-hook change-major-mode-hook org-babel-show-result-all append 
local] 5]

org-babel-result-hide-spec org-babel-hide-all-hashes)
org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)

org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers
org-cycle-hide-inline-tasks org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
org-confirm-elisp-link-function 'yes-or-no-p
org-metadown-hook '(org-babel-pop-to-session-maybe)
org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
)




Re: [O] org-jira.el

2012-01-09 Thread Bao Haojun
Hi OSiUX,



OSiUX  writes:
> Hi Bao Haojun,
>
> I finally discovered the error, I was using an anonymous proxy server
> and JIRA apparently did not return the correct xml.
>
> Does not work in emacs, but in emacs 24 enabling the debug managed to
> capture the error::
>
>   (let ( (url-request-method "GET") (url-package-name)) 
>   (let ( ("soap-client.el") (url-package-version "1.0")  )) 
>   (let ( ((url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5"))) 
>   (let ( ((url-request-coding-system (quote utf-8))  )) 
>   (let ( ((url-http-attempt-keepalives nil)) (let ( (buffer  )) 
>   (let ( ((url-retrieve-synchronously url))) (with-current-buffer)) 
>   (let ( (buffer (declare (special url-http-response-status)))) 
>   (let ( ((if (> url-http-response-status 299) (error "Error )) 
>   (let ( (retrieving WSDL: %s" url-http-response-status mime-part)) 
>   (let ( ((mm-dissect-buffer t t))) (unless mime-part (error "Failed )) 
>   (let ( (to decode response from server")) (unless (equal (car  )) 
>   (let ( ((mm-handle-type mime-part)) "text/xml") (error "Server )) 
>   (let ( (response is not an XML document"   )) 
>
> ... then disable the proxy, start using emacs and execute
> org-jira-get-projects got the list of projects and then some issues.
>
> Excellent work, I hope that the error messages to help correct for
> emacs23 org-jira.
>
> Finally I would like to know where to change the path for the projects,
> actually: /home/.org-jira
>
> Thank you very much!
> I'll stop now copy and paste from jira to  org-mode. ;-)
>
>
> Enviroment Emacs23:
>
> - Org-mode commit: 258aad0b9a428cec9195b22063e42df77dee19c2
> - GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.6) of
>   2011-10-25 on trouble, modified by Debian
> - org-jira commit: 6fd1fd891eb716871dc5d6d680f99585f1f3602e
>
> Enviroment Emacs24
> - Org-mode commit: 56c73255c0bdd27ac42af0a02ecea9336c4594d6
> - GNU Emacs 24.0.92.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.3) of
>   2012-01-05 on zelenka, modified by Debian
> - org-jira commit: 6fd1fd891eb716871dc5d6d680f99585f1f3602e

Great!

I was also using proxy through setting the url-proxy-services variable,
and the org-jira.el does not work. After some googling around, I found
that url-proxy-services supports disabling proxy for some hosts:

(setq url-proxy-services 
  (quote
   (("http" . "localhost:8580")
("no_proxy" . "^[^.]*$\\|sina.com"

(just in case you don't know this already:-)

For the org-jira save path, I will make it a defcustom.

Thanks!
-- 
All the best

 Bao Haojun



Re: [O] org-jira.el updated

2012-01-07 Thread Bao Haojun
Richard Riley  writes:

> Ken Williams  writes:
>
>> Bao Haojun  gmail.com> writes:
>>> I have updated the org-jira.el as suggested by Bastien and Richard
>>> Riley:
>>
>> Amazing.  Just 120 seconds ago I got out of a meeting where we talked about
>> using Jira more widely in our company, and I worried that I'd duplicate too 
>> much
>> between my org-mode journals and the Jira tracker.
>>
>> Then I go look at the org-mode list and this is the first message I see.  =)
>>
>> I'm going to need to upgrade to org-mode 7.8 and try this out.
>>
>
>
> I would love to see a video of jira being used in conjunction with
> org-mode.
>
> Anyone have one?
>
>
Good idea! I have recorded one and uploaded it to YouTube:

http://youtu.be/6Sp3h1Qlf4w

-- 
All the best

 Bao Haojun



[O] org-jira.el updated

2012-01-06 Thread Bao Haojun
Hi, all

I have updated the org-jira.el as suggested by Bastien and Richard
Riley:

- Renamed jira2 to jiralib, to avoid confusion with the '2' and add the
  note that it is a library (I looked to merge with jira.el, but backed
  off as I myself do not use jira-mode).

- Fixed a bug for emacs version < 23 when login.

- Merged the jira link type by Jonathan Arkell.

As a result, a minor change to installation in .emacs (emacswiki
updated):

#+begin_src emacs-lisp
(setq jiralib-url "http://jira-host";)
(require 'org-jira) ;jiralib is not explicitly required, since org-jira will 
load it
#+end_src

-- 
All the best

 Bao Haojun



Re: [O] org-jira.el

2012-01-06 Thread Bao Haojun
Hi, OSiUX

OSiUX  writes:

> El lun, 02 ene 2012, Bao Haojun decía:
>
>> Hi, all
>> 
>> I have implemented org-jira.el, bringing org-mode and Jira system
>> together.
>> 
>> Wrote a Wiki page for it on emacswiki:
>> http://www.emacswiki.org/emacs/OrgJiraMode
>> 
>> Hope somebody find it useful, if he/she is also using Jira and loves
>> org-mode.
>> 
>> 
>> 
>
> after running Mx jira2-login, I get the following error:
>
> Symbol's function definition is void: auth-source-search
>
> howto configure login?

I have fixed it. The auth-source-search is a new API from emacs24.

With the new code, you will be prompted for username and password if you
are using a lower version of EMACS.

BTW, I have also renamed jira2 to jiralib, so after you check out the
new code, you need change your .emacs accordingly:

#+begin_src emacs-lisp
(setq jiralib-url "http://jira-host";)
(require 'org-jira) ;jiralib is not explicitly required, since org-jira will 
load it
#+end_src

Thanks.

-- 
All the best

 Bao Haojun



Re: [O] org-jira.el

2012-01-06 Thread Bao Haojun
Hi Jonathan,
Jonathan Arkell  writes:

> Wow Bao!  I am just checking out your org-jira2 project right now...
>
> Your thing was what my thing (contrib/lisp/org-jira.el) was going to
> become when I got the time... Then I got put on a project that didn't use
> Jira, and abandoned it (as mentioned earlier).
>
> So yea, Bastien, Bao, and anyone else for that matter, go ahead and do
> what you like with that trivial piece of code. Rename it, delete it, fold
> it into the new library.
>

I have merged it. Now the jira link type will be opened by
org-jira-mode, jumping (retieving first if not done already) to the org
heading tracking the issue specified in the link.

By the way, do you mind if I keep using the name org-jira.el? org-jira2
is not a good name just as jira2 is not.

Thanks.
-- 
All the best

 Bao Haojun



Re: [O] org-jira.el

2012-01-05 Thread Bao Haojun
Thank you!

Jonathan Arkell  writes:

> Wow Bao!  I am just checking out your org-jira2 project right now...
>
> Your thing was what my thing (contrib/lisp/org-jira.el) was going to
> become when I got the time... Then I got put on a project that didn't use
> Jira, and abandoned it (as mentioned earlier).
>
> So yea, Bastien, Bao, and anyone else for that matter, go ahead and do
> what you like with that trivial piece of code. Rename it, delete it, fold
> it into the new library.
>
>
> Ironically enough, years later, I am back on a project that does use
> Jira.. :)
> __
>
>
> Jonathan Arkell
> Tech Lead
> Inspired By Drum & Bass, Scheme, Kawaii
>
> p. 403.206.4377
> 402 -- 11th Ave SE
> Calgary, AB, Canada T2G 0Y4
>
> jonath...@criticalmass.com
> criticalmass.com
>
>
>
>
>
>
>
>
>
> On 5/01/12 7:42 AM, "Bao Haojun"  wrote:
>
>>Bastien  writes:
>>
>>> Nick Dokos  writes:
>>>
>>>> The current contrib/lisp/org-jira.el is pretty trivial: it just defines
>>>> a jira link type, so maybe it can be integrated into the new
>>>>org-jira.el,
>>>> instead of having two of them lying around.
>>>
>>> Agreed.  In the same vein, perhaps jira2.el and jira.el could be merged
>>> into one single library.
>>
>>Agreed. I have not looked into org-mode source code yet, so do not know
>>about contrib/lisp/org-jira.el, but I think it is the same one on
>>emacswiki, which has been abandoned by its author. So, it will be
>>trivial to merge its functionality.
>>
>>You are also right that jira2.el and jira.el can be merged,
>>theoretically. The jira2.el, as a library, is a superset of jira.el in
>>terms of functionality, since jira2.el uses soap, while jira.el uses
>>xml-rpc; and soap is better supported by jira than xml-rpc.
>>
>>The difficulty lies in that jira.el is also a major mode (in addition to
>>providing the library for the major mode). To make sure backward
>>compatible will require some effort. Jira2.el, OTOH, has stopped to be a
>>major mode, and only provided library for (the new) org-jira.el.
>>
>>Anyway, I will try to update jira.el and contact the original author to
>>see if he agrees.
>>
>>
>
>
> The information contained in this message is confidential. It is
> intended to be read only by the individual or entity named above or
> their designee. If the reader of this message is not the intended
> recipient, you are hereby notified that any distribution of this
> message, in any form, is strictly prohibited. If you have received
> this message in error, please immediately notify the sender and delete
> or destroy any copy of this message.



Re: [O] org-jira.el

2012-01-05 Thread Bao Haojun

OSiUX  writes:

> El lun, 02 ene 2012, Bao Haojun decía:
>
>> Hi, all
>> 
>> I have implemented org-jira.el, bringing org-mode and Jira system
>> together.
>> 
>> Wrote a Wiki page for it on emacswiki:
>> http://www.emacswiki.org/emacs/OrgJiraMode
>> 
>> Hope somebody find it useful, if he/she is also using Jira and loves
>> org-mode.
>> 
>> 
>> 
>
> after running Mx jira2-login, I get the following error:
>
> Symbol's function definition is void: auth-source-search
>
> howto configure login?
Sorry, must be because I'm using emacs24. I will look into it and get back.



Re: [O] org-jira.el

2012-01-05 Thread Bao Haojun
Bastien  writes:

> Nick Dokos  writes:
>
>> The current contrib/lisp/org-jira.el is pretty trivial: it just defines
>> a jira link type, so maybe it can be integrated into the new org-jira.el,
>> instead of having two of them lying around.
>
> Agreed.  In the same vein, perhaps jira2.el and jira.el could be merged
> into one single library.

Agreed. I have not looked into org-mode source code yet, so do not know
about contrib/lisp/org-jira.el, but I think it is the same one on
emacswiki, which has been abandoned by its author. So, it will be
trivial to merge its functionality.

You are also right that jira2.el and jira.el can be merged,
theoretically. The jira2.el, as a library, is a superset of jira.el in
terms of functionality, since jira2.el uses soap, while jira.el uses
xml-rpc; and soap is better supported by jira than xml-rpc.

The difficulty lies in that jira.el is also a major mode (in addition to
providing the library for the major mode). To make sure backward
compatible will require some effort. Jira2.el, OTOH, has stopped to be a
major mode, and only provided library for (the new) org-jira.el.

Anyway, I will try to update jira.el and contact the original author to
see if he agrees.




Re: [O] org-jira.el... and Org conventions (Bastien, Carsten and all)

2012-01-03 Thread Bao Haojun
Hi Sebastien, 

"Sebastien Vauban"  writes:

> Hi Bao,
>
> "Bao Haojun" wrote:
>> I have implemented org-jira.el, bringing org-mode and Jira system
>> together.
>>
>> Wrote a Wiki page for it on emacswiki:
>> http://www.emacswiki.org/emacs/OrgJiraMode
>>
>> Hope somebody find it useful, if he/she is also using Jira and loves
>> org-mode.
>
> I had never heard of Jira, but your work definitely looks very promising.
> IMHO, it should be compared with org-x and its extension to Redmine, among
> others.

Thanks for the praise! Jira is a "commercial" issue tracker, but it also
seems to be OSS friendly (by allowing OSS community to use the software
for free; Apache is using it, see http://wiki.apache.org/general/ApacheJira).

Likewise I had not heard of org-x and Redmine, thanks for letting me know.
>
> But this triggers, for me, another "concern" which is the very wide variety of
> ways to define the same thing.

> ...

> So, my point is: wouldn't it be better if we proposed standard properties in
> Org (in the manual), and implemented mappings in the Org "integration"
> packages (org-jira, org-taskjuggler, org-redmine and the like)?
>
> So, say for example that, from now on, it's more standard in Org to use
> "Assignee" (or anything else) for representing who's assigned a task, and have
> every package map the property "Assignee" to whatever keyword used in external
> tools for representing that concept?

I can see your point, that standard thing is good, if it's already here,
I will definitely try comply to them.

But your worrying people need to transition from one system such as
org-jira to another such as org-x, I think they are not very
often. Because if it happens, it would mean that the COMPANY/COMMUNITY
has decided to switch from Jira to Redmine, can you imagine how often
that can be?

Besides, even if that really happens, it would also mean the
COMPANY/COMMUNITY has got a way to transition from Jira to Redmine, so
there would have already been a way to transit from org-jira to org-x:
org-jira -> Jira -> Redmine -> org-x (and vice versa).

So my point is, if someone try to make transition easy, they should do
it on the company level, such as from Jira to Redmine. Org mode feels
kind of personal to me, and I feel good enough to be able to sync
between company issue tracking system and my org-mode, no need for it to
be able to transit to another issue tracking system's org-mode.

Best Regards,
  Bao Haojun



[O] org-jira.el

2012-01-02 Thread Bao Haojun
Hi, all

I have implemented org-jira.el, bringing org-mode and Jira system
together.

Wrote a Wiki page for it on emacswiki:
http://www.emacswiki.org/emacs/OrgJiraMode

Hope somebody find it useful, if he/she is also using Jira and loves
org-mode.