annoyed by emacs' delete-trailing-whitespace deleting trailing newlines at rend of file.
Or, as a friend says: I want to have a command/mode/whatever that prevents ME from adding extraneous whitespace, but leaves whatever was already there, there.
Disclaimer
The content of this blog is my personal opinion only. Although I am an employee - currently of Nvidia, in the past of other companies such as Iagination Technologies, MIPS, Intellectual Ventures, Intel, AMD, Motorola, and Gould - I reveal this only so that the reader may account for any possible bias I may have towards my employer's products. The statements I make here in no way represent my employer's position, nor am I authorized to speak on behalf of my employer. In fact, this posting may not even represent my personal opinion, since occasionally I play devil's advocate.
See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.
See http://docs.google.com/View?id=dcxddbtr_23cg5thdfj for photo credits.
Friday, October 05, 2012
Tuesday, October 02, 2012
Emacs functions to manipulate multiple frames on multiple displays
;; Convenient functions to manipulate multiple frames on multiple displays
;; e.g. I often run emacs with 4 frames on 4 different VNC sessions
;; and often need to delete all but the current frame.
(progn ; test idiom: defun some stuff, and then test at end of progn. can eval to test interactively
(defun print-frame-list ()
(interactive)
(reduce 'concat
(mapcar
(lambda (frame) "print frame"
(reduce 'concat
(mapcar (lambda (s) (format "%s" s))
(list
"TITLE=" (frame-parameter frame 'title) "\n"
" NAME=" (frame-parameter frame 'name) "\n"
" explicit-name=" (frame-parameter frame 'explicit-name) "\n"
" display=" (frame-parameter frame 'display) "\n"
" frame-height X frame-width=" (frame-height frame) "x" (frame-width frame) "\n"
" frame-pixel-height X frame-pixel-width=" (frame-pixel-height frame) "x" (frame-pixel-width frame) "\n"
" visibility=" (frame-parameter frame 'visibility) "\n"
)
)
)
)
(frame-list)
)
)
)
(defun delete-frames-except (frame-list-to-be-deleted)
(mapcar 'delete-frame frame-list-to-be-deleted))
(defun non-selected-frames ()
(remove-if 'null (mapcar (lambda (f) (if (eq (selected-frame) f) nil f)) (frame-list))))
(defun delete-frames-except-selected ()
"delete all frames except for the currently selected frame
useful in cleaning up frames scattered over multiple displays, e.g. multip.le VNC sessions"
(interactive)
(delete-frames-except (non-selected-frames))
)
(defun ag-mips-usual-emacs-frames ()
"open my usual emacs frames"
(interactive)
(make-frame-on-display "ubuntu-uarch:1.0")
(make-frame-on-display "ubuntu-uarch:2.0")
;(make-frame-on-display "ubuntu-uarch:3.0")
(make-frame-on-display "ubuntu-uarch:4.0")
)
;; test (manual, hand-checked)
(delete-frames-except-selected)
(ag-mips-usual-emacs-frames)
(print-frame-list)
)
(progn
;; Creating a new menu pane in the menu bar to the right of Tools menu
(define-key-after
global-map
[menu-bar ag-frame-menu]
(cons "Frames" (make-sparse-keymap "hoot hoot"))
'tools )
;; Creating a menu item, under the menu by the id [menu-bar mymenu]
(define-key
global-map
[menu-bar ag-frame-menu dff]
'("delete-frames-except-selected" . delete-frames-except-selected))
;; creating another menu item
(define-key
global-map
[menu-bar ag-frame-menu df.]
'("delete-frame" . delete-frame))
;; creating another menu item
(define-key
global-map
[menu-bar ag-frame-menu uf]
'("usual frames" . ag-mips-usual-emacs-frames))
)
handheld calendar
using android calendar on handheld.
want geo so can detect nonoverlap but too much travel time
want selectable colors
want calendar groups, act/deact together:
eg oceanside tides, surf, weather
eg woods, fire report
Monday, October 01, 2012
Importance of Non-Blocking User Interface
It's a real pain that Outlook has a blocking interface: while a slow command like running rules manually is running, I cannot switch to another folder and get work done processing other email.
(Instead I switch to my blog and complain.)
(Instead I switch to my blog and complain.)
Testing Mail Sorting Rules
I used to depend heavily, very heavily, on email sorting rule. Back in the old days, when I used MH on UNIX. I can't even remember the mail filters programs I used.
As I was forced, against my will, to use Outlook, I used rules less. Not because I wanted to - but because (1) Outlook's rules are much less reliable, and (2) the "development environment" for Outlook rules is much less good than text files on UNIX. No version control. No diff.
Basically, I tried using Outlook rules. But they were so much hassle, so I gave up.
(Anecdote: at Intel I kept pestering IT for help with rules. After I exhausted them, they told me about this power user they had heard about, who knew all about Outlook rules. IT person #1 did not know who it was, so sent me to IT person #2, who sent m to ... Eventually we found this power user. It was me, myself, and I. As incarnated before I left Intel for AMD. My reincarnation after I returned from AMD to Intel was referred to my original incarnation.)
GMail was better for a while. The rules are slightly better than Outlook's. But, mainly, the Bayesian importance filter was able to help a lot.
But the email onslaught grows. So I am back thinking about emal rules again. In both Outlook and Gmail.
---
Minimum requirement: version control. It is necessary to track what works, and what doesn't. Comments.
---
Thinking about why email rules are such a hassle:
Testing.
Outlook rules in particular are a pain, because it is had to create a test input set. The rules that move items to a particular folder, well, move them. Thus destroying the test input set.
I suppose the rules could be tested in a special account, and then copied. But that has hassles.
If the rules could be made conditional - only optionally moving....
Having the rules apply labels or categories rather than move helps.
Gmail's folders, of course, are really just labels or categories.
===
What I really want is multiway Bayesian classification: not just important/unimportant, but applying tags other than important. Machine learning to learn what labels and categories I want to apply.
---
For now, though I am stuck with Outlook.
:-(
Sunday, September 30, 2012
Is Google Sites a wiki? I think not.
I went to Ward's oriogional wiki, http://c2.com/cgi/wiki?WikiDesignPrinciples, seeking ammunition to blast Google Sites (http://sites.google.com) with.
Although http://en.wikipedia.org/wiki/Google_Sites says that Google Sites is a wiki, I don't think it is. Or, at least, Google Sites is a lot harder and more painful to use than most of the wikis I am familiar with (Ward's original, mediawiki, twiki, moinmoin, zwiki, ...)
I think Google Sites, née JotSpot, is really one of those CMS that started independently, and then tried to adopt the wiki moniker after the fact. Or else was developed by someone unfamiliar with wiki, who put a wiki-like cast over something else.
Overall, in terms of my least favored, most hated, wiki faker sites, Google Sites is less than Atlassian Confluence, and roughly equivlant to Microsoft's FlexWiki.
My main complaint: Google Sites makes it hard to create links to pages that do not exist yet.
Actually, Google Sites makes it hard to create links period: There is no quick syntax like WikiWord or [[double bracket links]]. The keyboard shortcut alt-I gets you to a place where you have to choose from a too-ling list of link tyes.
But, worst IMHO: there doesn't seem to be a way to create a link to a page that does not exist yet. At least not that I have found. In creating a link I can create a new page - but there's a big difference between a link to a page that does not exist, and a link to a newly created page.
---
I *want* ti like Google Sites as a wiki. But IO can't.
===
Google dpcs is even less wiki-like.
Although http://en.wikipedia.org/wiki/Google_Sites says that Google Sites is a wiki, I don't think it is. Or, at least, Google Sites is a lot harder and more painful to use than most of the wikis I am familiar with (Ward's original, mediawiki, twiki, moinmoin, zwiki, ...)
I think Google Sites, née JotSpot, is really one of those CMS that started independently, and then tried to adopt the wiki moniker after the fact. Or else was developed by someone unfamiliar with wiki, who put a wiki-like cast over something else.
Overall, in terms of my least favored, most hated, wiki faker sites, Google Sites is less than Atlassian Confluence, and roughly equivlant to Microsoft's FlexWiki.
My main complaint: Google Sites makes it hard to create links to pages that do not exist yet.
Actually, Google Sites makes it hard to create links period: There is no quick syntax like WikiWord or [[double bracket links]]. The keyboard shortcut alt-I gets you to a place where you have to choose from a too-ling list of link tyes.
But, worst IMHO: there doesn't seem to be a way to create a link to a page that does not exist yet. At least not that I have found. In creating a link I can create a new page - but there's a big difference between a link to a page that does not exist, and a link to a newly created page.
---
I *want* ti like Google Sites as a wiki. But IO can't.
===
Google dpcs is even less wiki-like.
Subscribe to:
Posts (Atom)