Commit bf9234c365
Verified · cmc
Layout: unified · split
Sources/OrgstarMobile/CameraPicker.swift added +35
| @@ -0,0 +1,35 @@ | |||
| 1 | #if os(iOS) | ||
| 2 | import SwiftUI | ||
| 3 | import UIKit | ||
| 4 | |||
| 5 | /// The camera, for a photo to attach; `taken` gets its JPEG data, or nil when cancelled. | ||
| 6 | struct CameraPicker: UIViewControllerRepresentable { | ||
| 7 | let taken: (Data?) -> Void | ||
| 8 | |||
| 9 | static var isAvailable: Bool { UIImagePickerController.isSourceTypeAvailable(.camera) } | ||
| 10 | |||
| 11 | func makeUIViewController(context: Context) -> UIImagePickerController { | ||
| 12 | let picker = UIImagePickerController() | ||
| 13 | picker.sourceType = .camera | ||
| 14 | picker.delegate = context.coordinator | ||
| 15 | return picker | ||
| 16 | } | ||
| 17 | |||
| 18 | func updateUIViewController(_ picker: UIImagePickerController, context: Context) {} | ||
| 19 | |||
| 20 | func makeCoordinator() -> Coordinator { Coordinator(taken: taken) } | ||
| 21 | |||
| 22 | final class Coordinator: NSObject, UIImagePickerControllerDelegate, UINavigationControllerDelegate { | ||
| 23 | let taken: (Data?) -> Void | ||
| 24 | init(taken: @escaping (Data?) -> Void) { self.taken = taken } | ||
| 25 | |||
| 26 | func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey: Any]) { | ||
| 27 | taken((info[.originalImage] as? UIImage)?.jpegData(compressionQuality: 0.9)) | ||
| 28 | } | ||
| 29 | |||
| 30 | func imagePickerControllerDidCancel(_ picker: UIImagePickerController) { | ||
| 31 | taken(nil) | ||
| 32 | } | ||
| 33 | } | ||
| 34 | } | ||
| 35 | #endif | ||
Sources/OrgstarMobile/EditorScreen.swift +16 −2
| @@ -63,6 +63,7 @@ struct EditorScreen: View { | |||
| 63 | /// org-attach's file picker is up, for this method. | 63 | /// org-attach's file picker is up, for this method. |
| 64 | @State private var attaching: Attachments.Method? | 64 | @State private var attaching: Attachments.Method? |
| 65 | @State private var attachingPhotos = false | 65 | @State private var attachingPhotos = false |
| 66 | @State private var takingPhoto = false | ||
| 66 | @State private var photos: [PhotosPickerItem] = [] | 67 | @State private var photos: [PhotosPickerItem] = [] |
| 67 | /// A file shown in Quick Look. | 68 | /// A file shown in Quick Look. |
| 68 | @State private var previewed: URL? | 69 | @State private var previewed: URL? |
| @@ -149,6 +150,9 @@ struct EditorScreen: View { | |||
| 149 | Menu("Attachments", systemImage: "paperclip") { | 150 | Menu("Attachments", systemImage: "paperclip") { |
| 150 | Button("Attach File…", systemImage: "doc.badge.plus") { attaching = .cp } | 151 | Button("Attach File…", systemImage: "doc.badge.plus") { attaching = .cp } |
| 151 | Button("Attach Photo or Video…", systemImage: "photo.badge.plus") { attachingPhotos = true } | 152 | Button("Attach Photo or Video…", systemImage: "photo.badge.plus") { attachingPhotos = true } |
| 153 | if CameraPicker.isAvailable { | ||
| 154 | Button("Take Photo…", systemImage: "camera") { takingPhoto = true } | ||
| 155 | } | ||
| 152 | Button("Attach File from URL…", systemImage: "link.badge.plus") { attachActions.run("app.attach.url") } | 156 | Button("Attach File from URL…", systemImage: "link.badge.plus") { attachActions.run("app.attach.url") } |
| 153 | Button("New Attachment…", systemImage: "square.and.pencil") { attachActions.run("app.attach.new") } | 157 | Button("New Attachment…", systemImage: "square.and.pencil") { attachActions.run("app.attach.new") } |
| 154 | Button("Open Attachment…", systemImage: "paperclip") { attachActions.run("app.attach.open") } | 158 | Button("Open Attachment…", systemImage: "paperclip") { attachActions.run("app.attach.open") } |
| @@ -275,6 +279,13 @@ struct EditorScreen: View { | |||
| 275 | } | 279 | } |
| 276 | } | 280 | } |
| 277 | .photosPicker(isPresented: $attachingPhotos, selection: $photos, matching: .any(of: [.images, .videos])) | 281 | .photosPicker(isPresented: $attachingPhotos, selection: $photos, matching: .any(of: [.images, .videos])) |
| 282 | .fullScreenCover(isPresented: $takingPhoto) { | ||
| 283 | CameraPicker { data in | ||
| 284 | takingPhoto = false | ||
| 285 | if let data { attachActions.yankImage(data, ext: "jpg", prefix: "photo") } | ||
| 286 | } | ||
| 287 | .ignoresSafeArea() | ||
| 288 | } | ||
| 278 | .onChange(of: photos) { _, items in | 289 | .onChange(of: photos) { _, items in |
| 279 | guard !items.isEmpty else { return } | 290 | guard !items.isEmpty else { return } |
| 280 | photos = [] | 291 | photos = [] |
| @@ -415,6 +426,9 @@ struct EditorScreen: View { | |||
| 415 | editor.onAgenda = { start, count in model.agendaRequest = .init(start: start, count: count) } | 426 | editor.onAgenda = { start, count in model.agendaRequest = .init(start: start, count: count) } |
| 416 | editor.keymap = model.keymap | 427 | editor.keymap = model.keymap |
| 417 | editor.modal = model.modalKeys | 428 | editor.modal = model.modalKeys |
| 429 | // Dropped files are copies the drop made, so they are attached, not linked or opened. | ||
| 430 | editor.onFiles = { attachActions.drop($0, method: .attach, attachMethod: .mv) } | ||
| 431 | editor.onImage = { attachActions.yankImage($0, ext: $1) } | ||
| 418 | editor.onAppCommand = { id in | 432 | editor.onAppCommand = { id in |
| 419 | if Self.paneCommands.contains(id) { | 433 | if Self.paneCommands.contains(id) { |
| 420 | if let onPaneCommand { onPaneCommand(id) } else { message = "Not available here" } | 434 | if let onPaneCommand { onPaneCommand(id) } else { message = "Not available here" } |
| @@ -507,7 +521,7 @@ extension EditorScreen { | |||
| 507 | pick: { attaching = $0 }) | 521 | pick: { attaching = $0 }) |
| 508 | } | 522 | } |
| 509 | 523 | ||
| 510 | /// Photos and videos attached under the names Photos gives them. | 524 | /// Photos and videos attached under the names Photos gives them, linked at the caret. |
| 511 | private func attachPhotos(_ items: [PhotosPickerItem]) { | 525 | private func attachPhotos(_ items: [PhotosPickerItem]) { |
| 512 | Task { @MainActor in | 526 | Task { @MainActor in |
| 513 | var urls: [URL] = [] | 527 | var urls: [URL] = [] |
| @@ -515,7 +529,7 @@ extension EditorScreen { | |||
| 515 | if let picked = try? await item.loadTransferable(type: PickedFile.self) { urls.append(picked.url) } | 529 | if let picked = try? await item.loadTransferable(type: PickedFile.self) { urls.append(picked.url) } |
| 516 | } | 530 | } |
| 517 | if urls.count < items.count { message = "Can't read \(items.count - urls.count) of the items" } | 531 | if urls.count < items.count { message = "Can't read \(items.count - urls.count) of the items" } |
| 518 | if !urls.isEmpty { attachActions.attach(urls, method: .mv) } | 532 | if !urls.isEmpty { attachActions.drop(urls, method: .attach, attachMethod: .mv) } |
| 519 | } | 533 | } |
| 520 | } | 534 | } |
| 521 | 535 | ||
Sources/OrgstarMobile/KeyedTextView+Media.swift added +75
| @@ -0,0 +1,75 @@ | |||
| 1 | #if os(iOS) | ||
| 2 | import UIKit | ||
| 3 | import UniformTypeIdentifiers | ||
| 4 | |||
| 5 | /// Images pasted and files dropped on the text view, for `yank-media` and Org's drag-and-drop | ||
| 6 | /// handlers. Text goes to the text system as before. | ||
| 7 | extension KeyedTextView: UITextDropDelegate { | ||
| 8 | /// The image on `pasteboard` and the extension for it, when there is no text: PNG, JPEG | ||
| 9 | /// and GIF as they are, anything else UIKit reads as PNG. | ||
| 10 | static func image(on pasteboard: UIPasteboard) -> (data: Data, ext: String)? { | ||
| 11 | guard !pasteboard.hasStrings, pasteboard.hasImages else { return nil } | ||
| 12 | for (type, ext) in [(UTType.png, "png"), (.jpeg, "jpeg"), (.gif, "gif")] { | ||
| 13 | if let data = pasteboard.data(forPasteboardType: type.identifier) { return (data, ext) } | ||
| 14 | } | ||
| 15 | return pasteboard.image?.pngData().map { ($0, "png") } | ||
| 16 | } | ||
| 17 | |||
| 18 | override func canPerformAction(_ action: Selector, withSender sender: Any?) -> Bool { | ||
| 19 | if action == #selector(paste(_:)), isEditable, onImage != nil, MobileEditor.pasteboard.hasImages { return true } | ||
| 20 | return super.canPerformAction(action, withSender: sender) | ||
| 21 | } | ||
| 22 | |||
| 23 | override func paste(_ sender: Any?) { | ||
| 24 | if isEditable, let image = Self.image(on: MobileEditor.pasteboard), onImage?(image.data, image.ext) == true { return } | ||
| 25 | super.paste(sender) | ||
| 26 | } | ||
| 27 | |||
| 28 | /// A drop of files without text, which the editor attaches. | ||
| 29 | func takesDrop(_ session: any UIDropSession) -> Bool { | ||
| 30 | isEditable && onFiles != nil && !session.hasItemsConforming(toTypeIdentifiers: [UTType.plainText.identifier]) | ||
| 31 | && session.items.allSatisfy { $0.itemProvider.registeredContentTypes.contains { $0.conforms(to: .data) } } | ||
| 32 | } | ||
| 33 | |||
| 34 | func textDroppableView(_ textDroppableView: UIView & UITextDroppable, proposalForDrop drop: any UITextDropRequest) -> UITextDropProposal { | ||
| 35 | guard takesDrop(drop.dropSession) else { return drop.suggestedProposal } | ||
| 36 | let proposal = UITextDropProposal(operation: .copy) | ||
| 37 | proposal.dropPerformer = .delegate | ||
| 38 | return proposal | ||
| 39 | } | ||
| 40 | |||
| 41 | func textDroppableView(_ textDroppableView: UIView & UITextDroppable, willPerformDrop drop: any UITextDropRequest) { | ||
| 42 | guard takesDrop(drop.dropSession) else { return } | ||
| 43 | selectedRange = NSRange(location: offset(from: beginningOfDocument, to: drop.dropPosition), length: 0) | ||
| 44 | let folder = FileManager.default.temporaryDirectory.appendingPathComponent("Dropped-\(UUID().uuidString)") | ||
| 45 | try? FileManager.default.createDirectory(at: folder, withIntermediateDirectories: true) | ||
| 46 | let providers = drop.dropSession.items.map(\.itemProvider) | ||
| 47 | let files = DroppedFiles() | ||
| 48 | let group = DispatchGroup() | ||
| 49 | for (index, provider) in providers.enumerated() { | ||
| 50 | guard let type = provider.registeredContentTypes.first(where: { $0.conforms(to: .data) }) else { continue } | ||
| 51 | group.enter() | ||
| 52 | _ = provider.loadFileRepresentation(for: type, openInPlace: false) { url, _, _ in | ||
| 53 | defer { group.leave() } | ||
| 54 | guard let url else { return } | ||
| 55 | // Each in a folder of its own, so two drops of the same name stay apart. | ||
| 56 | let target = folder.appendingPathComponent("\(index)").appendingPathComponent(url.lastPathComponent) | ||
| 57 | try? FileManager.default.createDirectory(at: target.deletingLastPathComponent(), withIntermediateDirectories: true) | ||
| 58 | if (try? FileManager.default.copyItem(at: url, to: target)) != nil { files.add(target, at: index) } | ||
| 59 | } | ||
| 60 | } | ||
| 61 | group.notify(queue: .main) { [weak self] in | ||
| 62 | let dropped = files.inOrder | ||
| 63 | if !dropped.isEmpty { _ = self?.onFiles?(dropped) } | ||
| 64 | } | ||
| 65 | } | ||
| 66 | } | ||
| 67 | |||
| 68 | /// Files copied out of a drop's item providers, which call back on their own queues. | ||
| 69 | private final class DroppedFiles: @unchecked Sendable { | ||
| 70 | private let lock = NSLock() | ||
| 71 | private var files: [Int: URL] = [:] | ||
| 72 | func add(_ file: URL, at index: Int) { lock.withLock { files[index] = file } } | ||
| 73 | var inOrder: [URL] { lock.withLock { files.sorted { $0.key < $1.key }.map(\.value) } } | ||
| 74 | } | ||
| 75 | #endif | ||
Sources/OrgstarMobile/MobileEditor.swift +19
| @@ -95,6 +95,12 @@ final class MobileEditor: NSObject, DocumentBuffer { | |||
| 95 | var onColumnView: ((ColumnView.View) -> Void)? | 95 | var onColumnView: ((ColumnView.View) -> Void)? |
| 96 | /// Commands the app runs, as `app.clock.in`. | 96 | /// Commands the app runs, as `app.clock.in`. |
| 97 | var onAppCommand: ((String) -> Void)? | 97 | var onAppCommand: ((String) -> Void)? |
| 98 | /// Where paste looks for an image; scripts checking the app set another. | ||
| 99 | static var pasteboard = UIPasteboard.general | ||
| 100 | /// Files dropped at the caret; nil leaves them to the text view. | ||
| 101 | var onFiles: (([URL]) -> Void)? | ||
| 102 | /// An image pasted at the caret, with its extension (`yank-media`). | ||
| 103 | var onImage: ((Data, String) -> Void)? | ||
| 98 | /// Tags used across the workspace, for completion. | 104 | /// Tags used across the workspace, for completion. |
| 99 | var knownTags: @Sendable () -> [String] = { [] } | 105 | var knownTags: @Sendable () -> [String] = { [] } |
| 100 | 106 | ||
| @@ -171,6 +177,19 @@ final class MobileEditor: NSObject, DocumentBuffer { | |||
| 171 | return handleKey(key) | 177 | return handleKey(key) |
| 172 | } | 178 | } |
| 173 | view.onLayout = { [weak self] in self?.viewResized() } | 179 | view.onLayout = { [weak self] in self?.viewResized() } |
| 180 | view.onFiles = { [weak self, weak view] files in | ||
| 181 | guard let self, let onFiles else { return false } | ||
| 182 | if let view { focus(view) } | ||
| 183 | onFiles(files) | ||
| 184 | return true | ||
| 185 | } | ||
| 186 | view.onImage = { [weak self, weak view] data, ext in | ||
| 187 | guard let self, let onImage else { return false } | ||
| 188 | if let view { focus(view) } | ||
| 189 | onImage(data, ext) | ||
| 190 | return true | ||
| 191 | } | ||
| 192 | view.textDropDelegate = view | ||
| 174 | view.isEditable = editable | 193 | view.isEditable = editable |
| 175 | view.autocorrectionType = .no | 194 | view.autocorrectionType = .no |
| 176 | view.autocapitalizationType = .none | 195 | view.autocapitalizationType = .none |
Sources/OrgstarMobile/MobileFragments.swift +3
| @@ -36,6 +36,9 @@ final class FragmentStyle: @unchecked Sendable { | |||
| 36 | /// A text view that offers hardware-keyboard presses to the editor's keymap first. | 36 | /// A text view that offers hardware-keyboard presses to the editor's keymap first. |
| 37 | final class KeyedTextView: UITextView { | 37 | final class KeyedTextView: UITextView { |
| 38 | var keyHandler: ((UIKey) -> Bool)? | 38 | var keyHandler: ((UIKey) -> Bool)? |
| 39 | /// Files dropped and an image pasted; each returns whether it took them. | ||
| 40 | var onFiles: (([URL]) -> Bool)? | ||
| 41 | var onImage: ((Data, String) -> Bool)? | ||
| 39 | /// Keys the editor took, whose release the text system doesn't see. Optional: made by | 42 | /// Keys the editor took, whose release the text system doesn't see. Optional: made by |
| 40 | /// UIKit's `init(usingTextLayoutManager:)`, the view skips Swift's default values. | 43 | /// UIKit's `init(usingTextLayoutManager:)`, the view skips Swift's default values. |
| 41 | private var handled: Set<UIKeyboardHIDUsage>? | 44 | private var handled: Set<UIKeyboardHIDUsage>? |
Sources/OrgstarMobile/OrgstarMobileApp.swift +6
| @@ -262,6 +262,12 @@ struct RootView: View { | |||
| 262 | takeShared() | 262 | takeShared() |
| 263 | // Development: `ORGSTAR_ROOT` adds a folder at launch, as on the Mac. | 263 | // Development: `ORGSTAR_ROOT` adds a folder at launch, as on the Mac. |
| 264 | if let root = ProcessInfo.processInfo.environment["ORGSTAR_ROOT"] { try? await workspace.addRoot(URL(fileURLWithPath: root)) } | 264 | if let root = ProcessInfo.processInfo.environment["ORGSTAR_ROOT"] { try? await workspace.addRoot(URL(fileURLWithPath: root)) } |
| 265 | // `ORGSTAR_PASTE_IMAGE`: paste takes this PNG from a pasteboard of the app's own. | ||
| 266 | if let image = ProcessInfo.processInfo.environment["ORGSTAR_PASTE_IMAGE"], let data = try? Data(contentsOf: URL(fileURLWithPath: image)), | ||
| 267 | let pasteboard = UIPasteboard(name: UIPasteboard.Name("orgstar-check"), create: true) { | ||
| 268 | pasteboard.setData(data, forPasteboardType: "public.png") | ||
| 269 | MobileEditor.pasteboard = pasteboard | ||
| 270 | } | ||
| 265 | workspace.startWatching() | 271 | workspace.startWatching() |
| 266 | await workspace.refresh() | 272 | await workspace.refresh() |
| 267 | } | 273 | } |
Tests/OrgAppTests/EmacsImportTests.swift +13
| @@ -184,6 +184,19 @@ struct EmacsImportTests { | |||
| 184 | #expect(s["org-icalendar-combined-agenda-file"] == .string("~/cal/org.ics")) | 184 | #expect(s["org-icalendar-combined-agenda-file"] == .string("~/cal/org.ics")) |
| 185 | } | 185 | } |
| 186 | 186 | ||
| 187 | @Test func readsYankSettings() throws { | ||
| 188 | let folder = FileManager.default.temporaryDirectory.appendingPathComponent("orgstar-import-\(UUID().uuidString)") | ||
| 189 | try FileManager.default.createDirectory(at: folder, withIntermediateDirectories: true) | ||
| 190 | defer { try? FileManager.default.removeItem(at: folder) } | ||
| 191 | try #""" | ||
| 192 | (setq org-yank-image-save-method "images/" | ||
| 193 | org-yank-dnd-method 'attach) | ||
| 194 | """#.write(to: folder.appendingPathComponent("init.el"), atomically: true, encoding: .utf8) | ||
| 195 | let s = settings(EmacsImport.scan(EmacsImport.files(in: folder))) | ||
| 196 | #expect(s["org-yank-image-save-method"] == .string("images/")) | ||
| 197 | #expect(s["org-yank-dnd-method"] == .string("attach")) | ||
| 198 | } | ||
| 199 | |||
| 187 | @Test func readsLiterateConfig() throws { | 200 | @Test func readsLiterateConfig() throws { |
| 188 | let folder = FileManager.default.temporaryDirectory.appendingPathComponent("orgstar-import-\(UUID().uuidString)") | 201 | let folder = FileManager.default.temporaryDirectory.appendingPathComponent("orgstar-import-\(UUID().uuidString)") |
| 189 | try FileManager.default.createDirectory(at: folder, withIntermediateDirectories: true) | 202 | try FileManager.default.createDirectory(at: folder, withIntermediateDirectories: true) |
docs/manual/guide/09-links.org +31 −3
| @@ -342,9 +342,37 @@ to a file ending in =.png=, =.jpg=, =.jpeg=, =.gif=, =.svg=, =.webp=, =.tif=, =. | |||
| 342 | [[./photo.jpg]] | 342 | [[./photo.jpg]] |
| 343 | #+END_SRC | 343 | #+END_SRC |
| 344 | 344 | ||
| 345 | Relative paths are resolved against the file's folder. =attachment:= links are not | 345 | Relative paths are resolved against the file's folder, and =attachment:= links against the |
| 346 | shown as images. The link text is hidden while the image is shown, except on the line | 346 | entry's attachment folder. The link text is hidden while the image is shown, except on the |
| 347 | that holds the caret. | 347 | line that holds the caret, where the image is drawn under the link. |
| 348 | |||
| 349 | ** Pasting and dropping images | ||
| 350 | |||
| 351 | Paste (⌘V, or Edit ▸ Paste on iOS) with an image on the clipboard and no text runs | ||
| 352 | =yank-media=, as in Emacs 29 and later: the image is saved as =org-yank-image-save-method= | ||
| 353 | says and a link to it is inserted at the caret. M-x =yank-media= does the same on the Mac. | ||
| 354 | |||
| 355 | | =org-yank-image-save-method= | Where the image goes | Link | | ||
| 356 | |------------------------------+--------------------------------------------------------------------------+-------------------------| | ||
| 357 | | =attach= (the default) | The entry's attachment folder, as =org-attach-attach= puts it | =[[attachment:NAME]]= | | ||
| 358 | | a folder, such as ="images/"= | That folder, relative to the file's folder unless absolute; made if missing | =[[file:images/NAME]]= | | ||
| 359 | |||
| 360 | The name is Org's: =clipboard-= and the time, as in =clipboard-20261011T232238.png=; a | ||
| 361 | second image in the same second gets =-2=. PNG, JPEG and GIF are saved as they are, and | ||
| 362 | other image types as PNG. Before the first heading, =attach= gives the file a file-level | ||
| 363 | =ID=, as Emacs does. | ||
| 364 | |||
| 365 | Files dropped on the editor on the Mac, or pasted after copying them in Finder, are handled | ||
| 366 | as =org-yank-dnd-method= says: =attach= copies them into the entry's attachment folder (an | ||
| 367 | image goes to the =org-yank-image-save-method= folder when that is a folder), =file-link= | ||
| 368 | links to them where they are, =open= opens them, and =ask=, the default, asks which. An | ||
| 369 | image dragged in without a file, such as one from a browser, is pasted as above. On iOS, | ||
| 370 | dropped files are always attached, since what a drop hands over is a copy. Attach Photo or | ||
| 371 | Video… and Take Photo… also insert their links at the caret. | ||
| 372 | |||
| 373 | Two things differ from Emacs, so that a pasted image shows at once: the link has no | ||
| 374 | description (Org writes =[[attachment:NAME][NAME]]=, which inline display skips), and it | ||
| 375 | goes on a line of its own, breaking the line around the caret when it holds text. | ||
| 348 | 376 | ||
| 349 | ** Remote images | 377 | ** Remote images |
| 350 | 378 | ||
docs/manual/guide/13-configuration.org +5
| @@ -171,6 +171,7 @@ These settings have no control in the Settings window. Some are in the View menu | |||
| 171 | | =org-timer-format=, =org-timer-default-timer= | | | 171 | | =org-timer-format=, =org-timer-default-timer= | | |
| 172 | | =org-roam-directory=, =org-roam-dailies-directory=, =org-roam-dailies-file=, =org-roam-dailies-head=, =org-roam-dailies-entry= | | | 172 | | =org-roam-directory=, =org-roam-dailies-directory=, =org-roam-dailies-file=, =org-roam-dailies-head=, =org-roam-dailies-entry= | | |
| 173 | | =org-attach-id-dir=, =org-attach-use-inheritance= | | | 173 | | =org-attach-id-dir=, =org-attach-use-inheritance= | | |
| 174 | | =org-yank-image-save-method=, =org-yank-dnd-method= | | | ||
| 174 | | =org-crypt-tag-matcher= | | | 175 | | =org-crypt-tag-matcher= | | |
| 175 | | =org-agenda-start-on-weekday= | | | 176 | | =org-agenda-start-on-weekday= | | |
| 176 | | =org-deadline-warning-days= | | | 177 | | =org-deadline-warning-days= | | |
| @@ -232,6 +233,8 @@ A key you remove from the file goes back to its default. A key that isn't in the | |||
| 232 | | =org-timer-default-timer= | string | ="0"= | The countdown Set Countdown Timer… offers, in minutes or =h:mm:ss=; ="0"= offers none. Mirrors =org-timer-default-timer=. | | 233 | | =org-timer-default-timer= | string | ="0"= | The countdown Set Countdown Timer… offers, in minutes or =h:mm:ss=; ="0"= offers none. Mirrors =org-timer-default-timer=. | |
| 233 | | =org-attach-id-dir= | string | ="data/"= | The folder ID-based attachment folders go in, relative to the org file's folder unless absolute. See [[file:04-outlines.org][Outlines]]. Mirrors =org-attach-id-dir=. | | 234 | | =org-attach-id-dir= | string | ="data/"= | The folder ID-based attachment folders go in, relative to the org file's folder unless absolute. See [[file:04-outlines.org][Outlines]]. Mirrors =org-attach-id-dir=. | |
| 234 | | =org-attach-use-inheritance= | string | ="selective"= | Whether attachment folders come from an ancestor's =DIR= or =ID=: =selective=, ="t"= or ="nil"=. Mirrors =org-attach-use-inheritance=. | | 235 | | =org-attach-use-inheritance= | string | ="selective"= | Whether attachment folders come from an ancestor's =DIR= or =ID=: =selective=, ="t"= or ="nil"=. Mirrors =org-attach-use-inheritance=. | |
| 236 | | =org-yank-image-save-method= | string | ="attach"= | Where a pasted image goes: =attach= for the entry's attachment folder, or a folder, relative to the org file's folder unless absolute. See [[file:09-links.org][Links]]. Mirrors =org-yank-image-save-method=. | | ||
| 237 | | =org-yank-dnd-method= | string | ="ask"= | What dropping files on the editor does: =ask=, =attach=, =open= or =file-link=. See [[file:09-links.org][Links]]. Mirrors =org-yank-dnd-method=. | | ||
| 235 | | =org-crypt-tag-matcher= | string | ="crypt"= | The tag Encrypt Tagged Entries… encrypts. A single tag. See [[file:04-outlines.org][Outlines]]. Mirrors =org-crypt-tag-matcher=. | | 238 | | =org-crypt-tag-matcher= | string | ="crypt"= | The tag Encrypt Tagged Entries… encrypts. A single tag. See [[file:04-outlines.org][Outlines]]. Mirrors =org-crypt-tag-matcher=. | |
| 236 | | =org-startup-indented= | boolean | =true= | Indent bodies under their headings, as =org-indent-mode=. =#+STARTUP: indent= / =noindent= override it. Mirrors =org-startup-indented=. | | 239 | | =org-startup-indented= | boolean | =true= | Indent bodies under their headings, as =org-indent-mode=. =#+STARTUP: indent= / =noindent= override it. Mirrors =org-startup-indented=. | |
| 237 | | =org-hide-leading-stars= | boolean | =false= | Show only a heading's last star, without indentation. =#+STARTUP: hidestars= / =showstars= override it. Mirrors =org-hide-leading-stars=. | | 240 | | =org-hide-leading-stars= | boolean | =false= | Show only a heading's last star, without indentation. =#+STARTUP: hidestars= / =showstars= override it. Mirrors =org-hide-leading-stars=. | |
| @@ -601,6 +604,8 @@ Only variables whose names start with =org-=, =appt-=, =display-line-numbers=, = | |||
| 601 | | =org-timer-format=, =org-timer-default-timer= | The same keys; a number becomes a string | | 604 | | =org-timer-format=, =org-timer-default-timer= | The same keys; a number becomes a string | |
| 602 | | =org-attach-id-dir= | The same key, when the value is a string or an =expand-file-name= form | | 605 | | =org-attach-id-dir= | The same key, when the value is a string or an =expand-file-name= form | |
| 603 | | =org-attach-use-inheritance= | =selective=, or =t= / =nil= as ="t"= / ="nil"= | | 606 | | =org-attach-use-inheritance= | =selective=, or =t= / =nil= as ="t"= / ="nil"= | |
| 607 | | =org-yank-image-save-method= | =attach=, or a folder name | | ||
| 608 | | =org-yank-dnd-method= | =ask=, =attach=, =open= or =file-link= | | ||
| 604 | | =org-crypt-tag-matcher= | The same key, when the value is a single tag | | 609 | | =org-crypt-tag-matcher= | The same key, when the value is a single tag | |
| 605 | | =org-archive-location= | The same key, when the value is a =file::heading= string | | 610 | | =org-archive-location= | The same key, when the value is a =file::heading= string | |
| 606 | | =org-structure-template-alist= | =[org-structure-template-alist]=: each =("key" . "type")= entry that isn't one of Org's, from =setq= or =(add-to-list 'org-structure-template-alist …)= | | 611 | | =org-structure-template-alist= | =[org-structure-template-alist]=: each =("key" . "type")= entry that isn't one of Org's, from =setq= or =(add-to-list 'org-structure-template-alist …)= | |
docs/manual/guide/14-ios.org +2 −2
| @@ -155,7 +155,7 @@ Incremental Search is in Commands, and on =C-s= and =C-r= with a hardware keyboa | |||
| 155 | 155 | ||
| 156 | The org-timer commands are in Commands; a running timer shows above the text. See [[file:06-dates-and-clocking.org][Dates and clocking]]. | 156 | The org-timer commands are in Commands; a running timer shows above the text. See [[file:06-dates-and-clocking.org][Dates and clocking]]. |
| 157 | 157 | ||
| 158 | More ▸ Attachments has the org-attach commands and Attach Photo or Video…; files shared to orgstar can be attached to an entry. See [[file:04-outlines.org][Outlines]]. | 158 | More ▸ Attachments has the org-attach commands, Attach Photo or Video… and Take Photo…, which insert the photo's link at the caret; files shared to orgstar can be attached to an entry. Pasting an image and dropping files on the editor attach them and link them at the caret. See [[file:04-outlines.org][Outlines]] and [[file:09-links.org][Links]]. |
| 159 | 159 | ||
| 160 | More ▸ Encryption has the org-crypt commands; see [[file:04-outlines.org][Outlines]]. A remembered passphrase is used after Face ID, Touch ID or the device passcode. | 160 | More ▸ Encryption has the org-crypt commands; see [[file:04-outlines.org][Outlines]]. A remembered passphrase is used after Face ID, Touch ID or the device passcode. |
| 161 | 161 | ||
| @@ -405,7 +405,7 @@ These settings from =config.toml= apply on iOS: | |||
| 405 | - =org-log-done=, =org-log-reschedule=, =org-log-redeadline=, =org-log-into-drawer= | 405 | - =org-log-done=, =org-log-reschedule=, =org-log-redeadline=, =org-log-into-drawer= |
| 406 | - =org-enforce-todo-dependencies=, =org-enforce-todo-checkbox-dependencies=, =org-track-ordered-property-with-tag=, =org-agenda-dim-blocked-tasks= | 406 | - =org-enforce-todo-dependencies=, =org-enforce-todo-checkbox-dependencies=, =org-track-ordered-property-with-tag=, =org-agenda-dim-blocked-tasks= |
| 407 | - =org-roam-directory=, =org-roam-dailies-directory=, =org-roam-dailies-file=, =org-roam-dailies-head=, =org-roam-dailies-entry= | 407 | - =org-roam-directory=, =org-roam-dailies-directory=, =org-roam-dailies-file=, =org-roam-dailies-head=, =org-roam-dailies-entry= |
| 408 | - =org-crypt-tag-matcher=, =org-attach-id-dir=, =org-attach-use-inheritance=, =org-timer-format=, =org-timer-default-timer= | 408 | - =org-crypt-tag-matcher=, =org-attach-id-dir=, =org-attach-use-inheritance=, =org-yank-image-save-method=, =org-timer-format=, =org-timer-default-timer= |
| 409 | - =org-archive-location=, =[org-structure-template-alist]= | 409 | - =org-archive-location=, =[org-structure-template-alist]= |
| 410 | - =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist= | 410 | - =org-use-tag-inheritance=, =org-tags-exclude-from-inheritance=, =org-tag-alist= |
| 411 | - =org-use-speed-commands=, with a hardware keyboard | 411 | - =org-use-speed-commands=, with a hardware keyboard |
ios/Orgstar/Info.plist +2
| @@ -46,6 +46,8 @@ | |||
| 46 | <string>public.app-category.productivity</string> | 46 | <string>public.app-category.productivity</string> |
| 47 | <key>NSCalendarsFullAccessUsageDescription</key> | 47 | <key>NSCalendarsFullAccessUsageDescription</key> |
| 48 | <string>The agenda shows your calendar events alongside your Org entries. orgstar changes your calendars only when you edit an event or add an entry to one.</string> | 48 | <string>The agenda shows your calendar events alongside your Org entries. orgstar changes your calendars only when you edit an event or add an entry to one.</string> |
| 49 | <key>NSCameraUsageDescription</key> | ||
| 50 | <string>Photos you take from the editor are saved with your notes and linked where the caret is.</string> | ||
| 49 | <key>NSFaceIDUsageDescription</key> | 51 | <key>NSFaceIDUsageDescription</key> |
| 50 | <string>Face ID unlocks the passphrase of encrypted entries you asked orgstar to remember.</string> | 52 | <string>Face ID unlocks the passphrase of encrypted entries you asked orgstar to remember.</string> |
| 51 | <key>NSRemindersFullAccessUsageDescription</key> | 53 | <key>NSRemindersFullAccessUsageDescription</key> |
l10n/Localizable.xcstrings +20
| @@ -2312,6 +2312,16 @@ | |||
| 2312 | } | 2312 | } |
| 2313 | } | 2313 | } |
| 2314 | }, | 2314 | }, |
| 2315 | "Habits only today": { | ||
| 2316 | "localizations": { | ||
| 2317 | "de": { | ||
| 2318 | "stringUnit": { | ||
| 2319 | "state": "translated", | ||
| 2320 | "value": "Gewohnheiten nur heute" | ||
| 2321 | } | ||
| 2322 | } | ||
| 2323 | } | ||
| 2324 | }, | ||
| 2315 | "Headings": { | 2325 | "Headings": { |
| 2316 | "localizations": { | 2326 | "localizations": { |
| 2317 | "de": { | 2327 | "de": { |
| @@ -4783,6 +4793,16 @@ | |||
| 4783 | } | 4793 | } |
| 4784 | } | 4794 | } |
| 4785 | }, | 4795 | }, |
| 4796 | "Take Photo…": { | ||
| 4797 | "localizations": { | ||
| 4798 | "de": { | ||
| 4799 | "stringUnit": { | ||
| 4800 | "state": "translated", | ||
| 4801 | "value": "Foto aufnehmen …" | ||
| 4802 | } | ||
| 4803 | } | ||
| 4804 | } | ||
| 4805 | }, | ||
| 4786 | "Template": { | 4806 | "Template": { |
| 4787 | "localizations": { | 4807 | "localizations": { |
| 4788 | "de": { | 4808 | "de": { |
scripts/build-ios-app.sh +2
| @@ -53,6 +53,8 @@ cat > "$app/Info.plist" <<PLIST | |||
| 53 | <array><string>iPhoneSimulator</string></array> | 53 | <array><string>iPhoneSimulator</string></array> |
| 54 | <key>MinimumOSVersion</key> | 54 | <key>MinimumOSVersion</key> |
| 55 | <string>26.0</string> | 55 | <string>26.0</string> |
| 56 | <key>NSCameraUsageDescription</key> | ||
| 57 | <string>Photos you take from the editor are saved with your notes and linked where the caret is.</string> | ||
| 56 | <key>NSFaceIDUsageDescription</key> | 58 | <key>NSFaceIDUsageDescription</key> |
| 57 | <string>Face ID unlocks the passphrase of encrypted entries you asked orgstar to remember.</string> | 59 | <string>Face ID unlocks the passphrase of encrypted entries you asked orgstar to remember.</string> |
| 58 | <key>NSCalendarsFullAccessUsageDescription</key> | 60 | <key>NSCalendarsFullAccessUsageDescription</key> |