Re: [O] three bugs/misfeatures in org-reveal (or is org-reveal the wrong way to reveal around point?)

2015-01-17 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 i think i found one of the bugs in org.el's org-show-context.  is
 anybody willing to confirm and fix it?

 On 8/5/13, Samuel Wales samolog...@gmail.com wrote:
   ;; bug 1: when point is in entry text, the first child of that
   ;; entry shows, but its siblings (i.e. the other children) do

Siblings are other headlines at the same level, not children.

   ;; not show, even though i have org-show-siblings and
   ;; org-show-hierarchy-above both set to t.

 (when following-p
   ;; Show next sibling, or heading below text
   (save-excursion
   (and (if heading-p (org-goto-sibling) (outline-next-heading))
(org-flag-heading nil
 (when siblings-p (org-show-siblings))

 the part in the save-excursion needs to check for siblings-p also.

I don't understand why it should. SIBLINGS-P means show all siblings.
This is handled later in the function.


Regards,

-- 
Nicolas Goaziou



Re: [O] bug: isearch puts ellipses at top of window

2015-01-17 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 run this (after substituting in where you keep org maint) and search
 for lightly org:

 thanks.

 samuel

 === call

 emacs -Q --geometry -0+0 --geometry 80x30 --eval '(setq load-path
 (append (list(substitute-in-file-name $delorgsrc/lisp)
 (substitute-in-file-name $delorgsrc/contrib/lisp)) load-path))'
 bug-isearch.org

 ===

 here is the org file to use:

 === bug-isearch.org

FWIW, I cannot reproduce it.


Regards,

-- 
Nicolas Goaziou



Re: [O] [PATCH] Proposal for «session» documentation

2015-01-17 Thread Achim Gratz
abonnements writes:
 PS: sorry to be curious but I can't figure out is the language behind
 2014ko abenudak 22an, abonnements-ek idatzi zuen ( :-) )

Basque.


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

SD adaptation for Waldorf rackAttack V1.04R1:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] bug: isearch hides text that should be shown, ignoring all show variables

2015-01-17 Thread Nicolas Goaziou
Hello,

Samuel Wales samolog...@gmail.com writes:

 a similar bug to bug: isearch puts ellipses at top of window [which
 has an ecm]:

 * aa
 * a
 text
 *** b
 text
 *** c
 text
 * d

 and isearch for text sometimes produces the output below at top of window:

 ...
 * a
 text
 ...
 * d

 and sometimes this:

 ...
 * a
 text
 *** b
 * d

 both are not what i want.  to me, nothing should ever be hidden in org
 unless it can be hidden using arrow keys and tab.

Indeed. I don't like it either, but it makes sense: to show the minimal
context around information. What you suggest means to show all top-level
children in the entry. This can be invasive when there are many
children.

Anyway, the point here is that you can use `org-reveal' (C-c C-r) to get
a more regular visibility.


Regards,

-- 
Nicolas Goaziou



[O] org-todo-recursive

2015-01-17 Thread David Arroyo Menéndez

Hello!

How can I do a org-todo-recursive? The idea is replace TODO by DONE in
a tree. Someone with a snippet?

Regards.



Re: [O] org-todo-recursive

2015-01-17 Thread Rasmus
Hi,

davi...@es.gnu.org (David Arroyo Menéndez) writes:

 How can I do a org-todo-recursive? The idea is replace TODO by DONE in
 a tree. Someone with a snippet?

Does org-depend.el do what you need?  [Your message is not very clear]

Cheers,
Rasmus

-- 
Governments should be afraid of their people




Re: [O] setting priority through S-down and S-up is laggy on i5 cpu

2015-01-17 Thread Michael Ziems

Hello,

what actually is org mode doing during org-shiftdown and org-shiftup as 
they are quite heavy with 302 in comparison to org-shiftleft with 15.

i tried elp-instrument-package but im not sure how to get data out of it.

thanks
Am 16.01.2015 um 22:44 schrieb Nicolas Goaziou:

Michael Ziems s...@xiron.de writes:


thanks for the reply. is this information already helpful:

- command-execute 1331  92%
  - call-interactively 1327  91%
   - org-shiftdown 302  20%
- call-interactively 302  20%
 - org-priority-down 302  20%
org-priority 302  20%
   - org-shiftup 293  20%
- call-interactively 293  20%
 - org-priority-up 293  20%
org-priority 293  20%
   - next-line 183  12%
- funcall 183  12%
 - #compiled 0xc28a69183  12%
  - line-move 183  12%
 line-move-visual 180  12%
   - org-cycle 145  10%
- org-cycle-internal-local 145  10%
 - run-hook-with-args 108   7%
  - org-optimize-window-after-visibility-change 104   7%
   - org-subtree-end-visible-p 8   0%
- pos-visible-in-window-p 6   0%
 - jit-lock-function 6   0%
  - jit-lock-fontify-now 6   0%
   + funcall 6   0%
  + org-cycle-hide-archived-subtrees 2   0%
  + org-cycle-show-empty-lines 2   0%
 + show-children 34   2%
   + org-agenda 138   9%
   + previous-line 120   8%
   + byte-code 76   5%
   + find-file 31   2%
   + save-buffer 19   1%
   + org-shiftleft 15   1%
   + execute-extended-command 3   0%
   + org-shiftright 2   0%
  - autoload-do-load 3   0%

I don't see anything suspicious.  Can you try using ELP (see
`elp-instrument-package') to instrument org package?


Regards,





Re: [O] setting priority through S-down and S-up is laggy on i5 cpu

2015-01-17 Thread Nicolas Goaziou
Michael Ziems s...@xiron.de writes:

 what actually is org mode doing during org-shiftdown and org-shiftup
 as they are quite heavy with 302 in comparison to org-shiftleft with
 15.

302 are spent on `org-priority'. Not sure which part is expensive.

 i tried elp-instrument-package but im not sure how to get data out of
 it.

Call M-x elp-results

It is better to run an uncompiled Org (C-u M-x org-reload)


Regards,



Re: [O] Usage of org-element api

2015-01-17 Thread Dieter Van Eessen
Hello,

Nicolas pointed me in the right direction! It was so obvious that I looked
right passed it:
Should just create a temp buffer with the text (headline+plainlist+text) i
wish to parse, then parse that temp-buffer... so obvious, sorry for the
waste of time.

Just to give an idea of what I'm trying to accomplish:
The first implementation remains simple: I'll create 2 interactive
functions,

1: Having point on headline, (concept-expand) will call
(concept-expand-headline) in which a level 1 headline containing a link is
expanded based on the content of that link. Subheadline becomes +
plainlist, +plainlist becomes -plainlist. For example:
* readme
   Some text...
** goal
Anything...
** [[*something][something]] step
+ woot
* [[*readme][readme]] This is a readme

Expanding headline 'this is a readme' would result in
* [[*readme][readme]] This is a readme
+ goal
+ [[*something][something]] step

2: Having point on item, (concept-expand) will call  (concept-expand-item)
in which items get expanded
For example: expanding item 'step results in
* [[*readme][readme]] This is a readme
   + goal
   + [[*something][something]] step
** [[link of choice or no link at all]] Do this first :step:

Now this does seem quite stupid. In a second and third implementation I'll
try to increase the locations where concepts may be found (project,
personal, system-wide), in files (based on filename and directory) or
subheadlines (instead of headlines), expanding subheadlines and files
(based on filename and directory),...

I'm kind of looking for a way to create some abstractions/concepts, without
ever being tied to a static model/template. People must never be forced to
use the system. It remains a free choice whether you use concepts, create
your own or just choose to write anything. Any document always remains
human readable plain text.  Some concepts will always be very divers,
others will survive the test of time and stabilize.

What do you think? Waste of time? :)

kind regards,
Dieter


On Sat, Jan 17, 2015 at 1:33 AM, Rasmus ras...@gmx.us wrote:

 Hi Dieter,

 Dieter Van Eessen dieter.van.ees...@gmail.com writes:

  Hello Rasmus,
 
  Thank you for the fast reply, the link you've given on interpreting is
 very
  useful ! Also didn't know there existed such thing as the org-dp library
 to
  manipulate org-elements, I'll sure check it out.

 I don't know org-dp myself, but Thorsten posts here regularly.

  More about question number 3:
  3) How can the output of (org-element-parse-secondary-string ...) be
  used.
  When I give a heading and bit of text as input (output of
  buffer-substring), it looks like it returns the 'content' of the
 region.
  Though I can't seem to use it anyway as 'CONTENT' for the functions
  requiring this.
 
  The reason I've tried this (and the internal org-element--parse-elements)
  is because I'd prefer not having to parse the whole buffer and still get
  the contents. The local parsing functions (org-element-at-point) and
  (org-element-context) don't contain content (stated in the org-element
 api,
  also tried it).

 But all elements contain :begin and :end and most :contens-begin
 and :contents-end (maybe sans an 's').

  Now I'm not sure IF I really NEED it? I could actually get the contents
  using the  :content-begin and :content-end and other properties from
  (org-elemen-at-point)  BUT I don't know the exact syntax the content
 should
  have and how to merge it with the element-list I get from
  (org-element-at-point) before feeding it to the
 org-element-interpret-data.

 Maybe it would be easier if you state plainly what your desired goal is?
 It's all a bit abstract.  You can write pretty sophisticated things using
 just (org-element-at-point) (e.g. I have a function that escapes
 *math-su{b,per}script* on double space at appropriate places).

  [...]
  At first I thought that the things behind #  were 'content' (for example
 in
  the output below. These don't show up in (org-element-at-point), thus
  explaining why they returned nil when asked for content. The
  org-element-parse-secondary-string also returns all things behind #. If
  this is NOT content, then how to manipulate this data (behind the #)
 whilst
  assuring that syntax and position remains valid for
  org-element-interpret-data to understand?

 If you want to manipulate the buffer text use the great functions.  You
 can condition on the element under point or whatever you desire and then
 use the regular functions you'd otherwise use.  I'm probably wrong, but it
 seems as if you trying to shoot flies with canons, or however the saying
 goes in English.  Also, recall there is no such thing as wrong Org-syntax
 (but there is unexpected outcomes).

 Check Org.el if you want.

 Cheers,
 Rasmus

 --
 Not everything that goes around comes back around, you know





-- 
gtz,
Dieter VE


Re: [O] bug: isearch puts ellipses at top of window

2015-01-17 Thread Samuel Wales
i use large fonts.  perhaps you need to try smaller geometry or larger fonts?

On 1/17/15, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Hello,

 Samuel Wales samolog...@gmail.com writes:

 run this (after substituting in where you keep org maint) and search
 for lightly org:

 thanks.

 samuel

 === call

 emacs -Q --geometry -0+0 --geometry 80x30 --eval '(setq load-path
 (append (list(substitute-in-file-name $delorgsrc/lisp)
 (substitute-in-file-name $delorgsrc/contrib/lisp)) load-path))'
 bug-isearch.org

 ===

 here is the org file to use:

 === bug-isearch.org

 FWIW, I cannot reproduce it.


 Regards,

 --
 Nicolas Goaziou



-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.



Re: [O] setting priority through S-down and S-up is laggy on i5 cpu

2015-01-17 Thread Nicolas Goaziou
Michael Ziems s...@xiron.de writes:

 thanks for the really good help here. Here the results:

 org-shiftdown
 Call Count: 4
 Elapsed time: 3.953
 Average time: 0.98825

I would need the detailed results, i.e., the 10 top entries from the
results buffer.

Regards,



Re: [O] three bugs/misfeatures in org-reveal (or is org-reveal the wrong way to reveal around point?)

2015-01-17 Thread Samuel Wales
thanks for clarifying.  that seems to eliminate all possibility of
specifying canonical visibility using org show variables.

thus, this is a feature that is strangely missing in org, as opposed
to a bug.  [yet it is what i think would be a good default for
newcomers.]

canonical visibility roughly means a visibility state that can be
created at any time using org-cycle and arrow keys.

for example, if only the first child is showing, then it is not
canonical visibility.  the only things that should NOT show are
entirely folded headers, blocks, etc.

this is the only kind of visibility that i ever use unless i am doing
a sparse tree, which is extremely rare.

the lack of ability to specify canonical visibility is the  reason i
have spent many years trying to fix it.  i have actually have now
around-defadviced the isearch version of org-show-context, but i don't
know what i am doing and it is slow and there are other contexts that
need fixing.  i think i will have to eliminate org-show-context
entirely if i am to get canonical visibility.



Re: [O] bug: isearch hides text that should be shown, ignoring all show variables

2015-01-17 Thread Samuel Wales
On 1/17/15, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 Anyway, the point here is that you can use `org-reveal' (C-c C-r) to get
 a more regular visibility.

i am pretty sure that no org variables allow specifying this so that
it happens without you doing that.

is it the case that doing org-reveal as an after defadvice to
org-show-context should guarantee canonical visibility?

if there are cases when it does not guarantee that, then what does?

thanks.



Re: [O] bug: isearch puts ellipses at top of window

2015-01-17 Thread Nicolas Richard
Nicolas Goaziou m...@nicolasgoaziou.fr writes:

 Hello,

 Samuel Wales samolog...@gmail.com writes:

 run this (after substituting in where you keep org maint) and search
 for lightly org:

 thanks.

 samuel

 === call

 emacs -Q --geometry -0+0 --geometry 80x30 --eval '(setq load-path
 (append (list(substitute-in-file-name $delorgsrc/lisp)
 (substitute-in-file-name $delorgsrc/contrib/lisp)) load-path))'
 bug-isearch.org

 ===

 here is the org file to use:

 === bug-isearch.org

 FWIW, I cannot reproduce it.

