Re: [Orgmode] getting Firefox tabs into org on a mac
Hi Samuel, thanks for taking the time to report your findings and ideas. On Fri, 23 Oct 2009 11:31:32 -0700 Samuel Wales samolog...@gmail.com wrote: Hi Andreas, On Tue, Oct 20, 2009 at 01:12, Andreas Burtzlaff and...@gmx.net wrote: I will add an entry to the tab context menu tonight to do this in one step. Thanks, kind of you. Concerning syncing I'm not sure I get your plan entirely. Is the main purpose of it to synchronize the tabs between different browsers? Yes, that would be nice. Also, you don't want to save a duplicate of the same tab. So this is a special case of having a list/tree of bookmarks sychronized between Org, Firefox and other browsers. It needs communication from Emacs to the browser plugin, which I had working once. I'll try to revive that code when I get time. It might be useful to have more than one remember template: one for saving all tabs and one for saving one tab. In the updated documentation take a look at the option List of characters specifying available remember templates. Another idea is to have a button on the status line that you can left click on to remember one tab. Ok, that would save one click at the expense of the status bar's cleaness. Would the middle mouse button do? Apparent bugs and suggestions follow. (Others not developing Fireforg need not read.) === There was a setting that I didn't understand having to do with using DOI. Perhaps how this works can be explained. Does it use the net? You might want to mention that it stands for digital object identifier. It searches for a Digital Object Identifier in the hmtl code of the site shown. If Prefetch links to extract is enabled, it does so also for all links in a website after it is loaded. I've updated the documentation. I had to change head -1 to head -n 1 in the pull script to fix an error in head. head is /sw/bin/head, perhaps from some fink or macports package. That's fixed, thanks. Perhaps the error messages in emacs and ff can explain what you need to do to fix them. Also, perhaps common non-working states can be checked for. That would make it easier. I used your suggested template: (fireforg ?w * %:description \n %:link %!) Sometimes, nothing happens. Other times, emacs opens a buffer that is blank. It expects you to do c-x # to finish the buffer. Currently nothing is happening, so I can't describe that one more fully. At one point I got this error message. error in process filter: Setting current directory: no such file or directory, /Users/.../fireforg/org-protocol:/remember:/http%3A%2F%2F... That all is a symptom of org-protocol not having been initialized. It might be nice to document whether any of the options will slow Firefox or Emacs down. (Even if none of them do.) Yes, done that. I noticed that the Read It Later extension no longer has a button. Might be a coincidence. I can't reproduce this with either order of installation. If this persists could you please check whether there are any errors in Tools-Error console concerning either of the plugins? Perhaps giving git instructions would make it easier to dl the .sh, .xpi, and .el all at once. git clone http://repo.or.cz/w/org-fireforg.git; did not work. (Something about corruption; I don't have the output now.) git clone http://repo.or.cz/r/org-fireforg.git The directory w shows the website for the project. -- Andreas That is all the bug reporting I can do. I will have to stop trying to get Fireforg to work. I cannot make further attempts as debugging requires far too much physical use of keyboard and mouse. Thanks. On Tue, Oct 20, 2009 at 17:00, Andreas Burtzlaff and...@gmx.net wrote: On Tue, 20 Oct 2009 10:12:42 +0200 Andreas Burtzlaff and...@gmx.net wrote: On Mon, 19 Oct 2009 20:40:54 -0700 Samuel Wales samolog...@gmail.com wrote: I have a huge number of Firefox tabs that I want to get into org. Figuring out how has gotten complicated, despite good documentation out there. I want simply title and url for each tab. Maybe like this: * Firefox tabs * Public Git Hosting - Worg.git/summary http://repo.or.cz/w/Worg.git * Google Search http://www.google.com Would be nice to get fancier by allowing annotations (for use by fireforg?). And allowing syncing back and forth. But first, I just want to get started. I envision two ways of doing this. Maybe there are more. 1) Have emacs or a script convert one of the folders in the bookmark file to an org outline as above. 2) Have org-mac-protocol set up for individual tabs to be clicked to get them remembered. If I do (2), then I'd want it to be easy. That is, without having to switch from mouse to keyboard. But does (2) work on a Mac? Last I heard, org-mac-protocol works for Safari, but not Firefox. Fireforg has a workaround for Macs:
Re: [Orgmode] getting Firefox tabs into org on a mac
On Fri, 23 Oct 2009 12:56:15 -0700 Samuel Wales samolog...@gmail.com wrote: Minor correction and new error messages. The process filter error message was probably due to not running the fireforg things in .emacs. I had commented them out because they take several minutes to load the links in org-agenda-files, and when I restarted emacs to try to get fireforg to work, they didn't get run. Generating and looking up the registry doesn't scale well. With a huge amount of links in the agenda files a proper database like sqlite would be needed instead of generating a huge xml file that needs to be parsed all the while. If I get time I might try that. Here are new error messages. error in process filter: org-protocol-unhex-compound: Invalid character: 8211, #o20023, #x2013 error in process filter: Invalid character: 8211, #o20023, #x2013 Using only the org-protocol bookmarks I get the same error with Emacs 22 but not with Emacs 23, when trying to remember the URL: http://orgmode.org/worg/org-contrib/org-protocol.php A full backtrace is attached. 8211 seems to be the ndash in the title. What Emacs version are you using? Sebastian, any idea? -- Andreas Debugger entered--Lisp error: (error Invalid character: 8211, #o20023, #x2013) char-to-string(8211) (concat ret (char-to-string sum)) (setq ret (concat ret (char-to-string sum))) (progn (setq ret (concat ret ...)) (setq sum 0)) (if (= 0 eat) (progn (setq ret ...) (setq sum 0))) (when (= 0 eat) (setq ret (concat ret ...)) (setq sum 0)) (let* ((b ...) (a ...) (b ...) (c1 ...) (c2 ...) (val ...) (shift ...) (xor ...)) (if (= val 192) (setq eat shift)) (setq val (logxor val xor)) (setq sum (+ ... val)) (if ( eat 0) (setq eat ...)) (when (= 0 eat) (setq ret ...) (setq sum 0))) (while bytes (let* (... ... ... ... ... ... ... ...) (if ... ...) (setq val ...) (setq sum ...) (if ... ...) (when ... ... ...))) (let* ((bytes ...) (ret ) (eat 0) (sum 0)) (while bytes (let* ... ... ... ... ... ...)) ret) org-protocol-unhex-compound(%20%E2%80%93%20) (let* ((start ...) (end ...) (hex ...) (replacement ...)) (setq tmp (concat tmp ... replacement)) (setq str (substring str end))) (while (string-match \\(% [0-9a-f][0-9a-f]\\)+ str) (let* (... ... ... ...) (setq tmp ...) (setq str ...))) (let ((tmp ) (case-fold-search t)) (while (string-match \ \(%[0-9a-f][0-9a-f]\\)+ str) (let* ... ... ...)) (setq tmp (concat tmp str)) tmp) org-protocol-unhex-string(org-protocol.el%20%E2%80%93% 20Intercept%20calls%20from%20emacsclient%20to%20trigger%20custom% 20actions) mapcar(org-protocol-unhex-string (http%3A%2F%2Forgmode.org% 2Fworg%2Forg-contrib%2Forg-protocol.php org-protocol.el%20%E2%80%93% 20Intercept%20calls%20from%20emacsclient%20to%20trigger%20custom% 20actions )) (if (fboundp unhexify) (mapcar unhexify split-parts) (mapcar (quote org-protocol-unhex-string) split-parts)) (if unhexify (if (fboundp unhexify) (mapcar unhexify split-parts) (mapcar ... split-parts)) split-parts) (let* ((sep ...) (split-parts ...)) (if unhexify (if ... ... ...) split-parts)) org-protocol-split-data(http%3A %2F%2Forgmode.org%2Fworg%2Forg-contrib% 2Forg-protocol.php/org-protocol.el%20%E2%80%93%20Intercept%20calls% 20from%20emacsclient%20to%20trigger%20custom%20actions/ t) (let* ((parts ...) (template ...) (url ...) (type ...) (title ...) (region ...) (orglink ...) remember-annotation-functions) (setq org-stored-links (cons ... org-stored-links)) (kill-new orglink) (org-store-link-props :type type :link url :description title :initial region) (raise-frame) (org-remember nil (string-to-char template))) (if (and (boundp ...) (fboundp ...)) (let* (... ... ... ... ... ... ... remember-annotation-functions) (setq org-stored-links ...) (kill-new orglink) (org-store-link-props :type type :link url :description title :initial region) (raise-frame) (org-remember nil ...)) (message Org-mode not loaded.)) org-protocol-remember(http%3A%2F%2Forgmode.org %2Fworg%2Forg-contrib%2Forg-protocol.php/org-protocol.el%20%E2%80%93% 20Intercept%20calls%20from%20emacsclient%20to%20trigger%20custom% 20actions/) funcall(org-protocol-remember http%3A%2F%2Forgmode.org% 2Fworg%2Forg-contrib%2Forg-protocol.php/org-protocol.el%20%E2%80%93% 20Intercept%20calls%20from%20emacsclient%20to%20trigger%20custom% 20actions/) (throw (quote fname) (funcall func result)) (if greedy nil (throw (quote fname) (funcall func result))) (unless greedy (throw (quote fname) (funcall func result))) (progn (unless greedy (throw ... ...)) (funcall func result) (throw (quote fname) t)) (if (fboundp func) (progn (unless greedy ...) (funcall func result) (throw ... t))) (when (fboundp func) (unless greedy (throw ... ...)) (funcall func result) (throw (quote fname) t)) (let* ((func ...) (greedy ...) (splitted ...) (result ...)) (when (plist-get ... :kill-client) (message Greedy org-protocol handler. Killing client.) (server-edit)) (when (fboundp func) (unless greedy ...) (funcall func result) (throw ... t))) (progn (let* (... ... ... ...)
Re: [Orgmode] getting Firefox tabs into org on a mac
Hi Andreas, On Tue, Oct 20, 2009 at 01:12, Andreas Burtzlaff and...@gmx.net wrote: I will add an entry to the tab context menu tonight to do this in one step. Thanks, kind of you. Concerning syncing I'm not sure I get your plan entirely. Is the main purpose of it to synchronize the tabs between different browsers? Yes, that would be nice. Also, you don't want to save a duplicate of the same tab. It might be useful to have more than one remember template: one for saving all tabs and one for saving one tab. Another idea is to have a button on the status line that you can left click on to remember one tab. Apparent bugs and suggestions follow. (Others not developing Fireforg need not read.) === There was a setting that I didn't understand having to do with using DOI. Perhaps how this works can be explained. Does it use the net? You might want to mention that it stands for digital object identifier. I had to change head -1 to head -n 1 in the pull script to fix an error in head. head is /sw/bin/head, perhaps from some fink or macports package. Perhaps the error messages in emacs and ff can explain what you need to do to fix them. Also, perhaps common non-working states can be checked for. That would make it easier. I used your suggested template: (fireforg ?w * %:description \n %:link %!) Sometimes, nothing happens. Other times, emacs opens a buffer that is blank. It expects you to do c-x # to finish the buffer. Currently nothing is happening, so I can't describe that one more fully. At one point I got this error message. error in process filter: Setting current directory: no such file or directory, /Users/.../fireforg/org-protocol:/remember:/http%3A%2F%2F... It might be nice to document whether any of the options will slow Firefox or Emacs down. (Even if none of them do.) I noticed that the Read It Later extension no longer has a button. Might be a coincidence. Perhaps giving git instructions would make it easier to dl the .sh, .xpi, and .el all at once. git clone http://repo.or.cz/w/org-fireforg.git; did not work. (Something about corruption; I don't have the output now.) That is all the bug reporting I can do. I will have to stop trying to get Fireforg to work. I cannot make further attempts as debugging requires far too much physical use of keyboard and mouse. Thanks. On Tue, Oct 20, 2009 at 17:00, Andreas Burtzlaff and...@gmx.net wrote: On Tue, 20 Oct 2009 10:12:42 +0200 Andreas Burtzlaff and...@gmx.net wrote: On Mon, 19 Oct 2009 20:40:54 -0700 Samuel Wales samolog...@gmail.com wrote: I have a huge number of Firefox tabs that I want to get into org. Figuring out how has gotten complicated, despite good documentation out there. I want simply title and url for each tab. Maybe like this: * Firefox tabs * Public Git Hosting - Worg.git/summary http://repo.or.cz/w/Worg.git * Google Search http://www.google.com Would be nice to get fancier by allowing annotations (for use by fireforg?). And allowing syncing back and forth. But first, I just want to get started. I envision two ways of doing this. Maybe there are more. 1) Have emacs or a script convert one of the folders in the bookmark file to an org outline as above. 2) Have org-mac-protocol set up for individual tabs to be clicked to get them remembered. If I do (2), then I'd want it to be easy. That is, without having to switch from mouse to keyboard. But does (2) work on a Mac? Last I heard, org-mac-protocol works for Safari, but not Firefox. Fireforg has a workaround for Macs: http://orgmode.org/worg/org-devel.php#sec-1.2.6 So you could select the tabs one after another and trigger remember from the Fireforg status bar menu. (This menu is accessible by right clicking on the status bar entry.) I will add an entry to the tab context menu tonight to do this in one step. With the latest version it is possible to pass all tabs to remember by selecting All tabs- remember (..) in the status bar menu. This only makes sense when using a remember template that stores the note automatically (%! in the template string). Your proposed format would be: * %:description \n %:link %! If the mac workaround is enabled and the latest version of pull.sh is used, then this should also work on a Mac. Andreas Concerning syncing I'm not sure I get your plan entirely. Is the main purpose of it to synchronize the tabs between different browsers? Andreas Ideas very welcome. I am stuck here. Thanks. P.S. I /also/ have a huge number of Safari tabs and a huge number of emacs-w3m tabs. I've found those also difficult to orgify. So ideas here are also welcome. But Firefox is more important now. ___ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org
Re: [Orgmode] getting Firefox tabs into org on a mac
Minor correction and new error messages. The process filter error message was probably due to not running the fireforg things in .emacs. I had commented them out because they take several minutes to load the links in org-agenda-files, and when I restarted emacs to try to get fireforg to work, they didn't get run. Here are new error messages. error in process filter: org-protocol-unhex-compound: Invalid character: 8211, #o20023, #x2013 error in process filter: Invalid character: 8211, #o20023, #x2013 On 2009-10-23, Samuel Wales samolog...@gmail.com wrote: Hi Andreas, On Tue, Oct 20, 2009 at 01:12, Andreas Burtzlaff and...@gmx.net wrote: I will add an entry to the tab context menu tonight to do this in one step. Thanks, kind of you. Concerning syncing I'm not sure I get your plan entirely. Is the main purpose of it to synchronize the tabs between different browsers? Yes, that would be nice. Also, you don't want to save a duplicate of the same tab. It might be useful to have more than one remember template: one for saving all tabs and one for saving one tab. Another idea is to have a button on the status line that you can left click on to remember one tab. Apparent bugs and suggestions follow. (Others not developing Fireforg need not read.) === There was a setting that I didn't understand having to do with using DOI. Perhaps how this works can be explained. Does it use the net? You might want to mention that it stands for digital object identifier. I had to change head -1 to head -n 1 in the pull script to fix an error in head. head is /sw/bin/head, perhaps from some fink or macports package. Perhaps the error messages in emacs and ff can explain what you need to do to fix them. Also, perhaps common non-working states can be checked for. That would make it easier. I used your suggested template: (fireforg ?w * %:description \n %:link %!) Sometimes, nothing happens. Other times, emacs opens a buffer that is blank. It expects you to do c-x # to finish the buffer. Currently nothing is happening, so I can't describe that one more fully. At one point I got this error message. error in process filter: Setting current directory: no such file or directory, /Users/.../fireforg/org-protocol:/remember:/http%3A%2F%2F... It might be nice to document whether any of the options will slow Firefox or Emacs down. (Even if none of them do.) I noticed that the Read It Later extension no longer has a button. Might be a coincidence. Perhaps giving git instructions would make it easier to dl the .sh, .xpi, and .el all at once. git clone http://repo.or.cz/w/org-fireforg.git; did not work. (Something about corruption; I don't have the output now.) That is all the bug reporting I can do. I will have to stop trying to get Fireforg to work. I cannot make further attempts as debugging requires far too much physical use of keyboard and mouse. Thanks. On Tue, Oct 20, 2009 at 17:00, Andreas Burtzlaff and...@gmx.net wrote: On Tue, 20 Oct 2009 10:12:42 +0200 Andreas Burtzlaff and...@gmx.net wrote: On Mon, 19 Oct 2009 20:40:54 -0700 Samuel Wales samolog...@gmail.com wrote: I have a huge number of Firefox tabs that I want to get into org. Figuring out how has gotten complicated, despite good documentation out there. I want simply title and url for each tab. Maybe like this: * Firefox tabs * Public Git Hosting - Worg.git/summary http://repo.or.cz/w/Worg.git * Google Search http://www.google.com Would be nice to get fancier by allowing annotations (for use by fireforg?). And allowing syncing back and forth. But first, I just want to get started. I envision two ways of doing this. Maybe there are more. 1) Have emacs or a script convert one of the folders in the bookmark file to an org outline as above. 2) Have org-mac-protocol set up for individual tabs to be clicked to get them remembered. If I do (2), then I'd want it to be easy. That is, without having to switch from mouse to keyboard. But does (2) work on a Mac? Last I heard, org-mac-protocol works for Safari, but not Firefox. Fireforg has a workaround for Macs: http://orgmode.org/worg/org-devel.php#sec-1.2.6 So you could select the tabs one after another and trigger remember from the Fireforg status bar menu. (This menu is accessible by right clicking on the status bar entry.) I will add an entry to the tab context menu tonight to do this in one step. With the latest version it is possible to pass all tabs to remember by selecting All tabs- remember (..) in the status bar menu. This only makes sense when using a remember template that stores the note automatically (%! in the template string). Your proposed format would be: * %:description \n %:link %! If the mac workaround is enabled and the latest version of pull.sh is used, then this should also work on a Mac. Andreas
Re: [Orgmode] getting Firefox tabs into org on a mac
On Mon, 19 Oct 2009 20:40:54 -0700 Samuel Wales samolog...@gmail.com wrote: I have a huge number of Firefox tabs that I want to get into org. Figuring out how has gotten complicated, despite good documentation out there. I want simply title and url for each tab. Maybe like this: * Firefox tabs * Public Git Hosting - Worg.git/summary http://repo.or.cz/w/Worg.git * Google Search http://www.google.com Would be nice to get fancier by allowing annotations (for use by fireforg?). And allowing syncing back and forth. But first, I just want to get started. I envision two ways of doing this. Maybe there are more. 1) Have emacs or a script convert one of the folders in the bookmark file to an org outline as above. 2) Have org-mac-protocol set up for individual tabs to be clicked to get them remembered. If I do (2), then I'd want it to be easy. That is, without having to switch from mouse to keyboard. But does (2) work on a Mac? Last I heard, org-mac-protocol works for Safari, but not Firefox. Fireforg has a workaround for Macs: http://orgmode.org/worg/org-devel.php#sec-1.2.6 So you could select the tabs one after another and trigger remember from the Fireforg status bar menu. (This menu is accessible by right clicking on the status bar entry.) I will add an entry to the tab context menu tonight to do this in one step. Concerning syncing I'm not sure I get your plan entirely. Is the main purpose of it to synchronize the tabs between different browsers? Andreas Ideas very welcome. I am stuck here. Thanks. P.S. I /also/ have a huge number of Safari tabs and a huge number of emacs-w3m tabs. I've found those also difficult to orgify. So ideas here are also welcome. But Firefox is more important now. ___ 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 ___ 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
Re: [Orgmode] getting Firefox tabs into org on a mac
On Tue, 20 Oct 2009 10:12:42 +0200 Andreas Burtzlaff and...@gmx.net wrote: On Mon, 19 Oct 2009 20:40:54 -0700 Samuel Wales samolog...@gmail.com wrote: I have a huge number of Firefox tabs that I want to get into org. Figuring out how has gotten complicated, despite good documentation out there. I want simply title and url for each tab. Maybe like this: * Firefox tabs * Public Git Hosting - Worg.git/summary http://repo.or.cz/w/Worg.git * Google Search http://www.google.com Would be nice to get fancier by allowing annotations (for use by fireforg?). And allowing syncing back and forth. But first, I just want to get started. I envision two ways of doing this. Maybe there are more. 1) Have emacs or a script convert one of the folders in the bookmark file to an org outline as above. 2) Have org-mac-protocol set up for individual tabs to be clicked to get them remembered. If I do (2), then I'd want it to be easy. That is, without having to switch from mouse to keyboard. But does (2) work on a Mac? Last I heard, org-mac-protocol works for Safari, but not Firefox. Fireforg has a workaround for Macs: http://orgmode.org/worg/org-devel.php#sec-1.2.6 So you could select the tabs one after another and trigger remember from the Fireforg status bar menu. (This menu is accessible by right clicking on the status bar entry.) I will add an entry to the tab context menu tonight to do this in one step. With the latest version it is possible to pass all tabs to remember by selecting All tabs- remember (..) in the status bar menu. This only makes sense when using a remember template that stores the note automatically (%! in the template string). Your proposed format would be: * %:description \n %:link %! If the mac workaround is enabled and the latest version of pull.sh is used, then this should also work on a Mac. Andreas Concerning syncing I'm not sure I get your plan entirely. Is the main purpose of it to synchronize the tabs between different browsers? Andreas Ideas very welcome. I am stuck here. Thanks. P.S. I /also/ have a huge number of Safari tabs and a huge number of emacs-w3m tabs. I've found those also difficult to orgify. So ideas here are also welcome. But Firefox is more important now. ___ 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 ___ 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 ___ 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
Re: [Orgmode] getting Firefox tabs into org on a mac
Thanks, James. -- Q: How many CDC scientists does it take to screw in a lightbulb? A: You only think it's dark. -- CDC has DENIED CFS since the 1980s == Retrovirus: http://www.wpinstitute.org/xmrv/xmrv_qa.html ___ 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