The function to show current file’s full path in mini buffer

It’s the built-in function buffer-file-name that gives you the full path of your file. The best thing to do is to have your emacs window to always show your system-name and the full path of the buffer you’re currently editing : (setq frame-title-format (list (format “%s %%S: %%j ” (system-name)) ‘(buffer-file-name “%f” (dired-directory dired-directory “%b”)))) … Read more

How do I read text from the clipboard?

You can use the module called win32clipboard, which is part of pywin32. Here is an example that first sets the clipboard data then gets it: import win32clipboard # set clipboard data win32clipboard.OpenClipboard() win32clipboard.EmptyClipboard() win32clipboard.SetClipboardText(‘testing 123’) win32clipboard.CloseClipboard() # get clipboard data win32clipboard.OpenClipboard() data = win32clipboard.GetClipboardData() win32clipboard.CloseClipboard() print data An important reminder from the documentation: When the … Read more

navigator.clipboard is undefined

This requires a secure origin — either HTTPS or localhost (or disabled by running Chrome with a flag). Just like for ServiceWorker, this state is indicated by the presence or absence of the property on the navigator object. https://developers.google.com/web/updates/2018/03/clipboardapi This is noted in the spec with [SecureContext] on the interface: https://w3c.github.io/clipboard-apis/#dom-navigator-clipboard You can check the … Read more

Get current clipboard content? [closed]

Use the new clipboard API, via navigator.clipboard. It can be used like this: With async/await syntax: const text = await navigator.clipboard.readText(); Or with Promise syntax: navigator.clipboard.readText() .then(text => { console.log(‘Pasted content: ‘, text); }) .catch(err => { console.error(‘Failed to read clipboard contents: ‘, err); }); Keep in mind that this will prompt the user with … Read more

Secret copy to clipboard JavaScript function in Chrome and Firefox?

I believe these are predefined Firebug console functions – at least that seems to be the case for Firebug. If you try calling window.copy for instance, you’ll get a warning about function not defined, so it’s definitely not a browser function, and cannot be used in normal JavaScript files. The following functions also seems to … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)