I retried and reproduced it with
emacs -Q -g 80x24+0+0 -L ~/sourcetrees/org-mode/lisp ~/tmp/bug-isearch.org


-- 
Nicolas Richard



Re: [O] bug: isearch puts ellipses at top of window

2015-01-17 Thread Nicolas Richard
Nicolas Richard theonewiththeevill...@yahoo.fr writes:
 Nicolas Goaziou m...@nicolasgoaziou.fr writes:
 FWIW, I cannot reproduce it.

 I retried and reproduced it with
 emacs -Q -g 80x24+0+0 -L ~/sourcetrees/org-mode/lisp
 ~/tmp/bug-isearch.org

Oops, my message went gone faster than I expected, sorry for its
brevity!

-- 
Nicolas Richard



Re: [O] New patches WAS Re: [PATCH] inline src block results can be removed

2015-01-17 Thread Nicolas Goaziou
Hello,

Aaron Ecay aarone...@gmail.com writes:

  (funcall wrap (concat #+BEGIN_ name)
 - (concat #+END_ (car (org-split-string name))
 + (concat #+END_ (car (org-split-string name)))
 + nil nil (concat {{{results(@@ name :) 
 @@)}}})))

 I think it would be more flexible to allow :wrap to change the name of
 the macro which is used, rather than to insert an export snippet.  If a
 custom export snippet is desired, this could be specified via the custom
 macro name – but the macro could also supply other special formatting.
 (This suggestion would impact the wording of the docstring addition
 suggested above.)  WDYT?

It would be more flexible, but it would also defeat the whole point of
the results macro, that is to be able to mark /unambiguously/ the
output of an inline block. Indeed, even if you can get the name of the
macro from the parameter, you cannot be sure the macro was generated by
the code block, unlike to a results macro.

Also, I don't think we really need this flexibility since any twist to
the output can be made at the Babel level, or even using
`org-babel-inline-result-wrap'.


Regards,

-- 
Nicolas Goaziou



Re: [O] setting priority through S-down and S-up is laggy on i5 cpu

2015-01-17 Thread Michael Ziems

Hello,

thanks for the really good help here. Here the results:

org-shiftdown
Call Count: 4
Elapsed time: 3.953
Average time: 0.98825


Am 17.01.2015 um 17:22 schrieb Nicolas Goaziou:

Michael Ziems s...@xiron.de writes:


what actually is org mode doing during org-shiftdown and org-shiftup
as they are quite heavy with 302 in comparison to org-shiftleft with
15.

302 are spent on `org-priority'. Not sure which part is expensive.


i tried elp-instrument-package but im not sure how to get data out of
it.

Call M-x elp-results

It is better to run an uncompiled Org (C-u M-x org-reload)


Regards,





[O] xml-rpc-request error for wordpress

2015-01-17 Thread Shiyuan
Hi all,
I have been using org2blog/wp package to manage my wordpress blog. It had
been woking very well until last week when things started to fail.
 org2blog/wp uses xml-rpc-request to connect to wordpress.com which returns
the 301 Error.  I haven't changed my emacs config for quite a long time. So
I guess something might have happened on the wordpress side or some emacs
packages break something.  I have googled around but cannot find any
relevant info.  I don't have too much experience about xml-rpc. Any help
about debugging this issue would be appreciated. The traceback is attached.
I can login wordpress and maintain my blog through the browser and web
interface.  Thanks.


 signal(error (Error during request: 301))
  error(Error during request: %s 301)
  (progn (error Error during request: %s url-http-response-status))
  (if ( url-http-response-status 299) (progn (error Error during request:
%s url-http-response-status)))
  (save-current-buffer (set-buffer buffer) (if (not (numberp
url-http-response-status)) (progn (error Why? url-http-response-status is
%s url-http-response-status))) (if ( url-http-response-status 299) (progn
(error Error during request: %s url-http-response-status
  (let ((buffer (url-retrieve-synchronously server-url)))
(save-current-buffer (set-buffer buffer) (if (not (numberp
url-http-response-status)) (progn (error Why? url-http-response-status is
%s url-http-response-status))) (if ( url-http-response-status 299) (progn
(error Error during request: %s url-http-response-status
(xml-rpc-request-process-buffer buffer))
  (if async-callback-function (url-retrieve server-url
async-callback-function) (let ((buffer (url-retrieve-synchronously
server-url))) (save-current-buffer (set-buffer buffer) (if (not (numberp
url-http-response-status)) (progn (error Why? url-http-response-status is
%s url-http-response-status))) (if ( url-http-response-status 299) (progn
(error Error during request: %s url-http-response-status
(xml-rpc-request-process-buffer buffer)))
  (cond ((boundp (quote url-be-asynchronous)) (if async-callback-function
(setq url-be-asynchronous t url-current-callback-data (list
async-callback-function (current-buffer)) url-current-callback-func (quote
xml-rpc-request-callback-handler)) (setq url-be-asynchronous nil))
(url-retrieve server-url t) (if (not url-be-asynchronous) (progn (let
((result (xml-rpc-request-process-buffer ...))) (if ( xml-rpc-debug 1)
(progn (print result ...))) result (t (if async-callback-function
(url-retrieve server-url async-callback-function) (let ((buffer
(url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer
buffer) (if (not (numberp url-http-response-status)) (progn (error Why?
url-http-response-status is %s url-http-response-status))) (if (
url-http-response-status 299) (progn (error Error during request: %s
url-http-response-status (xml-rpc-request-process-buffer buffer)
  (let ((url-request-method POST) (url-package-name xml-rpc.el)
(url-package-version xml-rpc-version) (url-request-data (concat ?xml
version=\1.0\  encoding=\UTF-8\?\n (let ((temp-buffer
(generate-new-buffer  *temp*))) (save-current-buffer (set-buffer
temp-buffer) (unwind-protect (progn ... ... ...) (and ... ... \n))
(url-mime-charset-string utf-8;q=1, iso-8859-1;q=0.5)
(url-request-coding-system xml-rpc-use-coding-system)
(url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons
Connection close) (cons Content-Type text/xml; charset=utf-8
(if ( xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer
request-data (cond ((boundp (quote url-be-asynchronous)) (if
async-callback-function (setq url-be-asynchronous t
url-current-callback-data (list async-callback-function (current-buffer))
url-current-callback-func (quote xml-rpc-request-callback-handler)) (setq
url-be-asynchronous nil)) (url-retrieve server-url t) (if (not
url-be-asynchronous) (progn (let ((result ...)) (if ( xml-rpc-debug 1)
(progn ...)) result (t (if async-callback-function (url-retrieve
server-url async-callback-function) (let ((buffer
(url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer
buffer) (if (not ...) (progn ...)) (if ( url-http-response-status 299)
(progn ...))) (xml-rpc-request-process-buffer buffer))
  (save-excursion (let ((url-request-method POST) (url-package-name
xml-rpc.el) (url-package-version xml-rpc-version) (url-request-data
(concat ?xml version=\1.0\  encoding=\UTF-8\?\n (let
((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer)
(unwind-protect ... ...))) \n)) (url-mime-charset-string utf-8;q=1,
iso-8859-1;q=0.5) (url-request-coding-system xml-rpc-use-coding-system)
(url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons
Connection close) (cons Content-Type text/xml; charset=utf-8
(if ( xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer
request-data (cond ((boundp (quote url-be-asynchronous))