Re: [O] naming and/or directly addressing particular windows?
On Sat, Dec 1, 2012 at 10:59 AM, Drew Adams wrote: >> Anyway: is it possible to give/get a name for a window that persists >> long enough to be called in functions? > > This might help: > > (defun icicle-make-window-alist (&optional all-p) > "Return an alist of entries (WNAME . WINDOW), where WNAME names WINDOW. > The name of the buffer in a window is used as its name, unless there > is more than one window displaying the same buffer. In that case, > WNAME includes a suffix [NUMBER], to make it a unique name. The > NUMBER order among window names that differ only by their [NUMBER] is > arbitrary. > > Non-nil argument ALL-P means use windows from all visible frames. > Otherwise, use only windows from the selected frame." > (lexical-let ((win-alist ()) > (count 2) > wname new-name) > (walk-windows (lambda (w) > (setq wname (buffer-name (window-buffer w))) > (if (not (assoc wname win-alist)) > (push (cons wname w) win-alist) > (setq new-name wname) > (while (assoc new-name win-alist) > (setq new-name (format "%s[%d]" wname count) > count (1+ count))) > (push (cons new-name w) win-alist)) > (setq count 2)) > 'no-mini > (if all-p 'visible 'this-frame)) > win-alist)) > > (This is used in command `icicle-select-window-by-name', which in turn is the > action function for multi-command `icicle-select-window'. Code here: > http://www.emacswiki.org/emacs-en/download/icicles-cmd1.el.) > > I'm guessing that there are other, similar functions available on Emacs Wiki - > start here, perhaps: http://www.emacswiki.org/emacs/CategoryWindows > I'm slowly starting to understand. I now have this primitive code, which at least sets up the windows the way I want them: (defun my-windows-function () "Trying to figure out how to get a nice windows config for writers-room-mode" (interactive ) (global-linum-mode 0) (delete-other-windows) (setq my-this-win (selected-window)) (setq my-winlist '()) (add-to-list 'my-winlist (cons 'guide (selected-window)) ) (split-window-horizontally) (fix-window-horizontal-size 35) (windmove-right) (add-to-list 'my-winlist (cons 'main (selected-window)) ) (split-window-horizontally) (windmove-right) (fix-window-horizontal-size 35) (add-to-list 'my-winlist (cons 'metadata (selected-window)) ) (split-window-vertically) (windmove-down) (add-to-list 'my-winlist (cons 'not-sure-what-this-is-for (selected-window)) ) (select-window(cdr(assoc 'guide my-winlist)) ) ) The final select-window ommand demonstrates that I can now address the windows by name (yay!). The next step for me is to rewrite the existing org-tree-to-indirect-buffer function so that it reliably sends org subtree indirect buffers to the "main" window (in the middle column of the frame). The function starts at line 7091 of org.el: http://orgmode.org/w/org-mode.git/blob/lisp/org.el I'm not having an easy time figuring out how that function decides which window to use when creating and focussing on the new indirect buffer. I can see (and the documentation states) that a choice is first made between using a new or dedicated frame, or the same frame with either the original or another window. But the code to put the buffer in another window in the same frame is quite simple: ((eq org-indirect-buffer-display 'other-window) (pop-to-buffer ibuf)) I've been chasing the code down to native emacs functions -- pop-to-buffer ends up relying on display-buffer -- but I haven't yet found a place where I an specify a particular window for the new buffer. Does anyone else know a way? Thanks again, Matt
[O] Problem with floating holidays
I am having problems with org-float and floating holidays, in particular the holiday of Thanksgiving, as an example. I have the following entry in my data file: * Anniversaries and Holidays #+CATEGORY: Holiday %%(org-float t 4 4) Thanksgiving I know that if I leave this in my file the agenda will show it every fourth Thursday of every month. How do I tell it that I only want it to happen in the month of November? I tried to enter the month 11 after the last 4 so that it appears as: %%(org-float t 4 4 11) Thanksgiving. This did not give me a correct result either. I have reviewed the forums and the org manual for the answer, but could not find it. My Emacs version is 23.3.1 and my Org-Mode version is 7.7. I hope that someone out there has the answer. Thanking You In Advance, John
Re: [O] [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
I can confirm that the behavior I described still exists. I checked with the latest version (8d22b119786206bbae98183b0fb61e3ab1b22a43) in maint branch of org-mode and the latest version (110979) in emacs-24 branch of Emacs bzr repository. I also checked with the master branch (6642177dee3ec04404ebd99391748f373ada3d2a) result was the same. Takafumi On Fri, Nov 9, 2012 at 3:34 PM, Takafumi Arakaki wrote: > Thanks, I will check maint first then. > > Takafumi > > On Fri, Nov 9, 2012 at 2:25 PM, Nicolas Goaziou wrote: >> Hello, >> >> Takafumi Arakaki writes: >> >>> Do you know if it is fixed in both master and maint, or only in >>> master? >> >> I don't know. If it's fixed already, I guess the patch was applied to >> maint. >> >> >> Regards, >> >> -- >> Nicolas Goaziou
Re: [O] naming and/or directly addressing particular windows?
On Sat, Dec 1, 2012 at 11:58 AM, Eduardo Ochs wrote: > Hi Matt, > > if you are considering using a little language to create window > configurations > then maybe you will find this interesting: > > http://angg.twu.net/eev-intros/find-multiwindow-intro.html > http://angg.twu.net/eev-current/eev-multiwindow.el.html totally interesting, somewhat opaque to me so far but i will keep trying to understand! Thanks, matt
[O] Opendocument export causes error
Dear Jambunathan, Thanks a lot for your help and providing such detailed debugging suggestions. To summarise, after I loaded the *.el files with load-library as you suggested I got the Opendocument export working. However, I still do not understand why this is not working normally. What now. As a hack I could put something in ~/.emacs that loads these libraries manually, but there is likely a better solution. I detail all debugging outputs below. Any suggestion where to go from here? Thanks a lot again! > M-x list-load-path-shadows RET Basically, subdirectories from two directories are loaded. One is the standard Emacs (in my case Aquamacs based on GNU Emacs 23.3.50.1 at /Applications/Mozart/Mozart.app/Contents/Resources/) and the other is my local emacs lisp directory at ~/emacs/. The full output is copied to the very end of this email. > Check where all org-odt.el When searching the whole file system only a single file org-odt.el is found in the load-path (in org-mode/lisp). It appears that this file is not part of my vanilla Emacs (Aquamacs, see above). > M-x locate-library RET org-compat RET In the following I am simply copying the message from *Messages* Library is file ~/emacs/org-mode/lisp/org-compat.elc > M-x locate-library RET org-odt RET Library is file ~/emacs/org-mode/lisp/org-odt.elc > M-x locate-library RET org-compat.el RET Library is file ~/emacs/org-mode/lisp/org-compat.el > M-x locate-library RET org-odt.el RET Library is file ~/emacs/org-mode/lisp/org-odt.el > M-x load-library RET org-compat.el RET > M-x load-library RET org-odt.el RET Done. Export works afterwards! The output in *Messages* is listed after this email. > M-x locate-library RET org-install RET Library is file ~/emacs/org-mode/lisp/org-install.el (Note the *.el, it is not compiled) > M-x locate-library RET org-autoloads RET No library org-autoloads in search path > M-x locate-library RET org-loaddefs RET Library is file ~/emacs/org-mode/lisp/org-loaddefs.el (Again, no compiled file) > (Try again the above commands with `.el' appended) It is always the same result as about. > Ideally your .emacs MUST have (require ') for only one of these > libraries. None of these libraries is actually loaded in ~/.emacs -- I recently commented out (require 'org-install) but some recent message from org-mode suggested to remove that. However, adding (require 'org-install) makes not difference. Any idea how to resolve this? Again thanks a lot! Best, Torsten > M-x load-library RET org-compat.el RET > M-x load-library RET org-odt.el RET Debug (org-odt): Searching for OpenDocument styles files... Debug (org-odt): Trying /usr/share/emacs/etc/org/styles/... [2 times] Debug (org-odt): Trying /Users/torsten/emacs/org-mode/etc/styles/... Debug (org-odt): Using styles under /Users/torsten/emacs/org-mode/etc/styles/ Loading /Users/torsten/emacs/org-mode/lisp/org-odt.el (source)...done Export buffer: Export subtree: Exporting to ODT using org-lparse... Using vacuous schema Loading reftex...done LaTeX to MathML converter not available. Using dvipng instead. Exporting... ODT export done, pushed to kill ring and clipboard Wrote /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/meta.xml Using vacuous schema Saving file /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/styles.xml... Wrote /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/styles.xml Wrote /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/mimetype Using vacuous schema Saving file /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/styles.xml... Wrote /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/styles.xml (No changes need to be saved) Saving file /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/META-INF/manifest.xml... Wrote /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/META-INF/manifest.xml Saving file /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/content.xml... Wrote /var/folders/Mc/Mc7BB2F3GxOLYJol0POQaTM/-Tmp-/odf-1712VN/content.xml Using vacuous schema (No changes need to be saved) Creating odt file... Running zip -mX0 MusicConstraintsBookProject.odt mimetype Running zip -rmTq MusicConstraintsBookProject.odt . Created /Users/torsten/texte/Bewerbungen/grant-applications/AHRC-application/MusicConstraintsBookProject.odt Parsing archive file...done. Opening file /Users/torsten/texte/Bewerbungen/grant-applications/AHRC-application/MusicConstraintsBookProject.odt Running open /Users/torsten/texte/Bewerbungen/grant-applications/AHRC-application/MusicConstraintsBookProject.odt...done > M-x list-load-path-shadows RET Checking 4 files in ~/emacs/kiwanami-emacs-calfw-v1.1... Checking 5 files in ~/emacs/org-mode/contrib/babel/langs... Checking 55 files in ~/emacs/org-mode/contrib/lisp... Checking 225 files in ~/emacs/org-mode/lisp... Checking 2 files in ~/emacs/planner-20060918/contrib.
[O] Patch: org-mac-iCal is a no-op on OS X 10.8
I just found that org-mac-iCal.el doesn't work on OS X 10.8 (Mountain Lion). The trivial patch below fixes this. Cheers, -Steve commit 71b50131b5e6ae00a5e6c2f0bff2cec377c68c0f (HEAD, refs/heads/master) Author: Steve Purcell Date: Sat Dec 1 14:06:02 2012 + org-mac-iCal: also use post-Leopard logic to concatenate calendars in 10.8 Modified contrib/lisp/org-mac-iCal.el diff --git a/contrib/lisp/org-mac-iCal.el b/contrib/lisp/org-mac-iCal.el index 0fdc95f..a48cf22 100644 --- a/contrib/lisp/org-mac-iCal.el +++ b/contrib/lisp/org-mac-iCal.el @@ -99,7 +99,7 @@ the the Emacs diary" ;; for each calendar, concatenate individual events into a single ics file (with-temp-buffer (shell-command "sw_vers" (current-buffer)) -(when (re-search-backward "10\\.[567]" nil t) +(when (re-search-backward "10\\.[5678]" nil t) (omi-concat-leopard-ics all-calendars))) ;; move all caldav ics files to the same place as local ics files
[O] beamer export: :BEAMER_envargs: is ignored
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, it seems to me that the :BEAMER_envargs: property is ignored unless :BEAMER_env: is set to "block". Is this a bug or am I missing something? What I'd want to do BTW is have a frame with two columns, and have in the left one a list and in the right one an image, with overlays such that first every item of the list appears, and then when it's done the image appears. I can do the column part with :BEAMER_col: allright, and I was hoping to achieve the overlays with (supposing the list in the first column has 4 items) :BEAMER_env: ignoreheading :BEAMER_engargs: <5-> in the properties of the image subtree... but it seems the envargs are not exported in the latex code. I'm using emacs 24.2 and org-mode 7.9.2 cheers, renato -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.19 (GNU/Linux) iQEcBAEBAgAGBQJQulVDAAoJEBz6xFdttjrf4HIIALW32/md9ZZ2okzIb3/VLM+J qIJyflGbTzdWgM//SEWjLVp843d+9HOmcPyV4j371K30sH/940A+FB397Om2XooB /QIAkiLPeSpI5zyVjcTvGWYLiYDtYgSIpNgvVpZptiCr3+e1YAanuRNorTOaDJj7 xsFaqWh1EY4BtLQ9Z5LdT5v4nVGeuFHHiS+N/62yaagnCDZ+xdJNY0parXKsF9U0 3khuJMagim7jVZaX5JaLey5jQazFofpnh/bC0L1kwVXH6WDIh2Z7ou3rSSkjuFkC G3hjJF9rux3zRNSpVuhUG3c+XUwuVKN96LhwHktzxa0NCMAfPjXJLXF6FvjMGKM= =XxUI -END PGP SIGNATURE-
Re: [O] naming and/or directly addressing particular windows?
Hi Matt, if you are considering using a little language to create window configurations then maybe you will find this interesting: http://angg.twu.net/eev-intros/find-multiwindow-intro.html http://angg.twu.net/eev-current/eev-multiwindow.el.html Cheers! Eduardo Ochs eduardoo...@gmail.com http://angg.twu.net/#eev On Sat, Dec 1, 2012 at 1:22 PM, Matt Price wrote: > Hi, > > After the recent conversation about Scrivener (on help-gnu-emacs) I > thought the very first step would be to write a simple function that > would create a window layout and populate the windows with a set of > buffers, then set mjor and minor modes for some of hte buffers. > (After that I guess I will have to figure out how to write some very > simple minor modes, or at least some functions that allow e.g. direct > editing of org-mode properties on a selected node.) > > So, what I have so far is quite trivial but doesn't seem to work > exactly as I expected: > > (delete-other-windows) > (split-window-horizontally) > (windmove-right) > (split-window-horizontally) > (enlarge-window-horizontally 20) > (windmove-right) > (split-window-vertically) > > > Anyway presumably I'll fiddle with this and eventually it will work, > but something better would be > > (set-window-name "outline") > (split-named-window-horizontally-and-name-the-other-window "outline" > "main") > (split-named-window-horizontally-and-name-the-other-window "main" > "metadata") > (set-width-named-window "main" 60) > > and then write a function, bound to say Ctrl-Enter, > > open-node-as-indirect-buffer-in-named-window > > Anyway: is it possible to give/get a name for a window that persists > long enough to be called in functions? > > Thanks, > Matt > >
Re: [O] naming and/or directly addressing particular windows?
> Anyway: is it possible to give/get a name for a window that persists > long enough to be called in functions? This might help: (defun icicle-make-window-alist (&optional all-p) "Return an alist of entries (WNAME . WINDOW), where WNAME names WINDOW. The name of the buffer in a window is used as its name, unless there is more than one window displaying the same buffer. In that case, WNAME includes a suffix [NUMBER], to make it a unique name. The NUMBER order among window names that differ only by their [NUMBER] is arbitrary. Non-nil argument ALL-P means use windows from all visible frames. Otherwise, use only windows from the selected frame." (lexical-let ((win-alist ()) (count 2) wname new-name) (walk-windows (lambda (w) (setq wname (buffer-name (window-buffer w))) (if (not (assoc wname win-alist)) (push (cons wname w) win-alist) (setq new-name wname) (while (assoc new-name win-alist) (setq new-name (format "%s[%d]" wname count) count (1+ count))) (push (cons new-name w) win-alist)) (setq count 2)) 'no-mini (if all-p 'visible 'this-frame)) win-alist)) (This is used in command `icicle-select-window-by-name', which in turn is the action function for multi-command `icicle-select-window'. Code here: http://www.emacswiki.org/emacs-en/download/icicles-cmd1.el.) I'm guessing that there are other, similar functions available on Emacs Wiki - start here, perhaps: http://www.emacswiki.org/emacs/CategoryWindows
[O] naming and/or directly addressing particular windows?
Hi, After the recent conversation about Scrivener (on help-gnu-emacs) I thought the very first step would be to write a simple function that would create a window layout and populate the windows with a set of buffers, then set mjor and minor modes for some of hte buffers. (After that I guess I will have to figure out how to write some very simple minor modes, or at least some functions that allow e.g. direct editing of org-mode properties on a selected node.) So, what I have so far is quite trivial but doesn't seem to work exactly as I expected: (delete-other-windows) (split-window-horizontally) (windmove-right) (split-window-horizontally) (enlarge-window-horizontally 20) (windmove-right) (split-window-vertically) Anyway presumably I'll fiddle with this and eventually it will work, but something better would be (set-window-name "outline") (split-named-window-horizontally-and-name-the-other-window "outline" "main") (split-named-window-horizontally-and-name-the-other-window "main" "metadata") (set-width-named-window "main" 60) and then write a function, bound to say Ctrl-Enter, open-node-as-indirect-buffer-in-named-window Anyway: is it possible to give/get a name for a window that persists long enough to be called in functions? Thanks, Matt
Re: [O] remote execution in heterogeneous environment
Neil Best writes: > I had just recently upgraded Emacs through Macports but had not since > restarted it, that's all. No such luck on the Tramp upgrade. I will > just wait for the next release to propagate through Macports unless > some intolerable behavior crops up. I do have a shiny new version of > Org to play with thanks to ELPA. :) There are still several problems, even with Tramp 2.2.6. I use Org 20121126 from ELPA. 1. test === My local and remote hosts use "/tmp", both run Linux. So I have applied prior to the test --8<---cut here---start->8--- (setq temporary-file-directory "~/tmp/") --8<---cut here---end--->8--- This directory is known to exist locally, but not remotely. When I eval the source code block, I don't run into this infloop as you have seen (this is fixed with Tramp 2.2.6, indeed). But there is another error --8<---cut here---start->8--- Tramp: Decoding region into remote file /scpc:ford:/home/albinus/tmp/sh-205735cU...done cond: Couldn't write region to `/scpc:ford:/home/albinus/tmp/sh-205735cU', decode using `base64 -d -i >%s' failed --8<---cut here---end--->8--- Somewhere in the code, the remote temporary directory is created based on `temporary-file-directory', which is wrong. I believe this is in Org's code, must be debugged further. 2. test === I keep `temporary-file-directory' as "/tmp". The source code block evaluates fine, but the result is: --8<---cut here---start->8--- #+BEGIN_SRC sh :dir /ford:~ echo "Executed by `whoami` on `hostname` in `pwd`" #+END_SRC #+RESULTS: : Executed by albinus on detlef in /home/albinus --8<---cut here---end--->8--- Obviously, the code is executed on the local host. As far as I could debug it, this is because `org-babel-shell-command-on-region' calls `call-process-region', which is not aware of remote execution. >> PS: it's on my wishlist for a long time to learn org-mode. Maybe I have >> a chance now. > > You won't regret it. Have fun. What's your use case? Accessing lists on different devices, under Linux, Android etc. > How did you happen to get on this thread? Was there a cross-post that > I missed? Nothing special. I have looked into the ML archive for some other reason, and I have seen this thread by accident. > Thanks for pitching in, everyone. Best regards, Michael.