emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* 23.0.94; [PATCH] org-store-link broken within kbd macros
@ 2009-06-17 11:15 Andreas Seltenreich
  2009-06-24 12:17 ` Carsten Dominik
  2011-03-03 21:15 ` bug#3597: " Glenn Morris
  0 siblings, 2 replies; 14+ messages in thread
From: Andreas Seltenreich @ 2009-06-17 11:15 UTC (permalink / raw)
  To: emacs-pretest-bug; +Cc: emacs-orgmode

> Your bug report will be posted to the emacs-pretest-bug@gnu.org mailing list.

> Please describe exactly what actions triggered the bug
> and the precise symptoms of the bug:

org-store-link works fine when recording a keyboard macro but it is a
NOP when executing it.  The following change appears to fix it.

regards,
andreas

> In GNU Emacs 23.0.94.1 (x86_64-unknown-linux-gnu)
>  of 2009-05-28 on tengen

--8<---------------cut here---------------start------------->8---
*** org.el.~1.48.~	2009-02-20 10:02:49.000000000 +0100
--- org.el	2009-06-17 12:55:15.000000000 +0200
***************
*** 6594,6600 ****
  	  desc (or desc cpltxt))
      (if (equal desc "NONE") (setq desc nil))
  
!     (if (and (interactive-p) link)
  	(progn
  	  (setq org-stored-links
  		(cons (list link desc) org-stored-links))
--- 6594,6600 ----
  	  desc (or desc cpltxt))
      (if (equal desc "NONE") (setq desc nil))
  
!     (if (and (or (interactive-p) executing-kbd-macro) link)
  	(progn
  	  (setq org-stored-links
  		(cons (list link desc) org-stored-links))
--8<---------------cut here---------------end--------------->8---

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-17 11:15 23.0.94; [PATCH] org-store-link broken within kbd macros Andreas Seltenreich
@ 2009-06-24 12:17 ` Carsten Dominik
  2009-06-24 12:39   ` Andreas Seltenreich
  2011-03-03 21:15 ` bug#3597: " Glenn Morris
  1 sibling, 1 reply; 14+ messages in thread
From: Carsten Dominik @ 2009-06-24 12:17 UTC (permalink / raw)
  To: Andreas Seltenreich; +Cc: emacs-pretest-bug, emacs-orgmode

This looks to me as if it was a bug in keyboard macro execution,
which should call functions interactively.

- Carsten

On Jun 17, 2009, at 1:15 PM, Andreas Seltenreich wrote:

>> Your bug report will be posted to the emacs-pretest-bug@gnu.org  
>> mailing list.
>
>> Please describe exactly what actions triggered the bug
>> and the precise symptoms of the bug:
>
> org-store-link works fine when recording a keyboard macro but it is a
> NOP when executing it.  The following change appears to fix it.
>
> regards,
> andreas
>
>> In GNU Emacs 23.0.94.1 (x86_64-unknown-linux-gnu)
>> of 2009-05-28 on tengen
>
> --8<---------------cut here---------------start------------->8---
> *** org.el.~1.48.~	2009-02-20 10:02:49.000000000 +0100
> --- org.el	2009-06-17 12:55:15.000000000 +0200
> ***************
> *** 6594,6600 ****
>  	  desc (or desc cpltxt))
>      (if (equal desc "NONE") (setq desc nil))
>
> !     (if (and (interactive-p) link)
>  	(progn
>  	  (setq org-stored-links
>  		(cons (list link desc) org-stored-links))
> --- 6594,6600 ----
>  	  desc (or desc cpltxt))
>      (if (equal desc "NONE") (setq desc nil))
>
> !     (if (and (or (interactive-p) executing-kbd-macro) link)
>  	(progn
>  	  (setq org-stored-links
>  		(cons (list link desc) org-stored-links))
> --8<---------------cut here---------------end--------------->8---
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-24 12:17 ` Carsten Dominik
@ 2009-06-24 12:39   ` Andreas Seltenreich
  2009-06-24 12:44     ` Carsten Dominik
  2009-07-02  3:39     ` Samuel Wales
  0 siblings, 2 replies; 14+ messages in thread
From: Andreas Seltenreich @ 2009-06-24 12:39 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, 3597


[Sorry about setting Cc instead X-Debbugs-Cc and causing the duplicate
report.  I set a proper Mail-Followup-To header now.]

Carsten Dominik writes:

> This looks to me as if it was a bug in keyboard macro execution,
> which should call functions interactively.

The docstring for interactive-p has the following paragraph:

,----[ C-h f interactive-p RET ]
| The only known proper use of `interactive-p' is in deciding whether to
| display a helpful message, or how to display it.  If you're thinking
| of using it for any other purpose, it is quite likely that you're
| making a mistake.  Think: what do you want to do when the command is
| called from a keyboard macro?
`----

The elisp reference states:

,----[ (info "(elisp)Distinguish Interactive") ]
|  -- Function: interactive-p
|      This function returns `t' if the containing function (the one
|      whose code includes the call to `interactive-p') was called in
|      direct response to user input.  This means that it was called with
|      the function `call-interactively', and that a keyboard macro is
|      not running, and that Emacs is not running in batch mode.
`----

This sounds like interactive-p is working as documented and the
excplicit check I proposed would be neccessary.

Thanks,
andreas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-24 12:39   ` Andreas Seltenreich
@ 2009-06-24 12:44     ` Carsten Dominik
  2009-06-27  0:43       ` bug#3597: [Orgmode] " Stefan Monnier
  2009-07-02  3:39     ` Samuel Wales
  1 sibling, 1 reply; 14+ messages in thread
From: Carsten Dominik @ 2009-06-24 12:44 UTC (permalink / raw)
  To: Andreas Seltenreich; +Cc: emacs-orgmode, 3597


On Jun 24, 2009, at 2:39 PM, Andreas Seltenreich wrote:

>
> [Sorry about setting Cc instead X-Debbugs-Cc and causing the duplicate
> report.  I set a proper Mail-Followup-To header now.]
>
> Carsten Dominik writes:
>
>> This looks to me as if it was a bug in keyboard macro execution,
>> which should call functions interactively.
>
> The docstring for interactive-p has the following paragraph:
>
> ,----[ C-h f interactive-p RET ]
> | The only known proper use of `interactive-p' is in deciding  
> whether to
> | display a helpful message, or how to display it.  If you're thinking
> | of using it for any other purpose, it is quite likely that you're
> | making a mistake.  Think: what do you want to do when the command is
> | called from a keyboard macro?
> `----
>
> The elisp reference states:
>
> ,----[ (info "(elisp)Distinguish Interactive") ]
> |  -- Function: interactive-p
> |      This function returns `t' if the containing function (the one
> |      whose code includes the call to `interactive-p') was called in
> |      direct response to user input.  This means that it was called  
> with
> |      the function `call-interactively', and that a keyboard macro is
> |      not running, and that Emacs is not running in batch mode.
> `----
>
> This sounds like interactive-p is working as documented and the
> excplicit check I proposed would be neccessary.

True enough, and I am applying your fix.

Thanks.

- Carsten

>
> Thanks,
> andreas

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#3597: [Orgmode] 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-24 12:44     ` Carsten Dominik
@ 2009-06-27  0:43       ` Stefan Monnier
  2009-06-27  9:38         ` bug#3597: " Carsten Dominik
  0 siblings, 1 reply; 14+ messages in thread
From: Stefan Monnier @ 2009-06-27  0:43 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: emacs-orgmode, 3597, Andreas Seltenreich

>> This sounds like interactive-p is working as documented and the
>> excplicit check I proposed would be neccessary.
> True enough, and I am applying your fix.

IIUC you may want to use called-interactively-p instead.


        Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: bug#3597: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-27  0:43       ` bug#3597: [Orgmode] " Stefan Monnier
@ 2009-06-27  9:38         ` Carsten Dominik
  0 siblings, 0 replies; 14+ messages in thread
From: Carsten Dominik @ 2009-06-27  9:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: emacs-orgmode, 3597, Andreas Seltenreich

Thanks, I'll check it out.

- Carsten

On Jun 27, 2009, at 2:43 AM, Stefan Monnier wrote:

>>> This sounds like interactive-p is working as documented and the
>>> excplicit check I proposed would be neccessary.
>> True enough, and I am applying your fix.
>
> IIUC you may want to use called-interactively-p instead.
>
>
>        Stefan

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-24 12:39   ` Andreas Seltenreich
  2009-06-24 12:44     ` Carsten Dominik
@ 2009-07-02  3:39     ` Samuel Wales
  2009-07-02  5:52       ` Bastien
  1 sibling, 1 reply; 14+ messages in thread
From: Samuel Wales @ 2009-07-02  3:39 UTC (permalink / raw)
  To: Carsten Dominik, 3597, emacs-orgmode, seltenreich

I cannot use org-remember to save all my w3m tabs using remember and
keyboard macros.

Says command rang the bell, but I don't know which even with stack trace on.

  call-last-kbd-macro(nil kmacro-loop-setup-function)
  kmacro-call-macro(nil nil)
  kmacro-end-and-call-macro(nil)
  call-interactively(kmacro-end-and-call-macro)

Is this related?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd  macros
  2009-07-02  3:39     ` Samuel Wales
@ 2009-07-02  5:52       ` Bastien
  2009-07-02  6:05         ` Samuel Wales
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-02  5:52 UTC (permalink / raw)
  To: Samuel Wales; +Cc: seltenreich, emacs-orgmode, 3597, Carsten Dominik

Samuel Wales <samologist@gmail.com> writes:

> I cannot use org-remember to save all my w3m tabs using remember and
> keyboard macros.

Are you using a specific remember template when remembering those 
w3m tabs?  My guess is that your remember template tries to fetch
a title or same tab-related info that isn't available for some tab.

> Says command rang the bell, but I don't know which even with stack trace on.
>
>   call-last-kbd-macro(nil kmacro-loop-setup-function)
>   kmacro-call-macro(nil nil)
>   kmacro-end-and-call-macro(nil)
>   call-interactively(kmacro-end-and-call-macro)
>
> Is this related?

Looks like some tab prevents the macro from being repeated correctly.  

Maybe you can try to debug this like this:

1. use several identic tabs (and see if the error occurs);
2. use two different tabs, then three, etc.

HTH

-- 
 Bastien

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-07-02  5:52       ` Bastien
@ 2009-07-02  6:05         ` Samuel Wales
  2009-07-02  7:08           ` Bastien
  0 siblings, 1 reply; 14+ messages in thread
From: Samuel Wales @ 2009-07-02  6:05 UTC (permalink / raw)
  To: Bastien; +Cc: seltenreich, emacs-orgmode, 3597, Carsten Dominik

Hi Bastien,

It happens on all tabs.

          ("note" ?n      "* %? %i -- %a %U\n%i")

Thanks.

On Wed, Jul 1, 2009 at 22:52, Bastien<bastienguerry@googlemail.com> wrote:
> Samuel Wales <samologist@gmail.com> writes:
>
>> I cannot use org-remember to save all my w3m tabs using remember and
>> keyboard macros.
>
> Are you using a specific remember template when remembering those
> w3m tabs?  My guess is that your remember template tries to fetch
> a title or same tab-related info that isn't available for some tab.
>
>> Says command rang the bell, but I don't know which even with stack trace on.
>>
>>   call-last-kbd-macro(nil kmacro-loop-setup-function)
>>   kmacro-call-macro(nil nil)
>>   kmacro-end-and-call-macro(nil)
>>   call-interactively(kmacro-end-and-call-macro)
>>
>> Is this related?
>
> Looks like some tab prevents the macro from being repeated correctly.
>
> Maybe you can try to debug this like this:
>
> 1. use several identic tabs (and see if the error occurs);
> 2. use two different tabs, then three, etc.
>
> HTH
>
> --
>  Bastien
>



-- 
Myalgic encephalomyelitis is causing death and severe suffering
worse than MS.  Conflicts of interest are destroying research.
People get the disease at any time permanently.  Do science and
justice matter to you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd  macros
  2009-07-02  6:05         ` Samuel Wales
@ 2009-07-02  7:08           ` Bastien
  2009-07-02 18:02             ` Samuel Wales
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-02  7:08 UTC (permalink / raw)
  To: Samuel Wales; +Cc: seltenreich, emacs-orgmode, 3597, Carsten Dominik

Samuel Wales <samologist@gmail.com> writes:

> It happens on all tabs.

You mean on *each* tab?

>           ("note" ?n      "* %? %i -- %a %U\n%i")

Can you remember at least one tab with this template?

Can you send the full macro?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-07-02  7:08           ` Bastien
@ 2009-07-02 18:02             ` Samuel Wales
  2009-07-03  9:18               ` Bastien
  0 siblings, 1 reply; 14+ messages in thread
From: Samuel Wales @ 2009-07-02 18:02 UTC (permalink / raw)
  To: Bastien; +Cc: seltenreich, emacs-orgmode, 3597, Carsten Dominik

On each of my many emacs-w3m tabs, I can remember manually with f8 f8
n (my binding for org-remember and my ?n template which I sent).  It
grabs the title and URL perfectly.  I can also do m-right, which is my
binding for next tab.

To use the macro, I do c-x ( f8 f8 n m-right c-x ) .  To execute it I
do c-x e.  It does not get executed on any tabs.

Thanks.



On 2009-07-02, Bastien <bastienguerry@googlemail.com> wrote:
> Samuel Wales <samologist@gmail.com> writes:
>
>> It happens on all tabs.
>
> You mean on *each* tab?
>
>>           ("note" ?n      "* %? %i -- %a %U\n%i")
>
> Can you remember at least one tab with this template?
>
> Can you send the full macro?
>
> --
>  Bastien
>


-- 
Myalgic encephalomyelitis is causing death and severe suffering
worse than MS.  Conflicts of interest are destroying research.
People get the disease at any time permanently.  Do science and
justice matter to you?  http://www.meactionuk.org.uk/What_Is_ME_What_Is_CFS.htm

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd  macros
  2009-07-02 18:02             ` Samuel Wales
@ 2009-07-03  9:18               ` Bastien
  2009-07-26  0:44                 ` Samuel Wales
  0 siblings, 1 reply; 14+ messages in thread
From: Bastien @ 2009-07-03  9:18 UTC (permalink / raw)
  To: Samuel Wales; +Cc: seltenreich, emacs-orgmode, 3597, Carsten Dominik

Samuel Wales <samologist@gmail.com> writes:

> On each of my many emacs-w3m tabs, I can remember manually with f8 f8
> n (my binding for org-remember and my ?n template which I sent).  It
> grabs the title and URL perfectly.  I can also do m-right, which is my
> binding for next tab.
>
> To use the macro, I do c-x ( f8 f8 n m-right c-x ) .  To execute it I
> do c-x e.  It does not get executed on any tabs.

My other guess would be that the macro execution is too fast for the
display engine.  Maybe the trick is to insert a command in your macro
sequence that makes sure the tab is displayed correctly before you try
to remember it.  

C-x ( f8 f8 n M-> M-< c-x )
              ^^^^^^^ <- this goes to the end and beginning of buffer

Anyway, you might have clearer/cleverer answers on help-gnu-emacs@

HTH,

-- 
 Bastien

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-07-03  9:18               ` Bastien
@ 2009-07-26  0:44                 ` Samuel Wales
  0 siblings, 0 replies; 14+ messages in thread
From: Samuel Wales @ 2009-07-26  0:44 UTC (permalink / raw)
  To: Bastien; +Cc: seltenreich, emacs-orgmode, 3597, Carsten Dominik

Hi Bastien,

Thanks for the idea.

Doesn't work.

Maybe it's an emacs bug.

On Fri, Jul 3, 2009 at 02:18, Bastien<bastienguerry@googlemail.com> wrote:
> My other guess would be that the macro execution is too fast for the
> display engine.  Maybe the trick is to insert a command in your macro
> sequence that makes sure the tab is displayed correctly before you try
> to remember it.
>
> C-x ( f8 f8 n M-> M-< c-x )
>              ^^^^^^^ <- this goes to the end and beginning of buffer
>
> Anyway, you might have clearer/cleverer answers on help-gnu-emacs@
>
> HTH,
>
> --
>  Bastien
>

^ permalink raw reply	[flat|nested] 14+ messages in thread

* bug#3597: 23.0.94; [PATCH] org-store-link broken within kbd macros
  2009-06-17 11:15 23.0.94; [PATCH] org-store-link broken within kbd macros Andreas Seltenreich
  2009-06-24 12:17 ` Carsten Dominik
@ 2011-03-03 21:15 ` Glenn Morris
  1 sibling, 0 replies; 14+ messages in thread
From: Glenn Morris @ 2011-03-03 21:15 UTC (permalink / raw)
  To: 3597-done

Version: 23.2

Looks like this patch was in 23.2.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2011-03-03 21:36 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-17 11:15 23.0.94; [PATCH] org-store-link broken within kbd macros Andreas Seltenreich
2009-06-24 12:17 ` Carsten Dominik
2009-06-24 12:39   ` Andreas Seltenreich
2009-06-24 12:44     ` Carsten Dominik
2009-06-27  0:43       ` bug#3597: [Orgmode] " Stefan Monnier
2009-06-27  9:38         ` bug#3597: " Carsten Dominik
2009-07-02  3:39     ` Samuel Wales
2009-07-02  5:52       ` Bastien
2009-07-02  6:05         ` Samuel Wales
2009-07-02  7:08           ` Bastien
2009-07-02 18:02             ` Samuel Wales
2009-07-03  9:18               ` Bastien
2009-07-26  0:44                 ` Samuel Wales
2011-03-03 21:15 ` bug#3597: " Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).